Skip to content

Commit fafd34a

Browse files
committed
Improve Changelog docs and expand guidance
1 parent 97ce941 commit fafd34a

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

user_guide/17-changelog.qmd

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,35 @@ tags: [Quality, GitHub]
77

88
# Changelog
99

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.
1113

1214
## How It Works
1315

1416
When changelog generation is enabled (the default), `great-docs build` will:
1517

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
2022

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.
2224

2325
## Prerequisites
2426

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:
2628

2729
```{.toml filename="pyproject.toml"}
2830
[project.urls]
2931
Repository = "https://github.com/your-org/your-package"
3032
```
3133

32-
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.
3335

3436
## Configuration
3537

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:
3739

3840
```{.yaml filename="great-docs.yml"}
3941
changelog:
@@ -63,7 +65,7 @@ Releases are shown in reverse chronological order (newest first), so older relea
6365

6466
## Authentication
6567

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:
6769

6870
```{.bash filename="Terminal"}
6971
export GITHUB_TOKEN=ghp_your_token_here
@@ -79,25 +81,29 @@ In GitHub Actions workflows, `GITHUB_TOKEN` is already available automatically.
7981

8082
## Standalone CLI Command
8183

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:
8385

8486
```{.bash filename="Terminal"}
8587
great-docs changelog
8688
```
8789

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:
8991

9092
```{.bash filename="Terminal"}
9193
great-docs changelog --max-releases 10
9294
```
9395

96+
The output is written to the build directory, just as it would be during a full `great-docs build`.
97+
9498
## What Gets Included
9599

100+
Not all GitHub Releases appear on the changelog page. Here is how each release type is handled:
101+
96102
- **Published releases**: shown with their title, date, and body
97103
- **Pre-releases**: included but marked with a "(Pre-release)" badge
98104
- **Draft releases**: excluded (they aren't public yet)
99105

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.
101107

102108
## Generated Output
103109

@@ -127,8 +133,12 @@ Here's an example of what a section looks like:
127133
- Removed deprecated `old_function()`
128134
```
129135

136+
The page is self-contained: readers can browse all release notes in one place without leaving your documentation site.
137+
130138
## Edge Cases
131139

140+
Great Docs is designed to handle common failure scenarios gracefully. The changelog is never a hard failure; the build always completes successfully.
141+
132142
| Scenario | Behavior |
133143
|---|---|
134144
| 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:
137147
| GitHub API returns 404 | Warning printed; changelog skipped |
138148
| Network error | Warning printed; changelog skipped |
139149

140-
In all cases, the build completes successfully (the changelog is never a hard failure).
141-
142150
## Next Steps
143151

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.
145153

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`
147155
- [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

Comments
 (0)