aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html6
-rw-r--r--templates/page.html8
-rw-r--r--templates/tags/list.html12
-rw-r--r--templates/tags/single.html12
4 files changed, 38 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html
index 9c8f98d..f1a8cbe 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -6,4 +6,10 @@
{{ section.content | safe }}
{% endif %}
+<h2>Tags</h2>
+{% set blogtags = get_taxonomy(kind="tags") %}
+{% for tag in blogtags.items %}
+<a href="{{ get_taxonomy_url(kind="tags", name=tag.name) }}">#{{ tag.name }}</a>
+{% endfor %}
+
{%- endblock content -%}
diff --git a/templates/page.html b/templates/page.html
index ab19904..3474a07 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -5,6 +5,14 @@
{% block content -%}
<h1>{{ page.title }}</h1>
+{% if page.taxonomies.tags %}
+<div class="tags">
+ {% for tag in page.taxonomies.tags %}
+ <a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">#{{ tag }}</a>
+ {% endfor %}
+</div>
+{% endif %}
+
{{ page.content | safe -}}
<p class="date">{{ page.date | date(format="%B %d, %Y") }}</p>
diff --git a/templates/tags/list.html b/templates/tags/list.html
new file mode 100644
index 0000000..b7f904a
--- /dev/null
+++ b/templates/tags/list.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Tags</h1>
+<ul>
+ {% for term in terms %}
+ <li>
+ <a href="{{ term.permalink }}">{{ term.name }}</a> ({{ term.pages | length }} posts)
+ </li>
+ {% endfor %}
+</ul>
+{% endblock content %}
diff --git a/templates/tags/single.html b/templates/tags/single.html
new file mode 100644
index 0000000..b276f93
--- /dev/null
+++ b/templates/tags/single.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Tag: {{ term.name }}</h1>
+<ul>
+ {% for page in term.pages %}
+ <li>
+ <a href="{{ page.permalink }}">{{ page.title }}</a> - {{ page.date }}
+ </li>
+ {% endfor %}
+</ul>
+{% endblock content %}