Skip to Content
Vuesho

Changelog

A changelog from Markdown or GitHub Releases.

@vuesho/changelog serves a page of release notes at /changelog, newest first, with filters by package, date and text. The notes can be Markdown pages, the pages that Tegami writes for each release, or a repository's GitHub releases.

Setup

Install the Package

npm i @vuesho/changelog

Add the Notes

Put the notes in a separate folder, like content/changelog:

index.md
2026-11-20-sidebar.md

A collection reads the folder as a separate source, and changelogPlugin() takes the source's key. The notes need their own baseDir, since two sources can't both serve pages at the site root:

vuesho.config.ts
import { changelogPlugin } from "@vuesho/changelog";
import { createSite, recommendedPreset } from "vuesho/config";
import { defineCollections, defineDocs } from "vuesho/content";

const docs = defineDocs();
const changelog = defineCollections({ type: "doc", dir: "content/changelog" });

export default createSite({
  docs: docs.toSource(),
  changelog: changelog.toSource({ baseDir: "changelog" }), 
}).plugins(recommendedPreset(), changelogPlugin({ source: "changelog" }));

Hide the Notes From the Sidebar

!changelog in the root meta file hides the notes from the sidebar, but keeps their pages:

content/meta.json
{
  "pages": ["...", "!changelog"]
}

Write a Note

A note sets the release date, and each released package's version in packages:

content/changelog/2026-11-20-sidebar.md
---
title: Fix the hover state of the sidebar
date: 2026-11-20
packages:
  vuesho:
    version: 1.0.1
---

The hover color now matches the theme.

Open /changelog to see the notes. Each note also has a page, like /changelog/2026-11-20-sidebar.

Configuring the Changelog

changelogPlugin() adds a typed packages field to the notes' frontmatter, and a wrong shape fails the build. A note without a date shows first.

Frontmatter Schemas

If your collection has a frontmatter schema, leave packages out of it, since the plugin declares the field.

The notes can come from any content source, or from several. A note's date comes from the getPageCreatedAt hook, and its versions from the packages field in its data:

vuesho.config.ts
changelogPlugin({ source: ["changelog", "releases"] });

paths.index changes the page's URL, and false removes the page:

vuesho.config.ts
changelogPlugin({
  source: "changelog",
  paths: { index: "/releases" }, 
});

With Internationalization, each language has a changelog page, like /cn/changelog. When the notes come from a dynamic source, the page renders on request.

Customizing the UI

The page is the view changelog.index, which your theme can replace:

src/theme.ts
import { defineTheme } from "vuesho/theme";
import defaultTheme from "vuesho/theme/default";
import type app from "../vuesho.config";

export default defineTheme<typeof app>({
  extends: defaultTheme,
  views: { "changelog.index": () => import("./Changelog.vue") }, 
});

The view receives the notes in page.props.entries, and page.contentOf holds each note's body under its entry's id. ChangelogIndexView from @vuesho/changelog/ui renders the built-in page:

src/Changelog.vue
<script setup lang="ts">
import { ChangelogIndexView } from "@vuesho/changelog/ui";
import type { PageOf } from "vuesho/client";
import { HomeShell } from "vuesho/theme";
import type app from "../vuesho.config";

defineProps<{ page: PageOf<typeof app, "changelog.index"> }>();
</script>

<template>
  <HomeShell>
    <ChangelogIndexView :entries="page.props.entries" :page-size="20">
      <template #heading>Releases</template>
      <template #description>What changed in each version.</template>
      <template #body="{ entry }">
        <component :is="page.contentOf[entry.id]" v-if="page.contentOf[entry.id]" />
      </template>
    </ChangelogIndexView>
  </HomeShell>
</template>

To edit the components themselves, copy them into your project with vuesho add:

npx vuesho add components/layouts --from @vuesho/changelog

GitHub Releases

fetchGitHubReleases() fetches one page of a GitHub repository's published releases, for a custom page rendered on request, which needs a server. It reads versions like vuesho@1.0.0 from each release's name or tag. The notes render as Markdown with GFM, and their HTML shows as text.

Add the Stylesheet

Without changelogPlugin(), the site doesn't load the components' stylesheet, so add it with a plugin in your config:

vuesho.config.ts
createSite(docs.toSource()).plugins(
  recommendedPreset(),
  {
    name: "site:changelog",
    stylesheet: "@vuesho/changelog/css/changelog.css",
  },
);

Render the Releases

ChangelogTimeline shows the releases grouped by month, and ChangelogPagination links to the newer and older pages:

src/pages/changelog/[...page].vue
<script setup lang="ts">
import { fetchGitHubReleases, type ChangelogEntry } from "@vuesho/changelog";
import { ChangelogPagination, ChangelogTimeline } from "@vuesho/changelog/ui";
import { definePage } from "vuesho/client";
import { HomeShell } from "vuesho/theme";

definePage({
  data: { title: "Changelog" },
  props: async ({ params }) => {
    // `[...page]` also matches `/changelog`, as page 1.
    const page = Number(params.page.join("/") || 1);
    if (!Number.isInteger(page) || page < 1) return;
    const { entries, nextPage } = await fetchGitHubReleases({
      owner: "acme",
      repo: "acme",
      token: process.env.GITHUB_TOKEN,
      page,
    });
    if (entries.length === 0) return;
    return {
      entries,
      newer: page > 1 ? `/changelog/${page - 1}` : undefined,
      older: nextPage ? `/changelog/${nextPage}` : undefined,
    };
  },
});

defineProps<{ entries: ChangelogEntry[]; newer?: string; older?: string }>();
</script>

<template>
  <HomeShell>
    <div class="mx-auto flex w-full max-w-[900px] flex-col gap-8">
      <ChangelogTimeline :entries="entries" />
      <ChangelogPagination :newer="newer" :older="older" />
    </div>
  </HomeShell>
</template>

Rate Limits

GitHub allows 60 requests an hour without a token. To reuse the releases between requests, add a cache route rule.

Releases From Other APIs

ChangelogTimeline and ChangelogIndexView take entries from any API. To show an entry's notes, set their Markdown as the entry's content.

The timeline's body slot receives { entry } and renders instead of content:

Prop

Type

Options

changelogPlugin()

Prop

Type

fetchGitHubReleases()

Prop

Type