Skip to content

Commit 81eb0c5

Browse files
committed
add categories macro. creativecommons#54
1 parent 922492b commit 81eb0c5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

templates/macros/categories.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% macro render_categories(categories) %}
2+
<ul>
3+
{% for category in site.query(categories.path) %}
4+
<li><a href="{{ category|url }}">{{ category.name }}</a></li>
5+
{% endfor %}
6+
</ul>
7+
{% endmacro %}
8+
9+
{% macro render_category_list(categories) %}
10+
<ul>
11+
{% for category in categories %}
12+
<li><a href="{{ category|url }}">{{ category.title }}</a></li>
13+
{% endfor %}
14+
</ul>
15+
{% endmacro %}

0 commit comments

Comments
 (0)