List categories in article info
This commit is contained in:
		@@ -23,16 +23,20 @@
 | 
			
		||||
			{%- if page.extra.author -%}
 | 
			
		||||
				, <span class="author">{{ page.extra.author }}</span>
 | 
			
		||||
			{% endif %}
 | 
			
		||||
			{% if page.taxonomies.categories %}
 | 
			
		||||
				<div class="taxonomy">
 | 
			
		||||
					{{ self::list_taxonomy(kind="categories", prepend="#") }}
 | 
			
		||||
				</div>
 | 
			
		||||
			{% endif %}
 | 
			
		||||
		</div>
 | 
			
		||||
	{% endif %}
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro list_taxonomy(title, kind) %}
 | 
			
		||||
	<span class="title">{{ title }}</span>
 | 
			
		||||
{% macro list_taxonomy(kind, prepend="") %}
 | 
			
		||||
	<ul>
 | 
			
		||||
		{% set taxonomy = get_taxonomy(kind=kind) %}
 | 
			
		||||
		{% for term in taxonomy.items %}
 | 
			
		||||
			<li class="item"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></li>
 | 
			
		||||
			<li class="item"><a href="{{ term.permalink | safe }}">{{prepend}}{{ term.name }}</a></li>
 | 
			
		||||
		{% endfor %}
 | 
			
		||||
	</ul>
 | 
			
		||||
{% endmacro list_categories %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user