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

feature request: list releases with second level headings #14

Closed
giocaizzi opened this issue Aug 20, 2022 · 7 comments
Closed

feature request: list releases with second level headings #14

giocaizzi opened this issue Aug 20, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@giocaizzi
Copy link

It would be amazing if there was a feature (possibly called with a command line argument) that would list releases as second level headings, possibly prepended by something like a "# Changelog" first level heading.

It would be useful when including the .md file in an index, without having all single releases showing up in the toctree.

I would contribute myself, but unfortunately i know very little of Go. Do you think this is worth implementing? Thanks 🚀

@rhysd
Copy link
Owner

rhysd commented Aug 22, 2022

Do you think this is worth implementing?

GitHub provides Markdown ToC in web UI. Personally it's sufficient for me. What is your use case?

https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/

image

I would contribute myself, but unfortunately i know very little of Go.

This feature looks easy for me. Once I understand reasonable use case, I would be able to implement it soon.

@giocaizzi
Copy link
Author

My use case is that I am using Sphinx to build a static html website for the documentation of a Python package. Without this feature the whole list of H1 headings would end up as being elements of the main table of contents of the website. Whereas being H2, they are not.

I have seen that you have already implemented it. Thanks 🚀

@rhysd
Copy link
Owner

rhysd commented Aug 26, 2022

I see. That looks nice use case to me. I'll consider to add an option to generate ToC.

@rhysd rhysd added the enhancement New feature or request label Aug 26, 2022
@rhysd
Copy link
Owner

rhysd commented Aug 26, 2022

@giocaizzi

At b0badff, I added -t flag. Running the following commands in this repository

cat <<-EOS > test.md
CHANGELOG
=========

## Releases

EOS

changelog-from-release -l 2 -t >> test.md

generate the following output:

https://gist.github.com/rhysd/186a723397431906d9491ab196143d04

Does it look good to you? I wonder date of release should be included in list item like - [v1.2.3](#v1.2.3) - Aug 26.

@rhysd
Copy link
Owner

rhysd commented Aug 26, 2022

I may misunderstand your use case. Is the ToC list generated by Sphinx (so it is not necessary to be done by changelog-from-release)?

@giocaizzi
Copy link
Author

Yes, the ToC is defined within Sphinx, so I just needed the possibility to choose the heading level.

With the last changes at #b0badff it will be possible to set the main title. Great, thanks!

@rhysd
Copy link
Owner

rhysd commented Aug 27, 2022

OK, thank you for the clarification. I'll revert the commit and close this issue.

@rhysd rhysd closed this as completed Aug 27, 2022
rhysd added a commit that referenced this issue Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants