summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-04-23 10:51:56 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-04-23 10:51:56 +0200
commit8e3fa3a97f827118ce051b3899e2091164b89bef (patch)
treecc4a1bcf8dafc6589b217ff9887e5f44e82521df
parentf8377ed549f758436289de2ea212572e94ca251e (diff)
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.
-rw-r--r--doc/docfx/default_efl/partials/class.header.tmpl.partial2
-rwxr-xr-xdoc/docfx/gendoc.sh14
2 files changed, 15 insertions, 1 deletions
diff --git a/doc/docfx/default_efl/partials/class.header.tmpl.partial b/doc/docfx/default_efl/partials/class.header.tmpl.partial
index 1a445ab3ca..3bdf956fc1 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 @@
12 {{/inheritance}} 12 {{/inheritance}}
13 <div class="level{{level}}"><span class="xref"><b>{{fullName.0.value}}</b></span></div> 13 <div class="level{{level}}"><span class="xref"><b>{{fullName.0.value}}</b></span></div>
14 {{#derivedClasses}} 14 {{#derivedClasses}}
15 <div class="level{{index}}">{{{specName.0.value}}}</div> 15 <div class="level{{index}}"><xref uid="{{uid}}" text="{{fullName.0.value}}"/></div>
16 {{/derivedClasses}} 16 {{/derivedClasses}}
17 </div> 17 </div>
18</div> 18</div>
diff --git a/doc/docfx/gendoc.sh b/doc/docfx/gendoc.sh
index 99da2d9f18..48d781cd81 100755
--- a/doc/docfx/gendoc.sh
+++ b/doc/docfx/gendoc.sh
@@ -22,5 +22,19 @@ for f in `ls api/*.yml`; do
22 sed -e 's/\(<xref href=\\"[^\\]*\)\\"/\1?displayProperty=fullName\\"/g' -i $f 22 sed -e 's/\(<xref href=\\"[^\\]*\)\\"/\1?displayProperty=fullName\\"/g' -i $f
23done; 23done;
24 24
25# Add missing references to derived classes, so they can be rendered with
26# their full name.
27# https://github.com/dotnet/docfx/issues/3769#issuecomment-485616064
28for f in `grep -l derivedClasses api/*.yml`; do
29 sed "1,/^ derivedClasses:$/d" $f > /tmp/efl_docfx_gendoc
30 sed -i "/^ [^-]/,$ d" /tmp/efl_docfx_gendoc
31 sed -i "/^[^ ]/,$ d" /tmp/efl_docfx_gendoc
32 while read dash class
33 do
34 sed -i "s/^references:$/references:\n- uid: $class\n fullName: $class/g" $f
35 done <<< "$(cat /tmp/efl_docfx_gendoc)"
36done;
37rm -rf /tmp/efl_docfx_gendoc
38
25# DocFX Step 2: Generate HTML files 39# DocFX Step 2: Generate HTML files
26mono bin/docfx.exe build docfx.json && echo "Docs ready in the _site folder!" 40mono bin/docfx.exe build docfx.json && echo "Docs ready in the _site folder!"