feat: update implementation of RSS feeds
Adds a new filter `convertRelativeLinks` that converts any relative link to an absolute path Adds an XML transform to minify the final output for smaller filesizes Updates some data in meta Adds a new macro for generating an RSS feed
This commit is contained in:
parent
46ed7a29be
commit
e6cfa88f61
14 changed files with 1508 additions and 271 deletions
12
config/transforms/xml-config.js
Normal file
12
config/transforms/xml-config.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import minifyXML from "minify-xml";
|
||||
|
||||
export default function (eleventyConfig) {
|
||||
eleventyConfig.addTransform("xml-minify", (content, path) => {
|
||||
if (path && path.endsWith(".xml")) {
|
||||
return minifyXML(content, {
|
||||
shortenNamespaces: false,
|
||||
});
|
||||
}
|
||||
return content;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue