-
Notifications
You must be signed in to change notification settings - Fork 122
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
Markdown output support? #128
Comments
OK I'm curious: what happens if you just have |
lol, yeah that works. WOOPS |
Is this just a ... documentation issue now? |
I suppose! It'd be nice if I didn't have to set all the fields to get it to work with markdown, but it's not a big deal 🤷♀️ |
What's the status of Markdown support now, two years later? ;) |
@slurps-mad-rips Are you able to share your |
@timwsuqld it's located here and I haven't touched this project in a long time, and will most likely delete it at some point. |
@slurps-mad-rips Thanks for that. I eventually hacked together my own, and looking at yours we came to roughly the same place. For others trying to implement markdown, here is what I've got somewhat working. My setup has the release's as 2nd level headings, and so the category sections are 3rd level headings. I also put the issue number at the start of the changelog entry with a link to the issue. While this isn't strictly necessary (when viewed in Github/Gitlab it'll auto link), it makes the generated file more useful for us viewing outside of Gitlab/Github. .towncrier.template.md{% for section, _ in sections.items() %}
{%- if section %}{{section}}{% endif -%}
{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%}
### {{ definitions[category]['name'] }}
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
- {{ values|join(', ') }} {{ text }}
{% endfor %}
{% else %}
- {{ sections[section][category]['']|join(', ') }}
{% endif %}
{% if sections[section][category]|length == 0 %}
No significant changes.
{% else %}
{% endif %}
{% endfor %}
{% else %}
No significant changes.
{% endif %}
{% endfor %} [tool.towncrier]
filename = "CHANGELOG.md"
directory = "changelog/"
start_string = "# Changelog\n"
issue_format = "[#{issue}](https://gitlab.com/group/project/-/issues/{issue})"
underlines = ["", ""]
template = ".towncrier.template.md"
title_format = "## [{version}] - {project_date}" |
In towncrier 19.2.0 I get the title underline but in 21.3.0 I don't. 19.2.0:
21.3.0:
pyproject.toml: [tool.towncrier]
package = "ai.backend.manager"
filename = "CHANGELOG.md"
directory = "changes/"
title_format = "{version} ({project_date})"
template = "changes/template.md"
issue_format = "([#{issue}](https://github.com/lablup/backend.ai-manager/issues/{issue}))"
underlines = ["-", "", ""] template: link |
@achimnol change it like this: [tool.towncrier]
package = "ai.backend.manager"
filename = "CHANGELOG.md"
directory = "changes/"
- title_format = "{version} ({project_date})"
+ title_format = "# {version} ({project_date})"
template = "changes/template.md"
issue_format = "([#{issue}](https://github.com/lablup/backend.ai-manager/issues/{issue}))"
underlines = ["-", "", ""] |
@webknjaz Is this template already merged in master? Can I output .md out of the box? |
AFAI you can't output markdown out of the box. The default configuration is for RST. But, towncrier is flexible enough so that you can configure it to produce Markdown output. |
Hello,
I was wondering if a bit more support for Markdown might be possible? I've more or less successfully
trickedconvinced towncrier to output Markdown for my changelog file, however there's no way to change or enforce the H1 title output in this case. Right now to sort of get around it, I've done the following in my pyproject.toml:This (plus a slight change to the default template to make it more markdown friendly) then gets generated into
Which is uhhh, a terrible hack and makes me feel uncomfortable. I can try to submit a patch if you'd like, but I'm just curious if this is relevant to the project's goals.
The text was updated successfully, but these errors were encountered: