Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H1 heading in default template #942

Open
kirrg001 opened this issue Sep 13, 2022 · 5 comments
Open

H1 heading in default template #942

kirrg001 opened this issue Sep 13, 2022 · 5 comments

Comments

@kirrg001
Copy link

Current Behavior

We are using the latest Lerna 5.5 version, which generates a CHANGELOG.md based on conventional commits.
But the generated CHANGELOG.md contains multiple H1 headings. I first raised the issue in Lerna, but they sent me here.

Lerna is using conventional-changelog-core internally.

Heading was already fixed in conventional-changelog:

But it looks like the default template is still using H1:
https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/templates/header.hbs

Expected Behavior

  • Features get H2
  • Patches get H3 (or even H2 too)

Thanks!

@kleinfreund
Copy link

kleinfreund commented Nov 2, 2022

Agreed. This is bugging me as well. Additionally it would be nice if there would always be an h1 at the start of the changelog file (e.g. # Changelog).

I just want to point out that the headings for versions should always be level 2 headings like so:

# Changelog

## 4.1.1

### Bug fixes

## 4.1.0

### Features

Headings for versions should not change in level depending on what kind of release it is because that leads to a broken outline. The following doesn't make sense -- the level 3 heading "4.1.1" structurally follows the level 1 heading "Changelog" so it skips a level without cause.

# Changelog

### 4.1.1

### Bug fixes

## 4.1.0

### Features

It's perhaps easier to visualize a document outline as a nested list (a table of contents if you will):

  • Changelog
    • 4.1.1
      • Bug fixes
    • 4.1.0
      • Features

Note how this structure makes it impossible to make 4.1.1 a third-level list because there isn't a second-level list it could belong to.

@kirrg001
Copy link
Author

@kleinfreund I will look into a fix for that and create a PR asap. Any hints for me?

@kirrg001
Copy link
Author

cc @armano2 Will you help reviewing a PR for this bug?

@kirrg001
Copy link
Author

cc @bcoe Looking for someone who is actively reviewing pull requests & doing releases for this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants