Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "amplifying-fsharp-website",
"dependencies": {
"@astrojs/react": "^4.2.7",
"@astrojs/rss": "^4.0.13",
"@iconify-json/bi": "^1.2.4",
"@iconify-json/cil": "^1.2.2",
"@iconify-json/fluent": "^1.2.21",
Expand Down Expand Up @@ -34,8 +35,8 @@
"styled-components": "^6.1.18",
},
"devDependencies": {
"@mermaid-js/mermaid-cli": "^11.4.0",
"prettier": "^3.4.2",
"@mermaid-js/mermaid-cli": "^11.4.2",
"prettier": "^3.5.3",
"prettier-plugin-astro": "^0.14.1",
"vite-plugin-fable": "^0.0.32",
},
Expand Down Expand Up @@ -65,6 +66,8 @@

"@astrojs/react": ["@astrojs/[email protected]", "", { "dependencies": { "@vitejs/plugin-react": "^4.4.1", "ultrahtml": "^1.6.0", "vite": "^6.3.4" }, "peerDependencies": { "@types/react": "^17.0.50 || ^18.0.21 || ^19.0.0", "@types/react-dom": "^17.0.17 || ^18.0.6 || ^19.0.0", "react": "^17.0.2 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0" } }, "sha512-/wM90noT/6QyJEOGdDmDbq2D9qZooKTJNG1M8olmsW5ns6bJ7uxG5fzkYxcpA3WUTD6Dj6NtpEqchvb5h8Fa+g=="],

"@astrojs/rss": ["@astrojs/[email protected]", "", { "dependencies": { "fast-xml-parser": "^5.3.0", "picocolors": "^1.1.1" } }, "sha512-ugW4DmGn8kgfl8/qecU3EcKCAuEBrZqY7eYfa6at0sY7HGEwRdzsOafLE437RwDMP2ZuxfKnCNABs99YVhX0kg=="],

"@astrojs/telemetry": ["@astrojs/[email protected]", "", { "dependencies": { "ci-info": "^4.2.0", "debug": "^4.4.0", "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^3.0.0", "is-wsl": "^3.1.0", "which-pm-runs": "^1.1.0" } }, "sha512-SSVM820Jqc6wjsn7qYfV9qfeQvePtVc1nSofhyap7l0/iakUKywj3hfy3UJAOV4sGV4Q/u450RD4AaCaFvNPlg=="],

"@babel/code-frame": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="],
Expand Down Expand Up @@ -891,6 +894,8 @@

"fast-safe-stringify": ["[email protected]", "", {}, "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="],

"fast-xml-parser": ["[email protected]", "", { "dependencies": { "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-jbNkWiv2Ec1A7wuuxk0br0d0aTMUtQ4IkL+l/i1r9PRf6pLXjDgsBsWwO+UyczmQlnehi4Tbc8/KIvxGQe+I/A=="],

"fastq": ["[email protected]", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="],

"fd-slicer": ["[email protected]", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
Expand Down Expand Up @@ -1587,6 +1592,8 @@

"strip-json-comments": ["[email protected]", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="],

"strnum": ["[email protected]", "", {}, "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw=="],

"styled-components": ["[email protected]", "", { "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", "@types/stylis": "4.2.5", "css-to-react-native": "3.2.0", "csstype": "3.1.3", "postcss": "8.4.49", "shallowequal": "1.1.0", "stylis": "4.3.2", "tslib": "2.6.2" }, "peerDependencies": { "react": ">= 16.8.0", "react-dom": ">= 16.8.0" } }, "sha512-Mvf3gJFzZCkhjY2Y/Fx9z1m3dxbza0uI9H1CbNZm/jSHCojzJhQ0R7bByrlFJINnMzz/gPulpoFFGymNwrsMcw=="],

"stylis": ["[email protected]", "", {}, "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now=="],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"dependencies": {
"@astrojs/react": "^4.2.7",
"@astrojs/rss": "^4.0.13",
"@iconify-json/bi": "^1.2.4",
"@iconify-json/cil": "^1.2.2",
"@iconify-json/fluent": "^1.2.21",
Expand Down
6 changes: 6 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ import Navigation from "../components/Navigation.astro";
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>{title} | Amplifying F&#35;</title>
<link rel="icon" href="/favicon.ico?v4" />
<link
rel="alternate"
type="application/rss+xml"
title="Amplifying F# Blog"
href="/rss.xml"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
Expand Down
37 changes: 37 additions & 0 deletions src/pages/rss.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import rss from "@astrojs/rss";
import { getCollection } from "astro:content";

export async function GET(context) {
const blogs = await getCollection("blog");
const sessions = await getCollection("sessions");

const blogItems = blogs.map((post) => ({
title: post.data.title,
pubDate: post.data.date,
description: `A blog post by ${post.data.author}`,
author: post.data.author,
link: `/blog/${post.id}`,
categories: ["Blog"],
}));

const sessionItems = sessions.map((session) => ({
title: session.data.title,
pubDate: session.data.date,
description: `${session.data.preview} - Champion: ${session.data.champion}`,
author: session.data.champion,
link: `/sessions/${session.id}`,
categories: ["Session"],
}));

const allItems = [...blogItems, ...sessionItems].sort(
(a, b) => b.pubDate - a.pubDate,
);

return rss({
title: "Amplifying F#",
description: "Blog posts and sessions from the Amplifying F# community",
site: context.site,
items: allItems,
customData: `<language>en-us</language>`,
});
}