Enable taxonomies and list them in navigation
This commit is contained in:
		@@ -3,6 +3,10 @@ title = "em.0x45.cz"
 | 
			
		||||
compile_sass = true
 | 
			
		||||
build_search_index = false
 | 
			
		||||
 | 
			
		||||
taxonomies = [
 | 
			
		||||
	{name = "categories", feed = false}
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[markdown]
 | 
			
		||||
highlight_code = true
 | 
			
		||||
smart_punctuation = true
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								templates/categories/list.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								templates/categories/list.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
{% extends "index.html" %}
 | 
			
		||||
							
								
								
									
										1
									
								
								templates/categories/single.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								templates/categories/single.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
{% extends "index.html" %}
 | 
			
		||||
@@ -16,12 +16,7 @@
 | 
			
		||||
				<li><a href="{{ item.path }}">{{ item.title }}</a></li>
 | 
			
		||||
			{% endfor %}
 | 
			
		||||
		</ul>
 | 
			
		||||
		<span class="title">Title</span>
 | 
			
		||||
		<ul>
 | 
			
		||||
			<li><a href="">anchor</a></li>
 | 
			
		||||
			<li><a href="">anchor</a></li>
 | 
			
		||||
			<li><a href="">anchor</a></li>
 | 
			
		||||
		</ul>
 | 
			
		||||
		{{ macros::list_taxonomy(title="Categories", kind="categories") }}
 | 
			
		||||
	</aside>
 | 
			
		||||
	<main>
 | 
			
		||||
		{% block content %}
 | 
			
		||||
 
 | 
			
		||||
@@ -26,3 +26,13 @@
 | 
			
		||||
		</div>
 | 
			
		||||
	{% endif %}
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro list_taxonomy(title, kind) %}
 | 
			
		||||
	<span class="title">{{ title }}</span>
 | 
			
		||||
	<ul>
 | 
			
		||||
		{% set taxonomy = get_taxonomy(kind=kind) %}
 | 
			
		||||
		{% for term in taxonomy.items %}
 | 
			
		||||
			<li class="item"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></li>
 | 
			
		||||
		{% endfor %}
 | 
			
		||||
	</ul>
 | 
			
		||||
{% endmacro list_categories %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user