lewisdale.dev/src/blog/tag.html
Lewis Dale d209f82688
All checks were successful
Build and copy to prod / build-and-copy (push) Successful in 2m7s
Use the same template for taglists and the blog index. Move the tagposts into a collection to make life easier
2024-04-12 10:15:25 +01:00

29 lines
670 B
HTML

---json
{
"title": "Tagged posts",
"layout": "base.njk",
"pagination": {
"data": "collections.tags",
"size": 1,
"alias": "tag"
},
"eleventyComputed": {
"permalink": "/post/tag/{{ tag }}/",
"feed": {
"rss": "{{ page.url }}rss.xml",
"atom": "{{ page.url }}atom.xml",
"json": "{{ page.url }}feed.json"
}
},
"eleventyImport": {
"collections": ["tags", "posts"]
}
}
---
{% extends "components/blog.njk" %}
{% set posts = collections.tagPosts[tag] %}
{% set title = "Posts tagged with “" ~ tag ~ "”" %}
{% set feeds = feed %}
{{ content | safe }}