From a46b2012fdfbcd6df8620458094c76441428bc6c Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:47:51 +0800 Subject: [PATCH] Use Navigation plugin to render site map --- src/archive/archive.11tydata.json | 7 +- src/articles/articles.11tydata.json | 6 +- src/blog/posts.njk | 3 + src/blog/posts/posts.11tydata.json | 6 +- src/changelogs/changelogs.njk | 2 + src/changelogs/pages/2022.njk | 3 +- src/changelogs/pages/2023.njk | 3 +- src/changelogs/pages/2024.njk | 3 +- src/changelogs/pages/layouts.njk | 3 +- src/changelogs/pages/pages.11tydata.json | 8 ++- src/index.njk | 2 + src/pages/about.njk | 2 + src/pages/articles.md | 2 + src/pages/blog.njk | 2 + src/pages/links.njk | 2 + src/pages/now.md | 2 + src/pages/projects.md | 2 + src/pages/shrines.md | 2 + src/pages/sitemap.njk | 81 ++++-------------------- src/projects/projects.11tydata.json | 8 ++- src/shrines/asummersend.njk | 3 + src/shrines/asummersend/gallery.md | 4 ++ src/shrines/asummersend/playlists.md | 4 ++ src/shrines/asummersend/trivia.md | 4 ++ 24 files changed, 87 insertions(+), 77 deletions(-) diff --git a/src/archive/archive.11tydata.json b/src/archive/archive.11tydata.json index ca5a0dad..67413777 100644 --- a/src/archive/archive.11tydata.json +++ b/src/archive/archive.11tydata.json @@ -1,5 +1,10 @@ { "tags": "archive", "layout": "main/content", - "permalink": "/{{ page.fileSlug }}/" + "permalink": "/{{ page.fileSlug }}/", + "eleventyComputed":{ + "eleventyNavigation":{ + "key": "{{ title }}" + } + } } \ No newline at end of file diff --git a/src/articles/articles.11tydata.json b/src/articles/articles.11tydata.json index 5a332057..35908a43 100644 --- a/src/articles/articles.11tydata.json +++ b/src/articles/articles.11tydata.json @@ -2,6 +2,10 @@ "tags": ["articles", "contents", "feed items"], "layout": "main/article", "eleventyComputed": { - "title": "{{ articleTitle }} | Articles" + "title": "{{ articleTitle }} | Articles", + "eleventyNavigation": { + "key": "{{ articleTitle }}", + "parent": "Articles" + } } } \ No newline at end of file diff --git a/src/blog/posts.njk b/src/blog/posts.njk index bff2c74f..848ca9d0 100644 --- a/src/blog/posts.njk +++ b/src/blog/posts.njk @@ -4,6 +4,9 @@ layout: main/content tags: blog pages eleventyComputed: desc: Archive of blog posts on {{ sitemeta.siteName | safe }} +eleventyNavigation: + key: Blog Archive + parent: Blog ---