diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk
index ae7f5bd..9101781 100644
--- a/_includes/layouts/base.njk
+++ b/_includes/layouts/base.njk
@@ -7,8 +7,8 @@
{#- Atom and JSON feeds included by default #}
-
-
+
+
{#- Uncomment this if you’d like folks to know that you used Eleventy to build your site! #}
{#- #}
diff --git a/content/feed/feed.11tydata.js b/content/feed/feed.11tydata.js
deleted file mode 100644
index 42ad826..0000000
--- a/content/feed/feed.11tydata.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- eleventyExcludeFromCollections: true
-}
diff --git a/content/feed/feed.njk b/content/feed/feed.njk
deleted file mode 100755
index a47a7e8..0000000
--- a/content/feed/feed.njk
+++ /dev/null
@@ -1,27 +0,0 @@
----
-# Metadata comes from _data/metadata.js
-permalink: /feed/feed.xml
----
-
-
- {{ metadata.title }}
- {{ metadata.description }}
-
-
- {{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}
- {{ metadata.url }}
-
- {{ metadata.author.name }}
- {{ metadata.author.email }}
-
- {%- for post in collections.posts | reverse %}
- {% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
-
- {{ post.data.title }}
-
- {{ post.date | dateToRfc3339 }}
- {{ absolutePostUrl }}
- {{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) }}
-
- {%- endfor %}
-
diff --git a/content/feed/json.njk b/content/feed/json.njk
deleted file mode 100644
index 3b33b59..0000000
--- a/content/feed/json.njk
+++ /dev/null
@@ -1,29 +0,0 @@
----
-# Metadata comes from _data/metadata.js
-permalink: /feed/feed.json
----
-{
- "version": "https://jsonfeed.org/version/1.1",
- "title": "{{ metadata.title }}",
- "language": "{{ metadata.language }}",
- "home_page_url": "{{ metadata.url | addPathPrefixToFullUrl }}",
- "feed_url": "{{ permalink | htmlBaseUrl(metadata.url) }}",
- "description": "{{ metadata.description }}",
- "author": {
- "name": "{{ metadata.author.name }}",
- "url": "{{ metadata.author.url }}"
- },
- "items": [
- {%- for post in collections.posts | reverse %}
- {%- set absolutePostUrl = post.url | htmlBaseUrl(metadata.url) %}
- {
- "id": "{{ absolutePostUrl }}",
- "url": "{{ absolutePostUrl }}",
- "title": "{{ post.data.title }}",
- "content_html": {% if post.templateContent %}{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) | dump | safe }}{% else %}""{% endif %},
- "date_published": "{{ post.date | dateToRfc3339 }}"
- }
- {% if not loop.last %},{% endif %}
- {%- endfor %}
- ]
-}
diff --git a/eleventy.config.js b/eleventy.config.js
index 630ac81..46ac6c6 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -2,6 +2,7 @@ import { DateTime } from "luxon";
import markdownItAnchor from "markdown-it-anchor";
import pluginRss from "@11ty/eleventy-plugin-rss";
+import { feedPlugin } from "@11ty/eleventy-plugin-rss";
import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import pluginBundle from "@11ty/eleventy-plugin-bundle";
import pluginNavigation from "@11ty/eleventy-navigation";
@@ -35,7 +36,16 @@ export default async function (eleventyConfig) {
})
// Official plugins
- eleventyConfig.addPlugin(pluginRss);
+ eleventyConfig.addPlugin(feedPlugin, {
+ collection: {
+ name: "posts",
+ limit: 0
+ },
+ metadata: {
+ title: "Musings",
+ base: "https://blog.saji.dev"
+ },
+ });
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
preAttributes: { tabindex: 0 }
});
diff --git a/package-lock.json b/package-lock.json
index fda7d8f..bd7183c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,13 +10,12 @@
"license": "MIT",
"dependencies": {
"@11ty/eleventy": "^3.0.0",
- "@11ty/eleventy-img": "^4.0.2",
- "@11ty/eleventy-upgrade-help": "^3.0.1"
+ "@11ty/eleventy-img": "^4.0.2"
},
"devDependencies": {
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^1.0.4",
- "@11ty/eleventy-plugin-rss": "^1.2.0",
+ "@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"luxon": "^3.3.0",
"markdown-it-anchor": "^8.6.7"
@@ -228,15 +227,16 @@
}
},
"node_modules/@11ty/eleventy-plugin-rss": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-1.2.0.tgz",
- "integrity": "sha512-YzFnSH/5pObcFnqZ2sAQ782WmpOZHj1+xB9ydY/0j7BZ2jUNahn53VmwCB/sBRwXA/Fbwwj90q1MLo01Ru0UaQ==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-2.0.2.tgz",
+ "integrity": "sha512-BiPsNbCvaqAORsg2NA4YqcSvMy/PZiefDU3PtGgwYJQ7A5rkRq/gdod2nu1AzwBG/0c5Qe7D49BxV0SByq9vCw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "debug": "^4.3.4",
- "posthtml": "^0.16.6",
- "posthtml-urls": "1.0.0"
+ "@11ty/eleventy-utils": "^1.0.3",
+ "@11ty/posthtml-urls": "1.0.0",
+ "debug": "^4.3.5",
+ "posthtml": "^0.16.6"
},
"funding": {
"type": "opencollective",
@@ -257,26 +257,6 @@
"url": "https://opencollective.com/11ty"
}
},
- "node_modules/@11ty/eleventy-upgrade-help": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@11ty/eleventy-upgrade-help/-/eleventy-upgrade-help-3.0.1.tgz",
- "integrity": "sha512-69CttBBfplByurn5vW7eRiLPywZZZHCH6B68Ib3t3348PaHHG9RysVPRqPQzMrGIEEbXg+0+ICm+R8sAkgjfPQ==",
- "license": "MIT",
- "dependencies": {
- "fast-glob": "^3.3.2",
- "kleur": "^4.1.5",
- "minimist": "^1.2.8",
- "posthtml-match-helper": "^2.0.2",
- "semver": "^7.6.3"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/11ty"
- }
- },
"node_modules/@11ty/eleventy-utils": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@11ty/eleventy-utils/-/eleventy-utils-1.0.3.tgz",
@@ -902,13 +882,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/any-promise": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-0.1.0.tgz",
- "integrity": "sha512-lqzY9o+BbeGHRCOyxQkt/Tgvz0IZhTmQiA+LxQW8wSNpcTbj8K+0cZiSEvbpNZZP9/11Gy7dnLO3GNWUXO4d1g==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
@@ -2679,32 +2652,6 @@
"node": ">=12"
}
},
- "node_modules/posthtml-urls": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/posthtml-urls/-/posthtml-urls-1.0.0.tgz",
- "integrity": "sha512-CMJ0L009sGQVUuYM/g6WJdscsq6ooAwhUuF6CDlYPMLxKp2rmCYVebEU+wZGxnQstGJhZPMvXsRhtqekILd5/w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "http-equiv-refresh": "^1.0.0",
- "list-to-array": "^1.1.0",
- "parse-srcset": "^1.0.2",
- "promise-each": "^2.2.0"
- },
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/posthtml-urls/node_modules/http-equiv-refresh": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/http-equiv-refresh/-/http-equiv-refresh-1.0.0.tgz",
- "integrity": "sha512-TScO04soylRN9i/QdOdgZyhydXg9z6XdaGzEyOgDKycePeDeTT4KvigjBcI+tgfTlieLWauGORMq5F1eIDa+1w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.10"
- }
- },
"node_modules/prismjs": {
"version": "1.29.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
@@ -2724,16 +2671,6 @@
"asap": "~2.0.3"
}
},
- "node_modules/promise-each": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/promise-each/-/promise-each-2.2.0.tgz",
- "integrity": "sha512-67roqt1k3QDA41DZ8xi0V+rF3GoaMiX7QilbXu0vXimut+9RcKBNZ/t60xCRgcsihmNUsEjh48xLfNqOrKblUg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "any-promise": "^0.1.0"
- }
- },
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
diff --git a/package.json b/package.json
index fe9457d..7163725 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
"devDependencies": {
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^1.0.4",
- "@11ty/eleventy-plugin-rss": "^1.2.0",
+ "@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"luxon": "^3.3.0",
"markdown-it-anchor": "^8.6.7"