Skip to content

[SITE] Auto-parse CHANGELOG.md for /releases page#167

Merged
EricCogen merged 2 commits intomainfrom
dx/releases-changelog-page
Apr 29, 2026
Merged

[SITE] Auto-parse CHANGELOG.md for /releases page#167
EricCogen merged 2 commits intomainfrom
dx/releases-changelog-page

Conversation

@EricCogen
Copy link
Copy Markdown
Owner

Auto-generate the releases page from CHANGELOG.md at build time instead of maintaining hardcoded release data.

What changed

  • New utility site/lib/parseChangelog.ts parses CHANGELOG.md at build time
  • Supports Keep a Changelog format (Added/Changed/Fixed/etc. sections)
  • Extracts version, date, tag, and auto-generates summaries
  • Releases page component now uses dynamic data instead of hardcoded array
  • Added /releases to sitemap with 0.8 priority

Why

Release notes were hardcoded in the releases page component, duplicating content from CHANGELOG.md. Any new release required manual updates to both files. This utility eliminates that duplication by extracting metadata at build time, keeping the page always in sync with the authoritative changelog.

Testing

  • Site builds successfully with parsed changelog
  • Releases page renders all versions (v2.1.1, v2.0.4, etc.)
  • All sections and entries parse correctly
  • TypeScript compiles without errors
  • No breaking changes to component props or markup

Side effects

None. The releases page component rendering is identical to before - this is purely a data source change from hardcoded to parsed.

EricCogen and others added 2 commits April 29, 2026 08:30
- Extract release parsing logic into parseChangelog utility
- Dynamically generate release entries from CHANGELOG.md instead of hardcoding
- Support Keep a Changelog format (Added/Changed/Fixed sections)
- Auto-tag latest release, extract version/date/summary metadata
- Add /releases entry to sitemap with monthly frequency and 0.8 priority
- Next rebuild will auto-populate page with all releases from CHANGELOG

Tests pass, site builds successfully with parsed data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Added auto-parsed releases page to [Unreleased] in CHANGELOG
- Updated HISTORY.md to note releases page as part of site SEO buildout
- Releases page eliminates manual changelog duplication
Copilot AI review requested due to automatic review settings April 29, 2026 12:34
@EricCogen EricCogen merged commit 4254ade into main Apr 29, 2026
9 of 11 checks passed
@EricCogen EricCogen deleted the dx/releases-changelog-page branch April 29, 2026 12:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Next.js marketing site to auto-generate the /releases page from the repo root CHANGELOG.md (Keep a Changelog format) at build time, removing the need to maintain a separate hardcoded releases dataset.

Changes:

  • Added site/lib/parseChangelog.ts to parse CHANGELOG.md into structured release/section/entry data.
  • Updated /releases page to use parseChangelog() output instead of a hardcoded releases array.
  • Added /releases to site/app/sitemap.ts and documented the milestone in HISTORY.md / CHANGELOG.md.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
site/lib/parseChangelog.ts New build-time changelog parser that outputs release metadata and sections for the site.
site/app/releases/page.tsx Swaps hardcoded release data for dynamic parsing from CHANGELOG.md.
site/app/sitemap.ts Adds /releases to the manually curated sitemap.
HISTORY.md Documents the releases page automation as a site milestone.
CHANGELOG.md Notes the new auto-parsed releases page behavior under Unreleased.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +69 to +82
// Match version header: ## [1.2.3] - YYYY-MM-DD or ## [Unreleased]
const versionMatch = trimmed.match(/^##\s+\[([^\]]+)\](?:\s+-\s+(\d{4}-\d{2}-\d{2}))?$/);
if (versionMatch) {
// Save previous release if any
if (currentVersion && allSections.length > 0) {
releases.push({
version: currentVersion,
date: currentDate,
tag: currentVersion === "Unreleased" ? "unreleased" : releases.length === 0 ? "latest" : "",
summary: generateSummary(allSections),
sections: allSections,
compareUrl: generateCompareUrl(currentVersion),
});
}
Comment on lines +74 to +78
releases.push({
version: currentVersion,
date: currentDate,
tag: currentVersion === "Unreleased" ? "unreleased" : releases.length === 0 ? "latest" : "",
summary: generateSummary(allSections),
Comment on lines +156 to +158
// Find the next version to create a comparison URL
// For now, use the tag-based comparison
return `https://github.com/EricCogen/GauntletCI/releases/tag/v${version}`;
],
},
];
const releases = parseChangelog();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants