Skip to content

Commit

Permalink
Refactor Astro configuration and add RSS feed
Browse files Browse the repository at this point in the history
  • Loading branch information
madalinpopa committed Sep 29, 2024
1 parent 6565954 commit 9038fbc
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import sitemap from "@astrojs/sitemap";

// https://astro.build/config
export default defineConfig({
site: "https://madalinpopa.com",
integrations: [
tailwind(),
alpine({ entrypoint: "/src/entrypoint" }),
Expand Down
39 changes: 39 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@alpinejs/persist": "^3.14.1",
"@astrojs/alpinejs": "^0.4.0",
"@astrojs/react": "^3.6.2",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.1",
"@iconify-json/mdi": "^1.2.0",
Expand Down
11 changes: 11 additions & 0 deletions src/pages/rss.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import rss, { pagesGlobToRssItems } from "@astrojs/rss";

export async function GET(context) {
return rss({
title: "Madalin Popa | DevOps Engineer",
description: "My journey to becoming a DevOps Engineer",
site: context.site,
items: await pagesGlobToRssItems(import.meta.glob("./**/*.md")),
customData: `<language>en-us</language>`,
});
}

0 comments on commit 9038fbc

Please sign in to comment.