diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..38453a7 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +src/components/icons/*.astro diff --git a/src/components/Footer.astro b/src/components/Footer.astro index a593cf1..a85f303 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,4 +1,5 @@ --- +import RSSIcon from './icons/RSS.astro' const year = new Date().getFullYear() --- @@ -8,4 +9,7 @@ const year = new Date().getFullYear() >Astro

+

+ Subscribe with RSS +

diff --git a/src/components/icons/Calendar.astro b/src/components/icons/Calendar.astro index 580ce54..9be0d04 100644 --- a/src/components/icons/Calendar.astro +++ b/src/components/icons/Calendar.astro @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/components/icons/RSS.astro b/src/components/icons/RSS.astro new file mode 100644 index 0000000..3f74346 --- /dev/null +++ b/src/components/icons/RSS.astro @@ -0,0 +1 @@ + diff --git a/src/components/icons/UserIcon.astro b/src/components/icons/UserIcon.astro index 0acc967..4b597b4 100644 --- a/src/components/icons/UserIcon.astro +++ b/src/components/icons/UserIcon.astro @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/components/icons/Website.astro b/src/components/icons/Website.astro index f0d0605..55836d4 100644 --- a/src/components/icons/Website.astro +++ b/src/components/icons/Website.astro @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/content/config.ts b/src/content/config.ts index 86274fc..8f737bc 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -5,20 +5,20 @@ const blogCollection = defineCollection({ title: z.string(), pubDate: z.string().transform((str) => new Date(str)), tags: z.array( - z.union([ - z.literal('Apps'), - z.literal('Gaming'), - z.literal('Learning'), - z.literal('Life'), - z.literal('MacOS'), - z.literal('Music'), - z.literal('Making Stuff'), - z.literal('Mental Health'), - z.literal('Movies & TV'), - z.literal('Programming'), - z.literal('Tech'), - z.literal('Tutorial'), - z.literal('Web Dev'), + z.enum([ + 'Apps', + 'Gaming', + 'Learning', + 'Life', + 'MacOS', + 'Music', + 'Making Stuff', + 'Mental Health', + 'Movies & TV', + 'Programming', + 'Tech', + 'Tutorial', + 'Web Dev', ]) ), }), diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 66c6ef8..5f1d684 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -24,6 +24,12 @@ const title = Astro.props.frontmatter name="description" content="My personal blog about life, gaming, tech, and whatever else I feel like writing about." /> + {`ghall.blog - ${title}`} diff --git a/src/pages/about.md b/src/pages/about.md index 590e09b..6857806 100644 --- a/src/pages/about.md +++ b/src/pages/about.md @@ -5,7 +5,7 @@ title: Page Not Found My name is **Graham**, a web developer from Rhode Island. -When I'm not writing code, I'm usually enjoying one of my other hobbies; video games, music, hiking, photography, art, the list goes on... +When I'm not writing code, I'm usually enjoying one of my other hobbies; video games, board games, music, hiking, photography, art, the list goes on... I also like writing about stuff, so I put together this site to share whatever's on my mind about the world of tech, gaming, life, web development, and whatever else strikes my fancy. diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index abb7fb3..2f04c8c 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -6,6 +6,7 @@ const parser = new MarkdownIt({ html: true }) export async function get(context) { const blog = await getCollection('blog') + console.log(blog) return rss({ title: 'ghall.blog', description: @@ -14,9 +15,10 @@ export async function get(context) { items: blog .sort((a, b) => Date.parse(b.data.pubDate) - Date.parse(a.data.pubDate)) .map((post) => ({ + title: post.data.title, + pubDate: post.data.pubDate, link: `/posts/${post.slug}/`, content: sanitizeHtml(parser.render(post.body)), - ...post.data, })), }) }