Commit 5880139
authored
[jsdoc] Add per-release GitHub release-notes link to sidebar (#1551)
Add a "Release notes" link to the sidebar of each generated jsdoc release so developers browsing a version's API reference can jump straight to that release's notes for a quick overview of what changed.
- tmpl/layout.tmpl: derive the release-notes URL from the package.json `repository.url` (strip the `git+` prefix and `.git` suffix) and render a `brand-release-notes` link under the version badge, pointing at `<repo>/releases/tag/<version>`. Gated on the URL being resolvable, so the link is omitted when no repository is configured. Because the version is the release being documented, the link is always correct without extra logic, and reading the slug from package.json keeps forks/renames working.
- static/styles/jsdoc-default.css: add a `.brand-release-notes` style matching the sidebar accent color with an underline on hover.
Fix: #15501 parent 8aeafae commit 5880139
2 files changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
214 | 225 | | |
215 | 226 | | |
216 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
22 | 39 | | |
23 | 40 | | |
24 | 41 | | |
| |||
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
37 | 57 | | |
38 | 58 | | |
39 | 59 | | |
| |||
0 commit comments