Skip to content

"how we define contributors" link in output no longer resolves #121

Closed

Description

@minrk

Describe the bug

context

make linkcheck is failing since the latest release has changed the heading (back in #66), but not the link.

expectation

I expected github-activity to produce valid links

bug

But the URL doesn't resolve because it refers to a specific anchor derived from the heading text:

https://github-activity.readthedocs.io/en/latest/#how-does-this-tool-define-contributions-in-the-reports

where the current URL for that section is:

https://github-activity.readthedocs.io/en/latest/#how-we-define-contributors-in-the-reports

We should probably make the old anchor work if we can, to avoid breaking links in all existing docs built with this. I'm not sure if it's easy.

Reproduce the bug

  1. run github-activity
  2. visit the URL in the "our definition of contributors" link
  3. doesn't resolve the anchor

List your environment

No response

Activity

  1. added
    bug
    on Apr 14, 2025
  2. consideRatio commented on Apr 14, 2025

    @consideRatio
    Collaborator

    I think this remains an issue after #122, because the rendered docs doesn't include an anchor named like before just because we created an internal cross reference in #122 =/

  3. minrk commented on Apr 14, 2025

    @minrk
    CollaboratorAuthor

    Are you sure? I checked, and the https://github-activity.readthedocs.io/en/latest/#how-does-this-tool-define-contributions-in-the-reports links in e.g. the JupyterHub docs scoll to the section as I would expect.

    It doesn't rewrite the id of the heading itself or the heading link, but it does create an empty span with the crossref id under the heading:

    <section id="how-we-define-contributors-in-the-reports">
    <span id="how-does-this-tool-define-contributions-in-the-reports"></span>
    <h2>How we define contributors in the reports<a class="headerlink" href="#how-we-define-contributors-in-the-reports" title="Link to this heading">#</a></h2>
    ...

    so existing links will resolve to the right place.

    The JupyterHub test-docs checklinks are now passing again, too.

  4. consideRatio commented on Apr 14, 2025

    @consideRatio
    Collaborator

    Ahhhh sorry, I probably checked with a cached version of the page before, this works fine! I'm glad it is an option that works, thank you @minrk!!

    Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions