From: Xavi Artigas Date: Tue, 23 Apr 2019 08:51:56 +0000 (+0200) Subject: mono-docs: Use full name in list of derived classes X-Git-Tag: submit/tizen/20190424.060632~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47a16eb1d2bc514b0dc865970e52932fa5e7409f;p=platform%2Fupstream%2Fefl.git mono-docs: Use full name in list of derived classes In the EFL API we have several objects with the same name in different namespaces. Thus it is important to use fully-qualified names throughout the docs, to avoid confusion. However, the default DocFX templates prefer using only simple class names. The default templates have already been modified to use full names everywhere except in the list of derived classes in the hierarchy section, where a DocFX bug was hit. This commit is a workaround to that bug (see https://github.com/dotnet/docfx/issues/3769#issuecomment-485616064 ) so full names (with links) are used in the whole hierarchy. --- diff --git a/doc/docfx/default_efl/partials/class.header.tmpl.partial b/doc/docfx/default_efl/partials/class.header.tmpl.partial index 1a445ab..3bdf956 100644 --- a/doc/docfx/default_efl/partials/class.header.tmpl.partial +++ b/doc/docfx/default_efl/partials/class.header.tmpl.partial @@ -12,7 +12,7 @@ {{/inheritance}}
{{fullName.0.value}}
{{#derivedClasses}} -
{{{specName.0.value}}}
+
{{/derivedClasses}} diff --git a/doc/docfx/gendoc.sh b/doc/docfx/gendoc.sh index 99da2d9..48d781c 100755 --- a/doc/docfx/gendoc.sh +++ b/doc/docfx/gendoc.sh @@ -22,5 +22,19 @@ for f in `ls api/*.yml`; do sed -e 's/\( /tmp/efl_docfx_gendoc + sed -i "/^ [^-]/,$ d" /tmp/efl_docfx_gendoc + sed -i "/^[^ ]/,$ d" /tmp/efl_docfx_gendoc + while read dash class + do + sed -i "s/^references:$/references:\n- uid: $class\n fullName: $class/g" $f + done <<< "$(cat /tmp/efl_docfx_gendoc)" +done; +rm -rf /tmp/efl_docfx_gendoc + # DocFX Step 2: Generate HTML files mono bin/docfx.exe build docfx.json && echo "Docs ready in the _site folder!"