Add atom/rss/json feeds

This commit is contained in:
Lewis Dale committed 2023-12-30 15:38:09 +00:00
1 parent c8c5981bd3
commit b10dfae5dd
19 files changed
+466 -181

No files matched your search

+10 -9
View File
@@ -2,24 +2,25 @@
title: Blog
layout: base.njk
pagination:
data: tags
data: collections.tags
size: 1
alias: tag
eleventyComputed:
permalink: "/post/tag/{{ tag.slug }}/"
feed: "/post/tag/{{ tag.slug }}/feed/"
permalink: "/post/tag/{{ tag }}/"
feed: "/post/tag/{{ tag }}/feed/"
---
<main class="wrapper-md stack-lg">
<h1>Posts tagged “{{ tag.name }}”</h1>
<h1>Posts tagged “{{ tag }}”</h1>
<ol class="stack-xl" role='list'>
{% for item in tag.posts %}
{% set posts = collections.posts | filterBy(tag) %}
{% for item in posts %}
<li class="stack-xs">
<h2><a href="/post/{{ item.slug }}">{{ item.title.rendered | safe }}</a></h2>
<time datetime="{{ item.date | rfc3339 }}" class="block">{{ item.date | dateDisplay }}</time>
{{ item.excerpt.rendered | safe }}
<a href="/post/{{ item.slug }}" class="inline-block">Read more</a>
<h2><a href="{{ item.url }}">{{ item.data.title | safe }}</a></h2>
<time datetime="{{ item.date | dateToRfc3339 }}" class="block">{{ item.date | dateDisplay }}</time>
<div class="e-content p-summary">{{ item.content | excerpt }}</div>
<a href="{{ item.url }}" class="inline-block">Read more</a>
</li>
{% endfor %}
</ol>