changelog-cli icon indicating copy to clipboard operation
changelog-cli copied to clipboard

Create a table of contents in the CHANGELOG file

Open movermeyer opened this issue 4 years ago • 2 comments

Some projects have a table of contents at the top of their CHANGELOGs.

image

This allows readers to quickly jump to the version they are interested in.

Add some mechanism to request that changelog-cli autogenerate a table of contents?

movermeyer avatar Jan 08 '21 13:01 movermeyer

Showerthoughts:

  • Perhaps this could be added to the changelog by adding a --toc flag to the init command to indicate that you wanted a Table of Contents
  • After the table of contents exists, you wouldn't need to provide this flag. It would simply update the existing table of contents
  • I'd probably steal the algorithm for these from https://github.com/yzhang-gh/vscode-markdown, since theirs works well, and I already use that for a bunch of other Markdown projects.

movermeyer avatar Jan 17 '21 01:01 movermeyer

I like the idea of being able to turn on via a flag and keep it running via feature detection. I have a few projects that have gotten large enough or where we have had to keep non-linear histories where that could be very useful.

mc706 avatar Jan 17 '21 19:01 mc706