nedbat / scriv

Changelog management tool
https://scriv.readthedocs.io
Apache License 2.0
260 stars 29 forks source link

link version headers like Keep a Changelog #8

Open brettcannon opened 4 years ago

brettcannon commented 4 years ago

https://keepachangelog.com/ has a neat thing where the version number gets linked to a diff view between versions.

nedbat commented 4 years ago

Huh, I had seen the version number in square brackets, and hadn't put it together that it was Markdown reference-style link. I think I've seen changelogs that used the brackets, but didn't make them links, but I can't find any now...

Yes, this is a cool feature. I think I would make the link more explicit, but it's a good idea.

brettcannon commented 4 years ago

Yeah, I totally overlooked it initially as well, thinking it was a style thing. 😄

DonalChilde commented 1 year ago

I also like that format, and I was able to get it using a custom entry_title_template:

{% if version %}[{{ version }}](https://github.com/_user_/_project_/compare/_previous_version_tag_...{{version}}) — {% endif %} {{ date.strftime('%Y-%m-%d') }}
{{"\n"}}
Whats Changed in {{version}}

where user and project are handled in my cookiecutter project setup, and I manually correct the previous version tag for each scriv collect.