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

Variables available in templates #454

Open
hynek opened this issue Dec 5, 2022 · 0 comments
Open

Variables available in templates #454

hynek opened this issue Dec 5, 2022 · 0 comments

Comments

@hynek
Copy link
Member

hynek commented Dec 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant