-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Create stable URLs to changelogs #46
Comments
maxking
changed the title
Create predictable URLs to changelogs
Create stable URLs to changelogs
Mar 14, 2022
I like the idea of stable URLs to each version section. I haven't needed URLs within the sections, and that seems more involved, so would it be OK to skip that part? |
maxking
added a commit
to maxking/scriv
that referenced
this issue
Mar 14, 2022
Yeah, ofcourse. It isn't needed as much as for the section header itself. I've had frequent asks for stable section level urls from users. |
nedbat
added a commit
that referenced
this issue
Mar 18, 2022
* Add stable anchors for sections with versions. Fixes #46 * Use single line string with newlines * Update src/scriv/format_rst.py Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, scriv will generate rst sections for each version like
^ for an example from Scriv's docs. The URL for this is https://scriv.readthedocs.io/en/latest/changelog.html#id1, which is auto-generated by sphinx. The next time a new version is added,
#id1
will be assigned to the first section in the page, which will make the URL point to different version.In order to keep the anchors/urls consistent, scriv could add a simple anchor above the section
Also, url for each section within a single version is also changing continuously on version updates, https://scriv.readthedocs.io/en/latest/changelog.html#added for example points to the latest version's 'Added' section. The latter sections just using
#id<N>
This can perhaps be fixed by adding an anchor something like:
I realize that it is possible to do at least the former by updating the config_entry_title_template (although, it'd be nice if it was a part of the default template), but the latter requires some changes since it is added
scriv.format_rst.RstTools.format_sections
and doesn't currently have a template.I can open a PR with an implementation if you are open to it.
The text was updated successfully, but these errors were encountered: