diff --git a/public/pretty-feed-v3.xsl b/public/pretty-feed-v3.xsl deleted file mode 100644 index 03ef2bb..0000000 --- a/public/pretty-feed-v3.xsl +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - Web Feed - - - - - - - - This is a web feed, also known as an RSS feed. Subscribe by copying the URL from the address bar into your newsreader. - - - Visit About Feeds to get started with newsreaders and subscribing. It’s free. - - - - - - - - - - - - - - - - - - - - - - - - Web Feed Preview - - - - - - - - Visit Website → - - - Recent Items - - - - - - - - - - - - Published: - - - - - - - - diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..bc626bd --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,11 @@ +--- +import PageLayout from "../layouts/PageLayout.astro"; +--- + + + + The file associated with the requested path ({Astro.originPathname}) could not be found. + + diff --git a/src/pages/blog/[slug].astro b/src/pages/blog/[slug].astro index 993a80d..19100c7 100644 --- a/src/pages/blog/[slug].astro +++ b/src/pages/blog/[slug].astro @@ -30,18 +30,17 @@ const { Content, headings } = await render(article); + d="M10.75 16.82A7.462 7.462 0 0 1 15 15.5c.71 0 1.396.098 2.046.282A.75.75 0 0 0 18 15.06v-11a.75.75 0 0 0-.546-.721A9.006 9.006 0 0 0 15 3a8.963 8.963 0 0 0-4.25 1.065V16.82ZM9.25 4.065A8.963 8.963 0 0 0 5 3c-.85 0-1.673.118-2.454.339A.75.75 0 0 0 2 4.06v11a.75.75 0 0 0 .954.721A7.506 7.506 0 0 1 5 15.5c1.579 0 3.042.487 4.25 1.32V4.065Z" + > { { sortedArticles.map((article) => ( - + » - Example content - diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index 5171e12..5e01ff1 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -6,12 +6,24 @@ const parser = new MarkdownIt(); export const GET = async (context) => { const blog = await getCollection("blog"); + + const latestModDate = blog.reduce((latest, article) => { + const modDate = article.data.modDate || article.data.pubDate; + return modDate > latest ? modDate : latest; + }, new Date(0)); + return rss({ - title: "Thilo Hohlt’s Blog", - description: "Thilo Hohlt’s Blog", + title: "Thilo Hohlt's Blog", + description: "Thilo Hohlt's Blog", site: context.site, trailingSlash: false, - stylesheet: "pretty-feed-v3.xsl", + xmlns: { + atom: "http://www.w3.org/2005/Atom", + }, + customData: ` + ${latestModDate.toUTCString()} + + `, items: blog.map((article) => ({ link: `/blog/${article.id}/`, content: sanitizeHtml(parser.render(article.body), {
- This is a web feed, also known as an RSS feed. Subscribe by copying the URL from the address bar into your newsreader. -
- Visit About Feeds to get started with newsreaders and subscribing. It’s free. -
+ The file associated with the requested path ({Astro.originPathname}) could not be found. +
{Astro.originPathname}
Example content