Use the same template for taglists and the blog index. Move the tagposts into a collection to make life easier
Build and copy to prod / build-and-copy (push) Successful in 2m7s
Build and copy to prod / build-and-copy (push) Successful in 2m7s
This commit is contained in:
1 parent
2a900ce835
commit
d209f82688
7 files changed
+71
-58
No files matched your search
+6
-22
@@ -1,6 +1,6 @@
|
||||
---json
|
||||
{
|
||||
"title": "Blog",
|
||||
"title": "Tagged posts",
|
||||
"layout": "base.njk",
|
||||
"pagination": {
|
||||
"data": "collections.tags",
|
||||
@@ -20,25 +20,9 @@
|
||||
}
|
||||
}
|
||||
---
|
||||
{% extends "components/blog.njk" %}
|
||||
{% set posts = collections.tagPosts[tag] %}
|
||||
{% set title = "Posts tagged with “" ~ tag ~ "”" %}
|
||||
{% set feeds = feed %}
|
||||
|
||||
<main class="wrapper-lg stack-xl">
|
||||
<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 %}
|
||||
<li class="stack-xs">
|
||||
<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>
|
||||
</main>
|
||||
{{ content | safe }}
|
||||
Reference in new issue
Block a user