# Fumadocs (Framework Mode, React Router): Changelog
URL: /docs/react-router/integrations/changelog
Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/(framework)/[framework]/integrations/changelog.mdx

Show the releases of your project.

## Installation [#installation]

Install the timeline component. It adds `@fumadocs/changelog` to your dependencies:

```npm
npx @fumadocs/cli@latest add changelog
```

## Usage [#usage]

Create a page under your [Home Layout](/docs/ui/layouts/home-layout). Fetch a page of entries, render them with `ChangelogTimeline`, and link to the other pages with `ChangelogPagination`:

```tsx tab="app/routes/changelog.tsx"
import type { Route } from './+types/changelog';
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { githubReleases } from '@fumadocs/changelog/github';
import { baseOptions } from '@/lib/layout.shared';
import { ChangelogPagination, ChangelogTimeline } from '@/components/changelog';

export async function loader({ params }: Route.LoaderArgs) {
  const page = Number(params.page ?? 1);
  const releases = await githubReleases({
    owner: 'fuma-nama',
    repo: 'fumadocs',
    token: process.env.GITHUB_TOKEN,
    page,
  });
  if (releases.entries.length === 0) throw new Response('Not Found', { status: 404 });

  return { page, ...releases };
}

export default function Page({ loaderData }: Route.ComponentProps) {
  const { page, entries, nextPage } = loaderData;

  return (
    <HomeLayout {...baseOptions()}>
      <div className="mx-auto flex w-full max-w-[900px] flex-col gap-10 px-4 py-12">
        <ChangelogTimeline entries={entries} />
        <ChangelogPagination
          newer={page > 1 ? `/changelog/${page - 1}` : undefined}
          older={nextPage ? `/changelog/${nextPage}` : undefined}
        />
      </div>
    </HomeLayout>
  );
}
```

```ts tab="app/routes.ts"
import { route, type RouteConfig } from '@react-router/dev/routes';

export default [
  // [!code ++]
  route('changelog/:page?', 'routes/changelog.tsx'),
] satisfies RouteConfig;
```

## Sources [#sources]

### GitHub Releases [#github-releases]

`githubReleases()` returns a page of the published releases of a repository, with `nextPage` when there are older releases.

- Versions are read from the release names like `fumadocs-ui@16.17.0`, or their tags.
- Entries have a `prerelease` property for pre-releases.
- GitHub limits unauthenticated requests to 60 per hour. Pass a `token` and cache the page.
- GitHub lists the first 1000 releases, or 10000 with a token. Later pages have no entries.

| Prop       | Type                  | Description                                                              |
| ---------- | --------------------- | ------------------------------------------------------------------------ |
| `owner`    | `string`              |                                                                          |
| `repo`     | `string`              |                                                                          |
| `token?`   | `string \| undefined` | GitHub access token, unauthenticated requests are limited to 60 per hour |
| `page?`    | `number \| undefined` | Page of releases, starting from 1 Default: `1`                           |
| `perPage?` | `number \| undefined` | Releases per page, up to 100 Default: `30`                               |
| `baseUrl?` | `string \| undefined` | Base URL of GitHub API Default: `'https://api.github.com'`               |

### Custom Entries [#custom-entries]

Entries are plain objects. Create them from any source:

| Prop        | Type                                                | Description                                   |
| ----------- | --------------------------------------------------- | --------------------------------------------- |
| `id`        | `string`                                            | unique, e.g. a release tag                    |
| `title`     | `string`                                            |                                               |
| `date`      | `Date`                                              |                                               |
| `versions?` | `{ name: string; version: string; }[] \| undefined` | released packages, like `fumadocs-ui@16.17.0` |
| `url?`      | `string \| undefined`                               | URL of the entry, e.g. a GitHub release       |
| `content?`  | `string \| undefined`                               | content in Markdown                           |

Entries go from the loader to the page as data, so write their content as Markdown in `content`, rather than as React nodes in `body`.