Show TOC after page title
This commit is contained in:
		@@ -34,6 +34,27 @@
 | 
			
		||||
	{% endif %}
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro toc() %}
 | 
			
		||||
	{% if page.toc %}
 | 
			
		||||
		<ul>
 | 
			
		||||
		{% for h1 in page.toc %}
 | 
			
		||||
			<li>
 | 
			
		||||
				<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
 | 
			
		||||
				{% if h1.children %}
 | 
			
		||||
					<ul>
 | 
			
		||||
						{% for h2 in h1.children %}
 | 
			
		||||
							<li>
 | 
			
		||||
								<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
 | 
			
		||||
							</li>
 | 
			
		||||
						{% endfor %}
 | 
			
		||||
					</ul>
 | 
			
		||||
				{% endif %}
 | 
			
		||||
			</li>
 | 
			
		||||
		{% endfor %}
 | 
			
		||||
		</ul>
 | 
			
		||||
	{% endif %}
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro list_taxonomy(kind, page=false, prepend="") %}
 | 
			
		||||
	{#
 | 
			
		||||
	Option `kind` must always be set and specifies the wanted taxonomy.
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
	<h1>{{ page.title }}</h1>
 | 
			
		||||
	{{ macros::toc() }}
 | 
			
		||||
	{{ page.content | safe }}
 | 
			
		||||
	{{ macros::page_info(page=page) }}
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user