borkdude / quickblog

Light-weight static blog engine for Clojure and babashka
https://blog.michielborkent.nl/
MIT License
165 stars 28 forks source link

Enable use of metadata in templates #56

Closed ljpengelen closed 1 year ago

ljpengelen commented 1 year ago

I want to add a number of posts to my blog that I wrote for a previous employer. To prevent search engines from classifying my blog as spam, I want to refer to the original versions of these posts using HTML link tags with the attribute rel=canonical.

As I see it, a straightforward way to achieve this would be adding something like Canonical-url: https://www.example.org/post/1234 to the metadata of relevant posts and using the value of this field in the 'base.html` template.

Instead of exposing just one specific field in the metadata, I created a PR that exposes all available fields: https://github.com/borkdude/quickblog/pull/55.