Add an RSS feed and site description
This commit is contained in:
parent
a2cb0960ab
commit
ccecc411b8
6 changed files with 59 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
export default {
|
||||
title: 'Crisp Byte',
|
||||
description: 'Random writing by CheddarCrisp',
|
||||
url: 'https://crispbyte.dev/',
|
||||
author: {
|
||||
name: 'CheddarCrisp',
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% if title %}{{ title }} - {% endif %}{{ metadata.title }}</title>
|
||||
<meta name="description" content="{{ description or metadata.description }}">
|
||||
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
|
||||
<link rel="stylesheet" href="/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<nav name="Social Links" class="socials">
|
||||
<ul class="simple-list">
|
||||
<li><a href="#" title="Posts RSS Feed"><img src="/img/feed-icon.svg"></a></li>
|
||||
<li><a href="/posts.xml" title="Posts RSS Feed" type="application/atom+xml">
|
||||
<img src="/img/feed-icon.svg"></a>
|
||||
</li>
|
||||
<li><a href="https://forge.crispbyte.dev/cheddar" title="Git Profile"><img src="/img/git-icon.svg"></a></li>
|
||||
<li><a href="https://hachyderm.io/@cheddarcrisp" rel="me" title="Mastodon Profile">
|
||||
<img src="/img/mastodon-icon.svg">
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
|
||||
|
||||
import metadata from "./_data/metadata.js";
|
||||
import pluginFilters from "./_config/filters.js";
|
||||
|
||||
export default async function(eleventyConfig) {
|
||||
|
@ -5,6 +8,23 @@ export default async function(eleventyConfig) {
|
|||
|
||||
eleventyConfig.addPlugin(pluginFilters);
|
||||
|
||||
eleventyConfig.addPlugin(feedPlugin, {
|
||||
type: "atom",
|
||||
outputPath: "/feed.xml",
|
||||
collection: {
|
||||
name: "posts",
|
||||
limit: 10
|
||||
},
|
||||
metadata: {
|
||||
title: metadata.title,
|
||||
subtitle: metadata.description,
|
||||
base: metadata.url,
|
||||
author: {
|
||||
name: metadata.author.name
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
eleventyConfig.addCollection("series", collectionsApi => {
|
||||
const seriesNames = collectionsApi.
|
||||
getFilteredByTag("posts").
|
||||
|
|
30
package-lock.json
generated
30
package-lock.json
generated
|
@ -10,6 +10,7 @@
|
|||
"license": "IST",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"@11ty/eleventy-plugin-rss": "^2.0.3",
|
||||
"date-fns": "^4.1.0"
|
||||
}
|
||||
},
|
||||
|
@ -150,6 +151,35 @@
|
|||
"url": "https://opencollective.com/11ty"
|
||||
}
|
||||
},
|
||||
"node_modules/@11ty/eleventy-plugin-rss": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-2.0.3.tgz",
|
||||
"integrity": "sha512-ubK97uahCLpKhORLfblgxLcoaNqTcKde1cH8CeRKNTFoUuuDSEjWZtodV9fKrg+uOp5X74dO43z1/io6hhs5Bw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-utils": "^2.0.0",
|
||||
"@11ty/posthtml-urls": "^1.0.1",
|
||||
"debug": "^4.4.0",
|
||||
"posthtml": "^0.16.6"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/11ty"
|
||||
}
|
||||
},
|
||||
"node_modules/@11ty/eleventy-plugin-rss/node_modules/@11ty/eleventy-utils": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@11ty/eleventy-utils/-/eleventy-utils-2.0.1.tgz",
|
||||
"integrity": "sha512-hicG0vPyqfLvgHJQLtoh3XAj6wUbLX4yY2se8bQLdhCIcxK46mt4zDpgcrYVP3Sjx4HPifQOdwRfOEECoUcyXQ==",
|
||||
"license": "MIT",
|
||||
"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",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"description": "",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"@11ty/eleventy-plugin-rss": "^2.0.3",
|
||||
"date-fns": "^4.1.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue