Component
ChangelogTimeline
Turn git-cliff JSON into a release timeline with categories, stable dates, and links back to GitHub.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { ChangelogTimeline, compactGitCliffReleases, generateChangelogRss, type GitCliffRelease } from "@chitrank2050/monoline-ui/changelog"Basic usage
// 1. Generate release data with git-cliff:
// $ git cliff --context -o changelog.json
import {
ChangelogTimeline,
compactGitCliffReleases,
type GitCliffRelease,
} from "@chitrank2050/monoline-ui/changelog"
import rawChangelog from "./changelog.json"
// Helper function filters unreleased blocks and normalizes commit SHAs
const releases = compactGitCliffReleases(rawChangelog as unknown as GitCliffRelease[])
export default function ChangelogPage() {
return (
<ChangelogTimeline
releases={releases}
githubOwner="chitranklabs"
githubRepo="monoline-ui"
allowedGroups={["Features", "Bug Fixes", "Performance"]}
/>
)
}Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
ChangelogTimeline turns git-cliff structured JSON (GitCliffRelease[]) generated from conventional commits into an accessible vertical release feed with SHA, PR, and author links.
The data is a general event timeline or does not follow the GitCliffRelease schema (version, timestamp, commits array).
The timeline uses semantic release version headings, categorized commit lists, and keyboard-accessible links back to GitHub pull requests and commit diffs.
This component can render without adding a Monoline client boundary when its children and props are serializable.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
import {
ChangelogTimeline,
compactGitCliffReleases,
generateChangelogRss,
type GitCliffRelease,
} from "@chitrank2050/monoline-ui/changelog"
import rawChangelog from "./changelog.json"
/**
* 1. UI TIMELINE INTEGRATION:
* Helper function compactGitCliffReleases() cleans raw git-cliff JSON:
* - Filters out null unreleased version blocks
* - Normalizes commit IDs to 7-character short SHAs
* - Strips automated version bump commits
*/
const releasesData: GitCliffRelease[] = compactGitCliffReleases(
rawChangelog as unknown as GitCliffRelease[]
)
export function ChangelogView() {
return (
<section className="docs-page">
<header className="mb-6">
<h1 className="text-3xl font-bold font-mono">Changelog</h1>
<p className="text-text-muted">
Development log generated from conventional commits.
</p>
</header>
<ChangelogTimeline
releases={releasesData}
githubOwner="chitranklabs"
githubRepo="monoline-ui"
allowedGroups={[
"Features",
"Bug Fixes",
"Performance",
"Documentation",
"Maintenance",
]}
/>
</section>
)
}
/**
* 2. RSS FEED ROUTE HANDLER (e.g. app/docs/changelog/feed.xml/route.ts):
* Use generateChangelogRss() helper to serve an RSS 2.0 XML feed
*/
export async function getRssResponse(siteUrl: string) {
const xml = generateChangelogRss({
title: "Monoline UI Changelog",
description: "Release notes and version updates",
siteUrl,
changelogPath: "/docs/changelog",
releases: releasesData,
})
return new Response(xml, {
headers: {
"Content-Type": "application/xml; charset=utf-8",
"Cache-Control": "public, max-age=3600, s-maxage=86400",
},
})
}Related documentation
Compare related components or review the package and theme setup.