Add aside with link to feeds

This commit is contained in:
Lewis Dale committed 2023-12-30 20:10:07 +00:00
1 parent c8c98c7ef9
commit 2f3c0cc739
4 files changed
+41 -19

No files matched your search

+6
View File
@@ -9,6 +9,12 @@ pagination:
<main class="wrapper-md stack-lg">
<h1>Blog posts</h1>
<aside class="text-center">
<p>
Subscribe via <a href="/rss.xml">RSS</a>, <a href="/atom.xml">Atom</a>, or <a href="/feed.json">JSON</a>.
</p>
</aside>
<ol class="stack-xl" role='list'>
{% for item in pagination.items %}
<li class="stack-xs">
+24 -10
View File
@@ -1,18 +1,32 @@
---
title: Blog
layout: base.njk
pagination:
data: collections.tags
size: 1
alias: tag
eleventyComputed:
permalink: "/post/tag/{{ tag }}/"
feed: "/post/tag/{{ tag }}/feed/"
---json
{
"title": "Blog",
"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"
}
}
}
---
<main class="wrapper-md stack-lg">
<h1>Posts tagged “{{ tag }}”</h1>
<aside class="text-center">
<p>
Subscribe via <a href="{{ feed.rss }}">RSS</a>, <a href="{{ feed.atom }}">Atom</a>, or <a href="{{ feed.json }}">JSON</a>.
</p>
</aside>
<ol class="stack-xl" role='list'>
{% set posts = collections.posts | filterBy(tag) | reverse %}
{% for item in posts %}