Enable taxonomies and list them in navigation
This commit is contained in:
		@@ -3,6 +3,10 @@ title = "em.0x45.cz"
 | 
				
			|||||||
compile_sass = true
 | 
					compile_sass = true
 | 
				
			||||||
build_search_index = false
 | 
					build_search_index = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					taxonomies = [
 | 
				
			||||||
 | 
						{name = "categories", feed = false}
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[markdown]
 | 
					[markdown]
 | 
				
			||||||
highlight_code = true
 | 
					highlight_code = true
 | 
				
			||||||
smart_punctuation = 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>
 | 
									<li><a href="{{ item.path }}">{{ item.title }}</a></li>
 | 
				
			||||||
			{% endfor %}
 | 
								{% endfor %}
 | 
				
			||||||
		</ul>
 | 
							</ul>
 | 
				
			||||||
		<span class="title">Title</span>
 | 
							{{ macros::list_taxonomy(title="Categories", kind="categories") }}
 | 
				
			||||||
		<ul>
 | 
					 | 
				
			||||||
			<li><a href="">anchor</a></li>
 | 
					 | 
				
			||||||
			<li><a href="">anchor</a></li>
 | 
					 | 
				
			||||||
			<li><a href="">anchor</a></li>
 | 
					 | 
				
			||||||
		</ul>
 | 
					 | 
				
			||||||
	</aside>
 | 
						</aside>
 | 
				
			||||||
	<main>
 | 
						<main>
 | 
				
			||||||
		{% block content %}
 | 
							{% block content %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,3 +26,13 @@
 | 
				
			|||||||
		</div>
 | 
							</div>
 | 
				
			||||||
	{% endif %}
 | 
						{% endif %}
 | 
				
			||||||
{% endmacro %}
 | 
					{% 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