auto-colored tags for posts
This commit is contained in:
parent
4cd8d22238
commit
04e4b0e51e
17 changed files with 152 additions and 64 deletions
|
@ -3,23 +3,13 @@ layout: "base.njk"
|
|||
eleventyComputed:
|
||||
title: "{{ page.fileSlug | capitalize }}"
|
||||
---
|
||||
|
||||
{%- from "components/collectionList.njk" import collectionList with context -%}
|
||||
<main>
|
||||
<section data-pagefind-body>
|
||||
{{ content | safe }}
|
||||
</section>
|
||||
{% set tag = page.fileSlug %}
|
||||
{% if collections[tag] %}
|
||||
<section>
|
||||
{% for item in collections[tag] | reverse %}
|
||||
<article class="item-summary">
|
||||
<a href="{{ item.url }}">{{ item.data.title }}</a>
|
||||
{% if item.data.date %}
|
||||
<aside>{{ item.data.date | formatDate("MMMM DD, YYYY") }}</aside>
|
||||
{% endif %}
|
||||
<p class="item-summary-description">{{ item.data.description }}</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{{ collectionList(collections[tag]) }}
|
||||
{% endif %}
|
||||
</main>
|
||||
</main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue