nedbat / scriv

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

Make md_header_level available to templates #96

Open DonalChilde opened 1 year ago

DonalChilde commented 1 year ago

If md_header_level was available as a template variable, then custom sub headers could be added to the entry_title_template.

e.g.

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

Note, I don't use jinja much, and the syntax might be bad for the above. But I'm sure that the "#" * md_header_level could be accomplished somehow.