build: 🔧 use manual feed template instead of virtual one

In order to display the title image in the feed.xml like in the posts on the website, a more customizable variant is needed.
This commit is contained in:
Sebin Nyshkim 2025-04-20 22:30:14 +02:00
parent 769063f3cd
commit 1607d31beb
2 changed files with 42 additions and 19 deletions

View file

@ -1,7 +1,6 @@
import fs from 'node:fs';
import { env } from 'node:process';
import { eleventyImageTransformPlugin } from '@11ty/eleventy-img';
import { feedPlugin } from '@11ty/eleventy-plugin-rss';
import Image from '@11ty/eleventy-img';
import eleventyPluginCiu from '@alexcarpenter/eleventy-plugin-caniuse';
import eleventyPluginEmbedEverything from 'eleventy-plugin-embed-everything';
@ -12,6 +11,7 @@ import eleventyPluginNavigation from '@11ty/eleventy-navigation';
import eleventyPluginOgImage from 'eleventy-plugin-og-image';
import eleventyPluginReadingTime from '@myxotod/eleventy-plugin-readingtime';
import eleventyPluginRobotsTxt from 'eleventy-plugin-robotstxt';
import eleventyPluginRss from '@11ty/eleventy-plugin-rss';
import eleventyPluginSyntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight';
import markdownIt from 'markdown-it';
import markdownItAbbr from 'markdown-it-abbr';
@ -111,24 +111,7 @@ export default async function (eleventyConfig) {
sizes: '(min-width: 1280px) 960px, (min-width: 1024px) 768px, (min-width: 640px) 640px, 480px'
}
});
eleventyConfig.addPlugin(feedPlugin, {
type: 'atom', // or "rss", "json"
outputPath: '/feed.xml',
collection: {
name: 'posts', // iterate over `collections.posts`
limit: 0 // 0 means no limit
},
metadata: {
language: 'en',
title: "Sebin's Blog",
subtitle: 'Writing about stuff I have vague interests in and commenting on stuff I read.',
base: 'https://blog.sebin-nyshkim.net/',
author: {
name: 'Sebin Nyshkim',
email: '' // Optional
}
}
});
eleventyConfig.addPlugin(eleventyPluginRss);
eleventyConfig.setLibrary('md', markdownIt(MARKDOWNIT_OPTIONS));