chore(website): add RSS feed
MODIFY
website/.eleventy.js
website/.eleventy.js
@@ -13,6 +13,7 @@ const terser = require("terser");
const CleanCSS = require("clean-css");
const htmlmin = require("html-minifier");
const { base64Encode } = require("./utils");
+const pluginRss = require("@11ty/eleventy-plugin-rss");
require("dotenv").config();
@@ -35,6 +36,7 @@ module.exports = function (eleventyConfig) {
});
eleventyConfig.addPlugin(syntaxHighlight);
+ eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addPlugin(pluginTOC, {
tags: ["h2", "h3", "h4"],
@@ -198,6 +200,10 @@ module.exports = function (eleventyConfig) {
return string.toLowerCase().replace(/\s/g, "-");
});
+ eleventyConfig.addFilter("withAbsoluteUrl", function (string) {
+ return `https://rome.tools${string}`;
+ });
+
eleventyConfig.addShortcode("romeVersion", function () {
return "?.?.?";
});

MODIFY
website/package.json
website/package.json
"@11ty/eleventy": "^1.0.1",
"@11ty/eleventy-navigation": "^0.3.3",
"@11ty/eleventy-plugin-syntaxhighlight": "^4.1.0",
+ "@11ty/eleventy-plugin-rss": "^1.2.0",
"@types/markdown-it": "^12.2.3",
"clean-css": "^4.2.4",
"cross-env": "^7.0.3",

MODIFY
website/pnpm-lock.yaml
website/pnpm-lock.yaml
@@ -3,6 +3,7 @@ lockfileVersion: 5.4
specifiers:
'@11ty/eleventy': ^1.0.1
'@11ty/eleventy-navigation': ^0.3.3
+ '@11ty/eleventy-plugin-rss': ^1.2.0
'@11ty/eleventy-plugin-syntaxhighlight': ^4.1.0
'@types/markdown-it': ^12.2.3
'@types/node': ^18.6.1
@@ -30,6 +31,7 @@ dependencies:
devDependencies:
'@11ty/eleventy': 1.0.1
'@11ty/eleventy-navigation': 0.3.3
+ '@11ty/eleventy-plugin-rss': 1.2.0
'@11ty/eleventy-plugin-syntaxhighlight': 4.1.0
'@types/markdown-it': 12.2.3
'@types/node': 18.6.1
@@ -44,7 +46,7 @@ devDependencies:
markdown-it-header-sections: 1.0.0
markdown-it-imsize: 2.0.1
npm-run-all: 4.1.5
- rome: 0.7.0-next.f6510d6
+ rome: 0.9.0-next
sass: 1.54.0
terser: 4.8.0
ts-node: 10.7.0_trcaulukx5kvbq5axchldtacau
@@ -62,6 +64,16 @@ packages:
dependency-graph: 0.11.0
dev: true
+ /@11ty/eleventy-plugin-rss/1.2.0:
+ resolution: {integrity: sha512-YzFnSH/5pObcFnqZ2sAQ782WmpOZHj1+xB9ydY/0j7BZ2jUNahn53VmwCB/sBRwXA/Fbwwj90q1MLo01Ru0UaQ==}
+ dependencies:
+ debug: 4.3.4
+ posthtml: 0.16.6
+ posthtml-urls: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@11ty/eleventy-plugin-syntaxhighlight/4.1.0:
resolution: {integrity: sha512-bLpV8DKFZRgh0kToh8JPCjABfalL5ydyP6rxj/aUgrlR2v9TheLGRNqoKMhfgwUETOas2nMo/rd7sCE4kSvBNQ==}
dependencies:
@@ -179,54 +191,72 @@ packages:
fastq: 1.13.0
dev: true
- /@rometools/cli-darwin-arm64/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-pGXWFPwsZrjcExZu3CGh3pLaM3dJAgC4az2t9MfBEhyjHK6KHCh1EMGAjre2sbFEOmxtaz+UoBDqritG0HJR1w==}
+ /@rometools/cli-darwin-arm64/0.9.0-next:
+ resolution: {integrity: sha512-DoqyJZoDI2lOFEJP8fIKLOGd+vG6cGvqsb5SnEBtyx6utumO1HeFhBXfhFS1zOU8A4eNE1eTdFVDeGjs6J/hYQ==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
- /@rometools/cli-darwin-x64/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-MpJn9mRGZYbupr4QUaVexdhcFKyMIzS0whXpa6xLTt9Oikm0ZYQBUyhULWnLd1i1tkjlMDfIm07H00nYbfMwpA==}
+ /@rometools/cli-darwin-x64/0.9.0-next:
+ resolution: {integrity: sha512-Imt1C/lwltDQMC0GUt/DfOeCa6tjkfvO94oXKf0WmzXzPXAOP1wT4vxne9A6pSH5h35yfW+abrByLRkro1SDPw==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
- /@rometools/cli-linux-arm64/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-aaKOaTAYOQRbalTwKmhzOH5e08BWtuk4lNpD7TdH4kklK/+IfY3zbw6C6FTHIYGfvC5jZRMLSLO8oFW+9b0PXA==}
+ /@rometools/cli-linux-arm64/0.9.0-next:
+ resolution: {integrity: sha512-d0KPHo7cK84ZrEqwXOXHg6LNYLACcezZyxZwzEyNnia4eRtpA3kG5EXdoayR0rFpfIMwTzUUWqSmYhfppMDcvA==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rometools/cli-linux-x64/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-1hFyT5s/9jL0uXeHZCEg18aPj//bB29z5vgNVBJS+SIvFyfNIGbRZOts5vu8ioF+h8n57KhLb4j3NumcAL/mzg==}
+ /@rometools/cli-linux-x64/0.9.0-next:
+ resolution: {integrity: sha512-m1E/kGvSAexdaSwhDmTLjKBLawHEtY/bxgVCwyVaPG+sk4QCB7/4YZyQzLQxMJ1cJ+RFUYESdh1CP/KN0ZWtFw==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rometools/cli-win32-arm64/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-knoxoYEpxVHlySOnDHW7RWnqW9o0APpMCr8ZGKyXHwGEQiOIjCoIVIxQ6jyj5U5sGwtMetNJgZ8lWSdMZkeHxA==}
+ /@rometools/cli-win32-arm64/0.9.0-next:
+ resolution: {integrity: sha512-7lTx/l/EqF7ecntugjK0LCICFTyXnswZ/h2WT8chctkPjLJvlimqXWlC9Sem4KbNIjNPpO8gW3pmvNQlUGyWag==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
- /@rometools/cli-win32-x64/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-ntx0aSAZzLf82ezsCHLAoCEKJ91AiMpyVeD3ZtXExba3qiX1nW047LavAL0WTxbZ/E66uLdZEmXSfciEh7DFHQ==}
+ /@rometools/cli-win32-x64/0.9.0-next:
+ resolution: {integrity: sha512-Xey8/xIaSq9i9TS11L4osUIRUiA7qwmRiu86CPwACclzcucWa2ySf11jWmjiZKxgDl1O1YaxcZDHef88zZcGPA==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
+ /@rometools/wasm-bundler/0.9.0-next:
+ resolution: {integrity: sha512-ieC7g99orV/WLqvC1pupu1O5WMyE0YggT2mvmjXn5CUXh+iNI7ZD4d2XfFiiGNQFUs96FrNaypK7M1Nc1kC65w==}
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /@rometools/wasm-nodejs/0.9.0-next:
+ resolution: {integrity: sha512-zTZLVALA/tm7D1SeW08t9TytB4Rx9s++pYU8/yc7wN/sEnWuE2QbHvnfrzRlMsw6K+k27HLCyJOfak3rAZOpvw==}
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /@rometools/wasm-web/0.9.0-next:
+ resolution: {integrity: sha512-8mRIbOtK+XWLbMBJoERHZ/RKyZSiOOquPK2DrMuKxzPnW8bGuK/4EvIImPGgoGYzTXNJFSprboQpaE+gvBmB8w==}
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@sindresorhus/slugify/1.1.2:
resolution: {integrity: sha512-V9nR/W0Xd9TSGXpZ4iFUcFGhuOJtZX82Fzxj1YISlbSgKvIiNa7eLEZrT0vAraPOt++KHauIVNYgGRgjc13dXA==}
engines: {node: '>=10'}
@@ -369,6 +399,8 @@ packages:
reduce: 1.0.2
semver: 5.7.1
tunnel-agent: 0.6.0
+ transitivePeerDependencies:
+ - supports-color
dev: true
/ansi-regex/2.1.1:
@@ -400,6 +432,10 @@ packages:
color-convert: 2.0.1
dev: true
+ /any-promise/0.1.0:
+ resolution: {integrity: sha512-lqzY9o+BbeGHRCOyxQkt/Tgvz0IZhTmQiA+LxQW8wSNpcTbj8K+0cZiSEvbpNZZP9/11Gy7dnLO3GNWUXO4d1g==}
+ dev: true
+
/anymatch/3.1.2:
resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==}
engines: {node: '>= 8'}
@@ -839,6 +875,8 @@ packages:
finalhandler: 1.1.0
parseurl: 1.3.3
utils-merge: 1.0.1
+ transitivePeerDependencies:
+ - supports-color
dev: true
/constantinople/4.0.1:
@@ -925,6 +963,11 @@ packages:
/debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
+ peerDependencies:
+ supports-color: '*'
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
dependencies:
ms: 2.0.0
dev: true
@@ -1011,6 +1054,8 @@ packages:
stack-utils: 1.0.2
to-factory: 1.0.0
zepto: 1.2.0
+ transitivePeerDependencies:
+ - supports-color
dev: true
/doctypes/1.1.0:
@@ -1337,6 +1382,8 @@ packages:
parseurl: 1.3.3
statuses: 1.3.1
unpipe: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
dev: true
/follow-redirects/1.14.9_debug@4.3.2:
@@ -1615,6 +1662,11 @@ packages:
entities: 3.0.1
dev: true
+ /http-equiv-refresh/1.0.0:
+ resolution: {integrity: sha512-TScO04soylRN9i/QdOdgZyhydXg9z6XdaGzEyOgDKycePeDeTT4KvigjBcI+tgfTlieLWauGORMq5F1eIDa+1w==}
+ engines: {node: '>= 0.10'}
+ dev: true
+
/http-errors/1.6.3:
resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==}
engines: {node: '>= 0.6'}
@@ -1774,6 +1826,10 @@ packages:
is-extglob: 2.1.1
dev: true
+ /is-json/2.0.1:
+ resolution: {integrity: sha512-6BEnpVn1rcf3ngfmViLM6vjUjGErbdrL4rwlv+u1NO1XO8kqT4YGL8+19Q+Z/bas8tY90BTWMk2+fW1g6hQjbA==}
+ dev: true
+
/is-negative-zero/2.0.2:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
engines: {node: '>= 0.4'}
@@ -1992,6 +2048,10 @@ packages:
hasBin: true
dev: true
+ /list-to-array/1.1.0:
+ resolution: {integrity: sha512-+dAZZ2mM+/m+vY9ezfoueVvrgnHIGi5FvgSymbIgJOFwiznWyA59mav95L+Mc6xPtL3s9gm5eNTlNtxJLbNM1g==}
+ dev: true
+
/load-json-file/4.0.0:
resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==}
engines: {node: '>=4'}
@@ -2370,6 +2430,10 @@ packages:
json-parse-better-errors: 1.0.2
dev: true
+ /parse-srcset/1.0.2:
+ resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==}
+ dev: true
+
/parse5-htmlparser2-tree-adapter/6.0.1:
resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==}
dependencies:
@@ -2462,6 +2526,38 @@ packages:
is-number-like: 1.0.8
dev: true
+ /posthtml-parser/0.11.0:
+ resolution: {integrity: sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==}
+ engines: {node: '>=12'}
+ dependencies:
+ htmlparser2: 7.2.0
+ dev: true
+
+ /posthtml-render/3.0.0:
+ resolution: {integrity: sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==}
+ engines: {node: '>=12'}
+ dependencies:
+ is-json: 2.0.1
+ dev: true
+
+ /posthtml-urls/1.0.0:
+ resolution: {integrity: sha512-CMJ0L009sGQVUuYM/g6WJdscsq6ooAwhUuF6CDlYPMLxKp2rmCYVebEU+wZGxnQstGJhZPMvXsRhtqekILd5/w==}
+ engines: {node: '>= 4'}
+ dependencies:
+ http-equiv-refresh: 1.0.0
+ list-to-array: 1.1.0
+ parse-srcset: 1.0.2
+ promise-each: 2.2.0
+ dev: true
+
+ /posthtml/0.16.6:
+ resolution: {integrity: sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==}
+ engines: {node: '>=12.0.0'}
+ dependencies:
+ posthtml-parser: 0.11.0
+ posthtml-render: 3.0.0
+ dev: true
+
/pretty/2.0.0:
resolution: {integrity: sha512-G9xUchgTEiNpormdYBl+Pha50gOUovT18IvAe7EYMZ1/f9W/WWMPRn+xI68yXNMUk3QXHDwo/1wV/4NejVNe1w==}
engines: {node: '>=0.10.0'}
@@ -2481,6 +2577,12 @@ packages:
engines: {node: '>= 0.6.0'}
dev: true
+ /promise-each/2.2.0:
+ resolution: {integrity: sha512-67roqt1k3QDA41DZ8xi0V+rF3GoaMiX7QilbXu0vXimut+9RcKBNZ/t60xCRgcsihmNUsEjh48xLfNqOrKblUg==}
+ dependencies:
+ any-promise: 0.1.0
+ dev: true
+
/promise/7.3.1:
resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==}
dependencies:
@@ -2731,6 +2833,8 @@ packages:
dependencies:
debug: 2.6.9
minimatch: 3.0.4
+ transitivePeerDependencies:
+ - supports-color
dev: true
/reusify/1.0.4:
@@ -2745,18 +2849,21 @@ packages:
glob: 7.2.0
dev: true
- /rome/0.7.0-next.f6510d6:
- resolution: {integrity: sha512-vg8juqZlOr5Xlj+aNcNdiKH6r5heyLCSqaMbh5BgV312vyYrM6Nm4KMFH1G/F+WFiAPweKc+GKG0G+/Z37NsfQ==}
+ /rome/0.9.0-next:
+ resolution: {integrity: sha512-Ggk0vGhYmeFEAMdd9gTtsmGKGIGa5ldet/GJDRgtW/7gZYP7HYNizJcf5N4uwZHn0/hjgFvguWB2BEHsHGTivA==}
engines: {node: '>=14.*'}
hasBin: true
requiresBuild: true
optionalDependencies:
- '@rometools/cli-darwin-arm64': 0.7.0-next.f6510d6
- '@rometools/cli-darwin-x64': 0.7.0-next.f6510d6
- '@rometools/cli-linux-arm64': 0.7.0-next.f6510d6
- '@rometools/cli-linux-x64': 0.7.0-next.f6510d6
- '@rometools/cli-win32-arm64': 0.7.0-next.f6510d6
- '@rometools/cli-win32-x64': 0.7.0-next.f6510d6
+ '@rometools/cli-darwin-arm64': 0.9.0-next
+ '@rometools/cli-darwin-x64': 0.9.0-next
+ '@rometools/cli-linux-arm64': 0.9.0-next
+ '@rometools/cli-linux-x64': 0.9.0-next
+ '@rometools/cli-win32-arm64': 0.9.0-next
+ '@rometools/cli-win32-x64': 0.9.0-next
+ '@rometools/wasm-bundler': 0.9.0-next
+ '@rometools/wasm-nodejs': 0.9.0-next
+ '@rometools/wasm-web': 0.9.0-next
dev: true
/run-parallel/1.2.0:
@@ -2836,6 +2943,8 @@ packages:
on-finished: 2.3.0
range-parser: 1.2.1
statuses: 1.4.0
+ transitivePeerDependencies:
+ - supports-color
dev: true
/serve-index/1.9.1:
@@ -2849,6 +2958,8 @@ packages:
http-errors: 1.6.3
mime-types: 2.1.35
parseurl: 1.3.3
+ transitivePeerDependencies:
+ - supports-color
dev: true
/serve-static/1.13.2:
@@ -2859,6 +2970,8 @@ packages:
escape-html: 1.0.3
parseurl: 1.3.3
send: 0.16.2
+ transitivePeerDependencies:
+ - supports-color
dev: true
/server-destroy/1.0.1:

ADD
website/src/blog/feed.liquid
+---json
+{
+ "permalink": "feed.xml",
+ "eleventyExcludeFromCollections": true,
+ "metadata": {
+ "title": "Rome's blog posts",
+ "language": "en",
+ "url": "https://rome.tools/"
+ }
+}
+---
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.url }}">
+ <title>{{ metadata.title }}</title>
+ <link href="{{ permalink }}" rel="self"/>
+ <link href="{{ metadata.url }}"/>
+ <updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
+ <id>{{ metadata.url }}</id>
+ {% for post in collections.post reversed %}
+ <author>
+ <name>{{ post.data.author_name }}</name>
+ </author>
+ <entry>
+ <title>{{ post.data.title }}</title>
+ <link href="{{ post.data.permalink | withAbsoluteUrl }}"/>
+ <updated>{{ post.date | dateToRfc3339 }}</updated>
+ <id>{{ post.url | url }}</id>
+ <content xml:lang="{{ metadata.language }}" type="html">{{ post.data.description }}</content>
+ </entry>
+ {%- endfor %}
+</feed>
\ No newline at end of file

chore(website): add RSS feed (#3174)