A Pico CMS tags plugin
- Place
pico-tags.php
inplugins/
. - Create
tags.html
in your theme inthemes/
(or use the provided example). - All done, now edit a few markdown files and add tags, for example:
/*
Title: Pebble
Tags: Foo, Bar, Baz
*/
Now, go to http://example.com/tag/foo
to list the page Pebble
. Note, case is not important and "tags"
is also supported, for example http://example.com/tags/Foo
.
You have a list of the current page tags in {{ meta.tags }} in the template. Use it like this:
{% for tag in meta.tags %}
<a href="/tag/{{ tag.url }}">{{ tag.name }}</a>
{% if not tag.last %}, {% endif %}
{% endfor %}