An Astro changelog is a product updates page built from a Content Collection: each release is a Markdown file with a date, version and labels such as New, Improved and Fixed, rendered into a timeline at /changelog/, one page per entry, an RSS feed and a small JSON endpoint your app can read for a “What’s new” badge. It is static, fast, versioned in git next to your marketing site, and costs nothing to host.
Key Takeaways
- Model each release as a collection entry with
date,version,labelsand a shortsummary.- Render a timeline index plus one page per entry so each update has a linkable URL.
- Publish RSS for followers and a static
/changelog.jsonfor in-app notifications.- Pull entries from GitHub Releases with a build-time loader if engineers already write release notes there.
- Write for users: what changed and why it matters, not commit messages.
What a good changelog includes
A changelog serves three audiences: customers checking whether a fix shipped, prospects judging whether the product is alive, and your own team linking to “the post about that feature”. Each entry should have:
- A date, and a version if your product uses them.
- A plain-language title (“Bulk export for invoices”, not “feat: export v2”).
- One or more labels: New, Improved, Fixed, Deprecated.
- A short summary for the index and feeds, and an optional longer body with screenshots.
Step 1: Define the collection
npx astro add mdx
npm install @astrojs/rss
// src/content.config.ts
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
const changelog = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/changelog' }),
schema: ({ image }) =>
z.object({
title: z.string(),
date: z.coerce.date(),
version: z.string().regex(/^\d+\.\d+\.\d+$/).optional(),
labels: z.array(z.enum(['new', 'improved', 'fixed', 'deprecated'])).min(1),
summary: z.string().max(240),
cover: image().optional(),
draft: z.boolean().default(false),
}),
});
export const collections = { changelog };
---
# src/content/changelog/2026-10-28-bulk-export.md
title: Bulk export for invoices
date: 2026-10-28
version: 4.12.0
labels: [new, improved]
summary: Export up to 10,000 invoices as CSV or PDF in one go, and filter exports by customer.
---
You can now select invoices from the list and export them together...
## Also in this release
- Export jobs show progress in the notifications panel.
- **Fixed:** dates in CSV exports now respect your account time zone.
The labels enum stops typos like fix or New from creating a fifth label by accident. The Content Collections guide explains schemas and image fields.
Step 2: Build a label component
---
// src/components/ChangelogLabel.astro
interface Props { label: 'new' | 'improved' | 'fixed' | 'deprecated' }
const { label } = Astro.props;
const text = { new: 'New', improved: 'Improved', fixed: 'Fixed', deprecated: 'Deprecated' }[label];
---
<span class:list={['label', label]}>{text}</span>
<style>
.label { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; }
.new { background: #dcfce7; color: #166534; }
.improved { background: #dbeafe; color: #1e40af; }
.fixed { background: #fef3c7; color: #92400e; }
.deprecated { background: #fee2e2; color: #991b1b; }
</style>
Step 3: The changelog timeline
---
// src/pages/changelog/index.astro
import { getCollection } from 'astro:content';
import Base from '../../layouts/Base.astro';
import ChangelogLabel from '../../components/ChangelogLabel.astro';
const entries = (await getCollection('changelog', ({ data }) => !data.draft))
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
const fmt = new Intl.DateTimeFormat('en-US', { dateStyle: 'medium' });
---
<Base title="Changelog | Acme" description="Every new feature, improvement and fix shipped in Acme, newest first.">
<div class="mx-auto max-w-3xl px-6 py-16">
<h1 class="text-3xl font-bold">Changelog</h1>
<p class="mt-2 text-zinc-600">
New features, improvements and fixes. Follow via <a href="/changelog/rss.xml">RSS</a>.
</p>
<ol class="timeline mt-12">
{entries.map((entry) => (
<li class="grid gap-2 border-l border-zinc-200 pb-12 pl-6 md:grid-cols-[9rem_1fr] md:gap-8 md:border-0 md:pl-0">
<div class="text-sm text-zinc-500">
<time datetime={entry.data.date.toISOString()}>{fmt.format(entry.data.date)}</time>
{entry.data.version && <p>v{entry.data.version}</p>}
</div>
<article>
<div class="flex gap-2">
{entry.data.labels.map((label) => <ChangelogLabel label={label} />)}
</div>
<h2 class="mt-2 text-xl font-semibold">
<a href={`/changelog/${entry.id}/`}>{entry.data.title}</a>
</h2>
<p class="mt-2 text-zinc-600">{entry.data.summary}</p>
</article>
</li>
))}
</ol>
</div>
</Base>
Listing summaries rather than full bodies keeps the index scannable. If you prefer the full text inline (common for short changelogs), call render(entry) for each entry and output its Content component in the loop. For long histories, paginate with paginate() once the page passes roughly 50 entries; the Astro pagination component shows how.
Step 4: Entry pages
---
// src/pages/changelog/[id].astro
import { getCollection, render } from 'astro:content';
import { Image } from 'astro:assets';
import Base from '../../layouts/Base.astro';
import ChangelogLabel from '../../components/ChangelogLabel.astro';
export async function getStaticPaths() {
const entries = await getCollection('changelog', ({ data }) => !data.draft);
return entries.map((entry) => ({ params: { id: entry.id }, props: { entry } }));
}
const { entry } = Astro.props;
const { Content } = await render(entry);
---
<Base title={`${entry.data.title} | Acme changelog`} description={entry.data.summary}>
<article class="prose mx-auto max-w-3xl px-6 py-16">
<a href="/changelog/">All updates</a>
<div class="not-prose mt-6 flex gap-2">
{entry.data.labels.map((label) => <ChangelogLabel label={label} />)}
</div>
<h1>{entry.data.title}</h1>
<time datetime={entry.data.date.toISOString()}>{entry.data.date.toDateString()}</time>
{entry.data.cover && <Image src={entry.data.cover} alt="" widths={[640, 1280]} sizes="100vw" />}
<Content />
</article>
</Base>
Individual pages let support link “this was fixed on October 28” directly, and let notable launches rank for searches about the feature.
Step 5: RSS feed for followers
// src/pages/changelog/rss.xml.ts
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
import type { APIContext } from 'astro';
export async function GET(context: APIContext) {
const entries = (await getCollection('changelog', ({ data }) => !data.draft))
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
return rss({
title: 'Acme changelog',
description: 'New features, improvements and fixes in Acme.',
site: context.site!,
items: entries.map((entry) => ({
title: entry.data.title,
description: entry.data.summary,
pubDate: entry.data.date,
link: `/changelog/${entry.id}/`,
categories: entry.data.labels,
})),
});
}
Developers and customers who use feed readers or Slack RSS apps get updates without visiting the site. The RSS docs cover full-content feeds and autodiscovery links.
Step 6: A JSON endpoint for in-app “What’s new”
Your application can show a dot on a “What’s new” menu item when there are entries newer than the user last saw. A static JSON endpoint is all it needs.
// src/pages/changelog.json.ts
import { getCollection } from 'astro:content';
export async function GET() {
const entries = (await getCollection('changelog', ({ data }) => !data.draft))
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf())
.slice(0, 10)
.map((entry) => ({
id: entry.id,
title: entry.data.title,
date: entry.data.date.toISOString(),
labels: entry.data.labels,
url: `https://acme.example/changelog/${entry.id}/`,
}));
return new Response(JSON.stringify({ entries }), {
headers: { 'Content-Type': 'application/json' },
});
}
In a static build this is written to dist/changelog.json. If the app runs on another domain, allow it with a CORS header in your host’s headers file (for example, a _headers file on Cloudflare Pages or Netlify). In the app, compare entries[0].date with a “last seen” timestamp stored for the user.
Step 7: Import from GitHub Releases
If engineers already write release notes on GitHub, load them at build time instead of copying them. The GitHub REST API lists releases at /repos/{owner}/{repo}/releases.
// src/content.config.ts (GitHub Releases version)
const changelog = defineCollection({
loader: async () => {
const res = await fetch('https://api.github.com/repos/acme/acme/releases?per_page=50', {
headers: {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
},
});
const releases = await res.json();
return releases
.filter((r: any) => !r.draft && !r.prerelease)
.map((r: any) => ({
id: r.tag_name,
title: r.name || r.tag_name,
date: r.published_at,
version: r.tag_name.replace(/^v/, ''),
body: r.body ?? '',
}));
},
schema: z.object({
title: z.string(),
date: z.coerce.date(),
version: z.string(),
body: z.string(),
}),
});
Release bodies are Markdown, so render them with a Markdown library at build time, or keep the GitHub list for engineering detail and write a shorter, user-facing entry by hand for notable releases. Rebuild on each release with a GitHub Action that calls your host’s deploy hook.
Writing entries people read
- Lead with the user benefit: “Invoices export in one click” beats “Added bulk export endpoint”.
- One feature per entry for big launches; group small fixes in a weekly or per-version entry.
- Add a screenshot or short clip for visual changes, processed with
<Image />. - Link to docs for anything that needs setup.
- Mark breaking changes and deprecations clearly, with dates.
Deploy
The changelog lives in your Astro marketing site, so it deploys with it: npm run build, then Cloudflare Pages, Netlify or Vercel. See the static deploy docs for host settings and the official Astro endpoints docs for the JSON and RSS routes. If you’re building the surrounding site too, the SaaS marketing site tutorial covers pricing, customers and the layout, and the technology category holds Komal Nakrani’s product and SaaS themes.
FAQ
What is a product changelog?
A product changelog is a public, dated list of changes to a product: new features, improvements, fixes and deprecations. It shows customers what has shipped, gives support a page to link to, and signals to prospects that the product is actively developed.
How do I add a changelog to an Astro site?
Create a Content Collection for changelog entries with fields such as title, date, version and labels, then build an index page that sorts entries by date and a dynamic [id].astro route for individual entries. Add an RSS endpoint with @astrojs/rss so people can follow updates.
Can I generate a changelog from GitHub releases?
Yes. Write a Content Collection loader that fetches releases from the GitHub REST API at build time and maps each to an entry. Trigger a rebuild when a release is published, using a GitHub Action that calls your host’s deploy hook.
Should a changelog have separate pages for each update?
It helps. Individual pages give each update a shareable URL for support and social posts, and let significant launches rank in search. The index can still show summaries or the full text of each entry.
How do I show a “What’s new” badge in my app?
Publish a small JSON file from your Astro site, such as /changelog.json, with the latest entries and their dates. In the app, compare the newest date with the user’s last-seen timestamp and show a badge when it is newer.