summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-06-02 14:24:31 +0200
committerHarald Eilertsen <haraldei@anduin.net>2020-06-02 14:24:31 +0200
commit32d531387cb6fd82f2e8c34c1f95f6914f905024 (patch)
treee1c41f5cb7318b4b29f36467b382d6d076771a43 /templates
parent381452e5193f94960895a60c19e512d9c6857251 (diff)
downloadrabalderz-32d531387cb6fd82f2e8c34c1f95f6914f905024.tar.gz
rabalderz-32d531387cb6fd82f2e8c34c1f95f6914f905024.tar.bz2
rabalderz-32d531387cb6fd82f2e8c34c1f95f6914f905024.zip
New shortcode `taglink`, for linking to a tag page.
Diffstat (limited to 'templates')
-rw-r--r--templates/shortcodes/taglink.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/shortcodes/taglink.html b/templates/shortcodes/taglink.html
new file mode 100644
index 0000000..6e8642e
--- /dev/null
+++ b/templates/shortcodes/taglink.html
@@ -0,0 +1,2 @@
+{% set tag_url = get_taxonomy_url(kind="tags", name=tag) %}
+<a href="{{ tag_url | safe }}" class="taglink">{% if name %}{{ name }}{% else %}{{ tag }}{% endif %}</a>