Uh oh!
There was an error while loading. Please reload this page.
fix: generate docs changelog from root CHANGELOG.md (GIT-87) - #24
Merged
Merged
Conversation
The docs site rendered apps/docs/content/docs/changelog.mdx, a hand-written duplicate last touched in February. It showed v1.0.2 as the newest release while npm was at 1.7.0 — seven minor versions and six months behind. Two failures kept it stale. The MDX was a second source of truth that nobody remembered to update, and deploy-docs.yml only triggered on apps/docs/** and src/tools/definitions.ts, so a release touching only CHANGELOG.md never redeployed the docs. changelog.mdx is now derived from root CHANGELOG.md by a generator wired into the docs build, matching how generate:tools and generate:llms already work. It runs before generate:llms so llms-full.txt picks up the current changelog too. CHANGELOG.md is added to the workflow's trigger paths so cutting a release deploys the site. The generated file stays committed, consistent with generate:tools output, and carries a do-not-edit notice. Verified: 37 versions generated (matching CHANGELOG.md exactly), Unreleased and link-reference definitions excluded, next build succeeds, /docs/changelog prerenders with v1.7.0 at the top and full history down to v0.1.0, no escape artifacts in the rendered HTML. Closes GIT-87 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Derives
apps/docs/content/docs/changelog.mdxfrom the rootCHANGELOG.mdat docs build time, instead of maintaining it by hand.apps/docs/scripts/generate-changelog.ts— parses rootCHANGELOG.md, drops the Keep a Changelog preamble and the[Unreleased]section, rewrites## [1.7.0] - 2026-08-07→## v1.7.0 (2026-08-07), strips trailing link-reference definitions, and escapes MDX-hazardous characters outside code spans and fences.apps/docs/package.json— addsgenerate:changelogand wires it intobuild. It runs beforegenerate:llmssollms-full.txtalso picks up the current changelog..github/workflows/deploy-docs.yml— addsCHANGELOG.mdto the trigger paths.The generated file stays committed, consistent with how
generate:toolsoutput is handled, and carries a do-not-edit notice.Why
https://gitmem.ai/docs/changelog/ has advertised v1.0.2 (2026-02-15) as the newest release while npm is at 1.7.0 — seven minor versions and roughly six months stale. The public changelog made an actively-developed project look abandoned, directly contradicting the version badge on the homepage.
Two independent failures kept it that way:
CHANGELOG.mdfaithfully (1.6.0 → 1.7.0 are all there). Nothing propagated that to the MDX the docs site actually builds from. The two files even used different heading formats, confirming no tooling ever connected them.apps/docs/**andsrc/tools/definitions.ts, so a release commit touching onlyCHANGELOG.mdnever fired a docs deploy — meaning even a manually-synced changelog would have sat unpublished.This makes drift structurally impossible rather than a thing to remember: the changelog regenerates on every docs build, and cutting a release now triggers that build.
How to Test
cd apps/docs && npm cinpm run generate:changelog— expect✅ changelog.mdx generated — 37 versions from CHANGELOG.mdgit diff --stat apps/docs/content/docs/changelog.mdx— confirm regeneration is idempotent against the committed filenpx next build— must succeed (this is what proves the MDX escaping is sound)out/docs/changelog/index.html— v1.7.0 at the top, history intact down to v0.1.0CHANGELOG.md, rerun step 2, confirm it appearsVerification performed
CHANGELOG.md[Unreleased]excludednext build/docs/changelogprerenders\{,\<) leaking into rendernpm run test:unitChecklist
npm run test:unitpasses — 1147 tests, 67 filesnpm run test:e2e— not run; this PR touches no tools or CLI code (docs build + workflow only)Note on test coverage
generate-changelog.tsships without a unit test. The repo has no existing test pattern forapps/docs/scripts/*(neithergenerate-tool-docs.tsnorgenerate-llms-txt.tsis covered), so I followed the local convention rather than introducing one unilaterally. The parsing is non-trivial enough to deserve coverage — happy to add a test for the heading rewrite,[Unreleased]exclusion, and MDX escaping if you'd prefer that before merge.Worth knowing: today's
CHANGELOG.mdcontains zero bare<and a single{, and that one is already inside a code span. The escaping is defensive for future entries, so it is currently unexercised by real content.Breaking Changes
None.
changelog.mdxis now generated — anyone hand-editing it will have their changes overwritten on the next docs build, which is the intent. The do-not-edit notice in the file header calls this out.Closes GIT-87
🤖 Generated with Claude Code