Day 9
Tags are here! You can start tagging your posts right away like this:
Tags: Holidays, Action films, Bruce Willis, 1988
Your tags will be rendered wherever you have the {tags}
tag in your template. The generated markup is pretty simple and straightforward, but you’ll soon be able to configure that a bit further.
There’s also a new configuration item related to tags, which is the Tag path
. This defines the URL where your tag pages will live. The default setting looks like this:
Tag path: /tag/
This means that if you have a Holidays
tag, the tag page (which lists all posts with the tag) will have a location of /tags/holidays
.
Like post slugs, tags are “slugified” as well (so Action films
becomes action-films
), but only in URLs. The “pretty” tag names will be displayed on posts and on tag pages.
It’s also worth mentioning that the default weblog template has been updated with some style specific to tags, as well as to navigation. You don’t have to replace your own template with it fully, of course, but it can serve as a decent reference for some things.
Other updates
- Having posts with identical locations was proving to be problematic, so I added a temporary thing to prevent that from happening (it’s not elegant, but it’s a start)
- You can now use colons in your post metadata
- You can now use links in your navigation (HTML or Markdown), as opposed to location values (which is all that was supported initially)
That’s all for now! If you run into any trouble, feel free to ping me on Mastodon, IRC, via email, or on GitHub. See you again tomorrow, behind yet another door.
— Adam