This commit is contained in:
Cassidy Williams
2022-12-31 23:58:07 -06:00
4 changed files with 23 additions and 9 deletions

View File

@@ -1,6 +1,8 @@
---
import "../style/global.css";
import { SITE_TITLE } from "../config"
const { title, description, image = "/home-blog-card.png" } = Astro.props;
---
@@ -38,4 +40,7 @@ const { title, description, image = "/home-blog-card.png" } = Astro.props;
href="https://fonts.googleapis.com/css?family=Roboto+Mono"
rel="stylesheet"
/>
<!-- RSS Link -->
<link rel="alternate" href="/rss.xml" type="application/rss+xml" title={SITE_TITLE}>
</head>

View File

@@ -1,10 +1,19 @@
import rss from "@astrojs/rss";
import { SITE_TITLE, SITE_DESCRIPTION } from "../config";
const posts = Object.values(import.meta.glob("../posts/*.md", { eager: true }));
export const get = () =>
rss({
title: SITE_TITLE,
description: SITE_DESCRIPTION,
site: import.meta.env.SITE,
items: import.meta.glob("./blog/**/*.md"),
items: posts.map((post) => {
return {
link: `/post/${post.frontmatter.slug}`,
title: post.frontmatter.title,
pubDate: post.frontmatter.added,
content: post.compiledContent(),
};
}),
});