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

Add explicit link targets to releases in changelog #723

Closed
bhrutledge opened this issue Dec 26, 2020 · 5 comments · Fixed by #778
Closed

Add explicit link targets to releases in changelog #723

bhrutledge opened this issue Dec 26, 2020 · 5 comments · Fixed by #778

Comments

@bhrutledge
Copy link
Contributor

bhrutledge commented Dec 26, 2020

As a result of #683 (comment), I thought one way to make the release tags more useful would be to have a link to the changelog, e.g.

git tag -m "https://twine.readthedocs.io/en/latest/changelog.html#3.3.0" 3.3.0

However, the default towncrier template doesn't generate explicit targets, so right now the link to 3.3.0 is https://twine.readthedocs.io/en/latest/changelog.html#id1. Similar, the features for 3.3.0 is referenced by #features, but for 3.2.0 it's #id14.

Maybe this could/should be proposed as a change to towncrier, but thought I'd see if there was any appetite for it here.

@sigmavirus24
Copy link
Member

Eh, it could be helpful but I'm not sure if it is the best approach. I get that it'll display on the releases page, but I worry about readthedocs changing their domain again or switching to another docs service. Not a big deal, but this could be very useful to have in towncrier regardless.

@bhrutledge
Copy link
Contributor Author

bhrutledge commented Jan 2, 2021

Regardless of the git tag, I still think it would be handy to have direct links to releases in the rendered changelog. Some towncrier-based projects already have that:

They all have custom towncrier templates, but they don't seem to include explicit targets. That makes me wonder if there's a configuration that enables this behavior.

@bhrutledge bhrutledge changed the title Add explicit link targets to towncrier template Add explicit link targets to releases in changelog Jan 2, 2021
@sigmavirus24
Copy link
Member

Do you mean in the side navigation bar? That's handled by sphinx iirc with :toctree: options I think?

@bhrutledge
Copy link
Contributor Author

I mean URLs like this, which jump to directly to the changelog for a release: https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-23-2020-06-12

One observation is that those examples all have headings that begin with a letter, whereas Twine's start with a number. I wonder if that's it, since the IIRC id has to start with a letter. Maybe this could be resolved by using the title_format option to prepend a v...

@jaraco
Copy link
Member

jaraco commented Mar 1, 2021

Right - it's a Sphinx or Restructured text issue. It can't generate anchors for headings that begin with numbers. That's why I switched to v prefixes in skeleton projects.

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

Successfully merging a pull request may close this issue.

3 participants