Implement docs table of contents #3
This commit is contained in:
parent
e0fb064b1d
commit
b5ccc636c4
@ -22,25 +22,6 @@
|
||||
{%- endfor -%}
|
||||
</div> #}
|
||||
|
||||
{% include "partials/subprojects.html" %}
|
||||
{% include "partials/docs_toc.html" %}
|
||||
|
||||
{%- if paginator.pages -%}
|
||||
<nav id="paginator">
|
||||
{%- if paginator.previous -%}
|
||||
<a id="paginator-previous" href="{{ paginator.previous }}">
|
||||
<i class="icon"></i>
|
||||
<div>{{ macros_translate::translate(key='previous', default='Previous', language_strings=language_strings) }}</div>
|
||||
</a>
|
||||
{%- endif -%}
|
||||
|
||||
<div></div>
|
||||
|
||||
{%- if paginator.next -%}
|
||||
<a id="paginator-next" href="{{ paginator.next }}">
|
||||
<div>{{ macros_translate::translate(key='next', default='Next', language_strings=language_strings) }}</div>
|
||||
<i class="icon"></i>
|
||||
</a>
|
||||
{%- endif -%}
|
||||
</nav>
|
||||
{%- endif -%}
|
||||
{% endblock content %}
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
{%- set list_element = "ul" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- set section = get_section(path=page.ancestors | last) -%}
|
||||
|
||||
<article>
|
||||
{%- if page.extra.banner -%}
|
||||
<div id="banner-container">
|
||||
@ -112,6 +114,8 @@
|
||||
{%- include "partials/toc.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% include "partials/docs_toc.html" %}
|
||||
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
|
||||
|
||||
7
templates/partials/docs_toc.html
Normal file
7
templates/partials/docs_toc.html
Normal file
@ -0,0 +1,7 @@
|
||||
<div id="docs">
|
||||
{%- for page in section.pages %}
|
||||
<li>
|
||||
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
||||
</li>
|
||||
{%- endfor %}
|
||||
</div>
|
||||
Loading…
x
Reference in New Issue
Block a user