From 2f3c0cc73933a15a2a6dce6c52676ddebcc2206f Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Sat, 30 Dec 2023 20:10:07 +0000 Subject: [PATCH] Add aside with link to feeds --- src/_includes/base.njk | 13 ++++--------- src/blog/index.html | 6 ++++++ src/blog/tag.html | 34 ++++++++++++++++++++++++---------- src/css/globals.css | 7 +++++++ 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/src/_includes/base.njk b/src/_includes/base.njk index b8496e9..9cdc0e1 100644 --- a/src/_includes/base.njk +++ b/src/_includes/base.njk @@ -21,15 +21,10 @@ {% endif %} - {% if feed %} - - - - {% else %} - - - - {% endif %} + + + + diff --git a/src/blog/index.html b/src/blog/index.html index 3f77452..8e2a691 100644 --- a/src/blog/index.html +++ b/src/blog/index.html @@ -9,6 +9,12 @@ pagination:

Blog posts

+ +
    {% for item in pagination.items %}
  1. diff --git a/src/blog/tag.html b/src/blog/tag.html index c62e2ec..69bfa96 100644 --- a/src/blog/tag.html +++ b/src/blog/tag.html @@ -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" + } + } +} ---

    Posts tagged “{{ tag }}”

    + +
      {% set posts = collections.posts | filterBy(tag) | reverse %} {% for item in posts %} diff --git a/src/css/globals.css b/src/css/globals.css index 44eb359..c54e5f7 100644 --- a/src/css/globals.css +++ b/src/css/globals.css @@ -133,4 +133,11 @@ footer { outline: 1px solid var(--color-primary); border-radius: 5px; outline-offset: 4px; +} + +aside { + width: 100%; + background-color: var(--color-primary); + color: var(--color-secondary); + padding: var(--space-size-s); } \ No newline at end of file