twisted / towncrier

Manage the release notes for your project.

Home Page:https://towncrier.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variables available in templates

hynek opened this issue · comments

This is a bit of a two part problem:

Firstly: I can't find any docs on what variables are available in changelog templates and what they mean. I would say that would belong somewhere into https://towncrier.readthedocs.io/en/latest/customization/index.html and the data is available here:

res = jinja_template.render(
render_title=render_title,
sections=data,
definitions=definitions,
underlines=underlines,
versiondata=versiondata,
top_underline=top_underline,
get_indent=get_indent, # simplify indentation in the jinja template.
)


Secondly: after reading that and finding what I needed (versiondata), it seems a bummer that variables that work in title_format don't work in templates. Since I want to write a smart template that does certain things if the versions is "UNRELEASED", I want to set my title myself. I think there should be symmetry here.