Skip to content

Commit 5676fcd

Browse files
committed
docs: add missing version headers and improve CHANGELOG hierarchy
semantic-release config lacked headerPartial template, causing missing version/date/compare links. Group headers (##) and type headers (###) were at the same level as version headers (##), making hierarchy unclear. - Added headerPartial for automatic version header generation - Changed groups (Highlights/Maintenance) to h3, types (Features/Bug Fixes, etc.) to h4 - Manually applied new format to existing CHANGELOG
1 parent 54ee134 commit 5676fcd

2 files changed

Lines changed: 121 additions & 91 deletions

File tree

.releaserc.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
const mainTemplate = `{{#if noteGroups}}
1+
const headerPartial = `## {{#if linkCompare}}[{{version}}]({{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}){{else}}{{version}}{{/if}} ({{date}})
2+
`;
3+
4+
const mainTemplate = `{{> header}}
5+
6+
{{#if noteGroups}}
27
{{#each noteGroups}}
38
4-
### {{title}}
9+
#### {{title}}
510
611
{{#each notes}}
712
* {{text}}
@@ -10,10 +15,10 @@ const mainTemplate = `{{#if noteGroups}}
1015
{{/if}}
1116
1217
{{#if highlightGroups}}
13-
## 🎯 Highlights
18+
### 🎯 Highlights
1419
{{~#each highlightGroups}}
1520
16-
### {{title}}
21+
#### {{title}}
1722
1823
{{#each commits}}
1924
* {{#if scope}}**{{scope}}:** {{/if}}{{subject}}{{#if hash}} ([{{shortHash}}]({{@root.host}}/{{@root.owner}}/{{@root.repository}}/commit/{{hash}})){{/if}}
@@ -22,10 +27,10 @@ const mainTemplate = `{{#if noteGroups}}
2227
{{/if}}
2328
2429
{{#if maintenanceGroups}}
25-
## 🔧 Maintenance
30+
### 🔧 Maintenance
2631
{{~#each maintenanceGroups}}
2732
28-
### {{title}}
33+
#### {{title}}
2934
3035
{{#each commits}}
3136
* {{#if scope}}**{{scope}}:** {{/if}}{{subject}}{{#if hash}} ([{{shortHash}}]({{@root.host}}/{{@root.owner}}/{{@root.repository}}/commit/{{hash}})){{/if}}
@@ -103,6 +108,7 @@ export default {
103108

104109
return context;
105110
},
111+
headerPartial,
106112
mainTemplate,
107113
},
108114
},
@@ -111,6 +117,7 @@ export default {
111117
"@semantic-release/changelog",
112118
{
113119
changelogFile: "CHANGELOG.md",
120+
changelogTitle: "# Changelog",
114121
},
115122
],
116123
[

0 commit comments

Comments
 (0)