From 36eba2f79129debccc6bf62f60b02ce2eac191ce Mon Sep 17 00:00:00 2001 From: dakuojas Date: Mon, 20 Apr 2026 13:25:47 +0530 Subject: [PATCH 1/4] init astrojs/rss --- package-lock.json | 90 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 2 files changed, 90 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 80bb2f2..251e124 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "ECL-2.0", "dependencies": { + "@astrojs/rss": "^4.0.18", "@astrojs/starlight": "^0.38.2", "astro": "^6.1.2", "mermaid": "^11.14.0", @@ -124,6 +125,17 @@ "node": ">=22.12.0" } }, + "node_modules/@astrojs/rss": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@astrojs/rss/-/rss-4.0.18.tgz", + "integrity": "sha512-wc5DwKlbTEdgVAWnHy8krFTeQ42t1v/DJqeq5HtulYK3FYHE4krtRGjoyhS3eXXgfdV6Raoz2RU3wrMTFAitRg==", + "license": "MIT", + "dependencies": { + "fast-xml-parser": "^5.5.7", + "piccolore": "^0.1.3", + "zod": "^4.3.6" + } + }, "node_modules/@astrojs/sitemap": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.2.tgz", @@ -1659,6 +1671,18 @@ "langium": "^4.0.0" } }, + "node_modules/@nodable/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3020,8 +3044,9 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "extraneous": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5072,6 +5097,42 @@ "fast-string-width": "^1.1.0" } }, + "node_modules/fast-xml-builder": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.5.tgz", + "integrity": "sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.1.3" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.1.tgz", + "integrity": "sha512-8Cc3f8GUGUULg34pBch/KGyPLglS+OFs05deyOlY7fL2MTagYPKrVQNmR1fLF/yJ9PH5ZSTd3YDF6pnmeZU+zA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "@nodable/entities": "^2.1.0", + "fast-xml-builder": "^1.1.5", + "path-expression-matcher": "^1.5.0", + "strnum": "^2.2.3" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -8441,6 +8502,21 @@ "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", "license": "MIT" }, + "node_modules/path-expression-matcher": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", + "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -9771,6 +9847,18 @@ "node": ">=6" } }, + "node_modules/strnum": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/style-to-js": { "version": "1.1.21", "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", diff --git a/package.json b/package.json index 6fce1ab..5d49210 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "stylelint:fix": "stylelint --fix '**/*.{astro,css}' -f verbose" }, "dependencies": { + "@astrojs/rss": "^4.0.18", "@astrojs/starlight": "^0.38.2", "astro": "^6.1.2", "mermaid": "^11.14.0", From dcb7cddc90104ebb45b57732c052040f950bd2d5 Mon Sep 17 00:00:00 2001 From: dakuojas Date: Wed, 22 Apr 2026 14:14:42 +0530 Subject: [PATCH 2/4] add feed for blog and docs --- src/pages/blog-feed.xml.js | 19 +++++++++++++++++++ src/pages/docs-feed.xml.js | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/pages/blog-feed.xml.js create mode 100644 src/pages/docs-feed.xml.js diff --git a/src/pages/blog-feed.xml.js b/src/pages/blog-feed.xml.js new file mode 100644 index 0000000..e1afbf8 --- /dev/null +++ b/src/pages/blog-feed.xml.js @@ -0,0 +1,19 @@ +import rss from '@astrojs/rss'; +import { getCollection } from 'astro:content'; + +export async function GET(context) { + const blog = await getCollection('blog'); + return rss({ + title: 'Blog', + description: 'Technical updates from ArchivesSpace developers', + site: context.site, + items: blog.map((post) => ({ + title: post.data.title, + pubDate: post.data.pubDate, + description: post.data.metaDescription, + // Compute RSS link from post `id` + // This example assumes all posts are rendered as `/blog/[id]` routes + link: `/blog/${post.id}/`, + })), + }); +} \ No newline at end of file diff --git a/src/pages/docs-feed.xml.js b/src/pages/docs-feed.xml.js new file mode 100644 index 0000000..9fd53e5 --- /dev/null +++ b/src/pages/docs-feed.xml.js @@ -0,0 +1,18 @@ +import rss from '@astrojs/rss'; +import { getCollection } from 'astro:content'; + +export async function GET(context) { + const blog = await getCollection('docs'); + return rss({ + title: 'TechDocs', + description: 'An ArchiveNaut\'s guide to the ArchivesSpace', + site: context.site, + items: blog.map((post) => ({ + title: post.data.title, + description: post.data.description, + // Compute RSS link from post `id` + // This example assumes all posts are rendered as `/[id]` routes + link: `/${post.id}/`, + })), + }); +} \ No newline at end of file From 6f1d1200eb827e4ffbc71dce9f292ce6ec00d5d3 Mon Sep 17 00:00:00 2001 From: dakuojas Date: Wed, 22 Apr 2026 15:06:45 +0530 Subject: [PATCH 3/4] prettier fix --- src/pages/blog-feed.xml.js | 14 +++++++------- src/pages/docs-feed.xml.js | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/pages/blog-feed.xml.js b/src/pages/blog-feed.xml.js index e1afbf8..64ab1bf 100644 --- a/src/pages/blog-feed.xml.js +++ b/src/pages/blog-feed.xml.js @@ -1,8 +1,8 @@ -import rss from '@astrojs/rss'; -import { getCollection } from 'astro:content'; +import rss from '@astrojs/rss' +import { getCollection } from 'astro:content' export async function GET(context) { - const blog = await getCollection('blog'); + const blog = await getCollection('blog') return rss({ title: 'Blog', description: 'Technical updates from ArchivesSpace developers', @@ -13,7 +13,7 @@ export async function GET(context) { description: post.data.metaDescription, // Compute RSS link from post `id` // This example assumes all posts are rendered as `/blog/[id]` routes - link: `/blog/${post.id}/`, - })), - }); -} \ No newline at end of file + link: `/blog/${post.id}/` + })) + }) +} diff --git a/src/pages/docs-feed.xml.js b/src/pages/docs-feed.xml.js index 9fd53e5..86d7fce 100644 --- a/src/pages/docs-feed.xml.js +++ b/src/pages/docs-feed.xml.js @@ -1,18 +1,18 @@ -import rss from '@astrojs/rss'; -import { getCollection } from 'astro:content'; +import rss from '@astrojs/rss' +import { getCollection } from 'astro:content' export async function GET(context) { - const blog = await getCollection('docs'); + const blog = await getCollection('docs') return rss({ title: 'TechDocs', - description: 'An ArchiveNaut\'s guide to the ArchivesSpace', + description: "An ArchiveNaut's guide to the ArchivesSpace", site: context.site, items: blog.map((post) => ({ title: post.data.title, description: post.data.description, // Compute RSS link from post `id` // This example assumes all posts are rendered as `/[id]` routes - link: `/${post.id}/`, - })), - }); -} \ No newline at end of file + link: `/${post.id}/` + })) + }) +} From 03a9b0946fbf0b2879194bc2ddafeb241ac4cff5 Mon Sep 17 00:00:00 2001 From: dakuojas Date: Mon, 27 Apr 2026 13:48:51 +0530 Subject: [PATCH 4/4] sane-r description --- src/pages/docs-feed.xml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs-feed.xml.js b/src/pages/docs-feed.xml.js index 86d7fce..4fec678 100644 --- a/src/pages/docs-feed.xml.js +++ b/src/pages/docs-feed.xml.js @@ -5,7 +5,7 @@ export async function GET(context) { const blog = await getCollection('docs') return rss({ title: 'TechDocs', - description: "An ArchiveNaut's guide to the ArchivesSpace", + description: 'Technical documentation from ArchivesSpace developers', site: context.site, items: blog.map((post) => ({ title: post.data.title,