From 3971c07b1abb9e39fc5987bf16658b44d304e13a Mon Sep 17 00:00:00 2001 From: AriaEdo Date: Thu, 12 Nov 2026 18:05:18 +0700 Subject: [PATCH] feat(changelog): source /changelog from the Mintlify docs changelog The docs changelog (datum-cloud/docs changelog.mdx, served at /docs/changelog) is the source of truth. /changelog now reads the same file instead of GitHub Discussions, so both pages always show the same entries. - Parse blocks into entries: the ## heading is the title, the description is the product, tags become labels, and docs-relative links are rewritten to /docs/... - Throw on any block that cannot be parsed so a format change in the docs repo surfaces as an error instead of silently dropped entries. - Cache the parsed entries for 20 minutes; failures are logged and not cached. - /changelog.md renders from the same source. - Show the product as an eyebrow above the title and move tags under the date, styled like the roadmap backlog badge. - Remove the stale 2025 markdown entries (index.md keeps page meta). - Add parser unit tests (npm run test:changelog). --- package.json | 3 +- src/components/changelog/Card.astro | 36 +++---- src/content/changelog/0.0.1.md | 20 ---- src/content/changelog/0.1.0.md | 21 ---- src/content/changelog/0.1.1.md | 27 ------ src/libs/changelogMdx.ts | 94 ++++++++++++++++++ src/libs/datum.ts | 108 ++++----------------- src/pages/changelog.md.ts | 43 +++----- src/static/styles/components-changelog.css | 22 ++--- tests/changelogMdx.test.ts | 93 ++++++++++++++++++ tests/e2e/changelog-search.spec.ts | 4 +- 11 files changed, 249 insertions(+), 222 deletions(-) delete mode 100644 src/content/changelog/0.0.1.md delete mode 100644 src/content/changelog/0.1.0.md delete mode 100644 src/content/changelog/0.1.1.md create mode 100644 src/libs/changelogMdx.ts create mode 100644 tests/changelogMdx.test.ts diff --git a/package.json b/package.json index 0074bd091..a5af754ae 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "test:e2e:ui": "playwright test --ui", "test:e2e:debug": "playwright test --debug", "test:e2e:report": "playwright show-report", - "test:server": "node --test tests/server.test.mjs" + "test:server": "node --test tests/server.test.mjs", + "test:changelog": "node --test tests/changelogMdx.test.ts" }, "dependencies": { "@alpinejs/collapse": "^3.17.1", diff --git a/src/components/changelog/Card.astro b/src/components/changelog/Card.astro index 522103cc7..a637d326f 100644 --- a/src/components/changelog/Card.astro +++ b/src/components/changelog/Card.astro @@ -69,6 +69,7 @@ function embedGithubVideos(html: string): string {