From a423e93675edf96020bdf3996ca69074d71cb76e Mon Sep 17 00:00:00 2001 From: Cameron Otsuka Date: Mon, 23 Dec 2024 13:53:39 -0800 Subject: [PATCH] fix feeds --- _data/metadata.json | 4 ++-- _includes/layouts/base.njk | 10 +++++----- eleventy.config.js | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/_data/metadata.json b/_data/metadata.json index e6bac9e..45ff9e5 100644 --- a/_data/metadata.json +++ b/_data/metadata.json @@ -1,8 +1,8 @@ { "title": "Cameron Otsuka", - "url": "https://otsuka.haus", + "subtitle": "The collection of Cameron's thoughts.", + "base": "https://otsuka.haus", "language": "en", - "description": "The collection of Cameron's thoughts.", "author": { "name": "Cameron Otsuka", "email": "cameron@otsuka.haus", diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index 289262a..c695c71 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -10,20 +10,20 @@ - + - - + + - + {%- if tags %} @@ -39,7 +39,7 @@ {%- endif %} {{ title }} | {{ metadata.title }} - + diff --git a/eleventy.config.js b/eleventy.config.js index 1429132..974246c 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -64,11 +64,43 @@ module.exports = function (eleventyConfig) { type: "atom", outputPath: "/feed.xml", collection: { - name: "articles", + name: "activities", limit: 10, }, metadata: globalMetadata, }); + eleventyConfig.addPlugin(feedPlugin, { + type: "atom", + outputPath: "/feeds/articles.xml", + inputPath: "eleventy-plugin-feed-cameron-otsuka-articles-atom.njk", + collection: { + name: "articles", + limit: 10, + }, + metadata: { + language: globalMetadata['language'], + title: globalMetadata['title'].concat(" - Articles"), + subtitle: globalMetadata['subtitle'], + base: globalMetadata['base'], + author: globalMetadata['author'], + }, + }); + eleventyConfig.addPlugin(feedPlugin, { + type: "atom", + outputPath: "/feeds/reviews.xml", + inputPath: "eleventy-plugin-feed-cameron-otsuka-reviews-atom.njk", + collection: { + name: "reviews", + limit: 10, + }, + metadata: { + language: globalMetadata['language'], + title: globalMetadata['title'].concat(" - Reviews"), + subtitle: globalMetadata['subtitle'], + base: globalMetadata['base'], + author: globalMetadata['author'], + }, + }); eleventyConfig.addPlugin(eleventySyntaxHighlightPlugin); eleventyConfig.addShortcode("image", async function (src, alt) { let input; -- 2.51.0