docs(generation): navigation tweaks for automatic documentation

This commit is contained in:
perry
2015-10-01 13:46:40 -05:00
parent 97b3e7c269
commit 4ad0b9638d
4 changed files with 8 additions and 6 deletions

View File

@ -5,10 +5,10 @@
<@ else @>
{% elsif page.versionHref == "<$ ver.href $>" %}
<@ endif @>
{% include v2/api_menu_<$ ver.name $>.html %}
{% include v2_fluid/api_menu_flat_<$ ver.name $>.html %}
<@ endif @>
<@ endfor @>
<# make the last case always be to show latest version #>
{% else %}
{% include v2/api_menu_<$ version.latest.name $>.html %}
{% include v2_fluid/api_menu_flat_<$ version.latest.name $>.html %}
{% endif %}

View File

@ -1,4 +1,4 @@
<@ for doc in docs @><@ if doc.URL @>
<li class="{% if page.id == '{{<$ doc.name $> | slugify: 'pretty'}}' %}active{% endif %}">
<a href="<$ doc.URL $>"><$ doc.name $></a>
<li class="{% if page.id == '{{<$ doc.name $> | slugify}}' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $></a>
</li><@ endif @><@ endfor @>

View File

@ -1,4 +1,6 @@
<select name="version" id="version-toggle">
<select name="version"
id="version-toggle"
onchange="window.location.href=this.options[this.selectedIndex].value">
<@ for ver in version.list @>
<option
value="<$ ver.href $>/{% if page.path != ''%}{{page.path}}{% else %}api/{% endif %}"

View File

@ -4,7 +4,7 @@ version: "<$ version.current.name $>"
versionHref: "<$ version.current.href $>"
path: "<$ doc.path $>"
category: api
id: "{{<$ doc.name $> | slugify: 'pretty'}}"
id: "{{<$ doc.name $> | slugify}}"
title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>"
doc: "<$ doc.name $>"