You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide/17-changelog.qmd
+27-18Lines changed: 27 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -7,33 +7,35 @@ tags: [Quality, GitHub]
7
7
8
8
# Changelog
9
9
10
-
Great Docs can automatically generate a Changelog page from your GitHub Releases. Each published release becomes a section on the page, with its title, date, body content, and a link back to the release on GitHub.
10
+
Users want to know what changed between versions, whether that's new features, bug fixes, or breaking changes. A well-maintained changelog builds trust and helps people decide when to upgrade. But keeping a separate changelog file in sync with your actual releases is tedious and error-prone.
11
+
12
+
Great Docs solves this by automatically generating a Changelog page from your GitHub Releases. Each published release becomes a section on the page, with its title, date, body content, and a link back to the release on GitHub. If you keep your release notes up to date on GitHub, your documentation site reflects them without any extra work.
11
13
12
14
## How It Works
13
15
14
16
When changelog generation is enabled (the default), `great-docs build` will:
15
17
16
-
1.**Detect your GitHub repository** – reads the `Repository` URL from `[project.urls]` in `pyproject.toml`
17
-
2.**Fetch releases** – calls the GitHub Releases API to retrieve published releases
18
-
3.**Generate the page** – writes a `changelog.qmd` file in the build directory with one section per release
19
-
4.**Add a navbar link** – adds a "Changelog" item to the site's top navigation bar
18
+
1.**Detect your GitHub repository**: reads the `Repository` URL from `[project.urls]` in `pyproject.toml`
19
+
2.**Fetch releases**: calls the GitHub Releases API to retrieve published releases
20
+
3.**Generate the page**: writes a `changelog.qmd` file in the build directory with one section per release
21
+
4.**Add a navbar link**: adds a "Changelog" item to the site's top navigation bar
20
22
21
-
The result is a fully rendered Changelog page that stays in sync with your GitHub Releases (no manual maintenance needed).
23
+
The result is a fully rendered Changelog page that stays in sync with your GitHub Releases. No manual maintenance is needed, and the page is regenerated on every build.
22
24
23
25
## Prerequisites
24
26
25
-
Your `pyproject.toml` must include a `Repository` URL pointing to GitHub:
27
+
For changelog generation to work, Great Docs needs to know where your repository lives. Your `pyproject.toml` must include a `Repository` URL pointing to GitHub:
If no GitHub URL is found, the changelog step is silently skipped.
34
+
If no GitHub URL is found, the changelog step is silently skipped and the build continues normally.
33
35
34
36
## Configuration
35
37
36
-
The changelog works out of the box with sensible defaults. To customize behavior, add a `changelog` section to `great-docs.yml`:
38
+
The changelog works out of the box with sensible defaults. You only need to add a `changelog` section to `great-docs.yml` if you want to change the behavior:
37
39
38
40
```{.yaml filename="great-docs.yml"}
39
41
changelog:
@@ -63,7 +65,7 @@ Releases are shown in reverse chronological order (newest first), so older relea
63
65
64
66
## Authentication
65
67
66
-
The GitHub API allows unauthenticated requests but with a low rate limit (60 requests/hour). For most projects this is fine, but if you hit rate limits, particularly in CI, set a GitHub token:
68
+
The GitHub API allows unauthenticated requests but with a low rate limit (60 requests/hour). For most projects this is sufficient because the changelog is only fetched once per build. If you hit rate limits (particularly in CI environments with many concurrent builds), set a GitHub token:
67
69
68
70
```{.bash filename="Terminal"}
69
71
export GITHUB_TOKEN=ghp_your_token_here
@@ -79,25 +81,29 @@ In GitHub Actions workflows, `GITHUB_TOKEN` is already available automatically.
79
81
80
82
## Standalone CLI Command
81
83
82
-
You can generate the changelog independently of a full build:
84
+
You can generate the changelog independently of a full build. This is useful for testing your release notes formatting or regenerating just the changelog without rebuilding the entire site:
83
85
84
86
```{.bash filename="Terminal"}
85
87
great-docs changelog
86
88
```
87
89
88
-
This is useful for testing or regenerating just the changelog. You can also override the max releases:
90
+
You can also override the max releases:
89
91
90
92
```{.bash filename="Terminal"}
91
93
great-docs changelog --max-releases 10
92
94
```
93
95
96
+
The output is written to the build directory, just as it would be during a full `great-docs build`.
97
+
94
98
## What Gets Included
95
99
100
+
Not all GitHub Releases appear on the changelog page. Here is how each release type is handled:
101
+
96
102
-**Published releases**: shown with their title, date, and body
97
103
-**Pre-releases**: included but marked with a "(Pre-release)" badge
98
104
-**Draft releases**: excluded (they aren't public yet)
99
105
100
-
The release body is rendered as Markdown, so any formatting, lists, headings, or code blocks in your GitHub Release notes carry through to the documentation site.
106
+
The release body is rendered as Markdown, so any formatting, lists, headings, or code blocks in your GitHub Release notes carry through to the documentation site. This means the changelog page looks just as rich as your release notes on GitHub.
101
107
102
108
## Generated Output
103
109
@@ -127,8 +133,12 @@ Here's an example of what a section looks like:
127
133
- Removed deprecated `old_function()`
128
134
```
129
135
136
+
The page is self-contained: readers can browse all release notes in one place without leaving your documentation site.
137
+
130
138
## Edge Cases
131
139
140
+
Great Docs is designed to handle common failure scenarios gracefully. The changelog is never a hard failure; the build always completes successfully.
141
+
132
142
| Scenario | Behavior |
133
143
|---|---|
134
144
| No GitHub URL in `pyproject.toml`| Changelog step is skipped silently |
@@ -137,12 +147,11 @@ Here's an example of what a section looks like:
In all cases, the build completes successfully (the changelog is never a hard failure).
141
-
142
150
## Next Steps
143
151
144
-
The changelog is fully automatic: Great Docs fetches your GitHub Releases, formats them into a navigable page, and rebuilds it on every build. If you keep your release notes up to date on GitHub, your documentation site reflects them without any extra work.
152
+
The changelog is fully automatic: Great Docs fetches your GitHub Releases, formats them into a navigable page, and regenerates it on every build. If you keep your release notes up to date on GitHub, your documentation site reflects them without any extra work.
145
153
146
-
-[Configuration](configuration.qmd) covers all available `great-docs.yml` options
154
+
-[Community Files](community-files.qmd) covers other auto-detected files like `CONTRIBUTING.md` and `ROADMAP.md`
147
155
-[Deployment](deployment.qmd) covers publishing your docs (including the changelog) to GitHub Pages
148
-
-[Link Checker](link-checker.qmd) explains how to validate links across your site
156
+
-[Link Checker](link-checker.qmd) validates that changelog links to GitHub are not broken
157
+
-[Configuration](configuration.qmd) covers all available `great-docs.yml` options
0 commit comments