Skip to content

Fix duplicate mkdocs autorefs targets in generated reference pages#176

Merged
Alphaharrius merged 1 commit into
mainfrom
bugfix/mkdocs-autorefs
May 25, 2026
Merged

Fix duplicate mkdocs autorefs targets in generated reference pages#176
Alphaharrius merged 1 commit into
mainfrom
bugfix/mkdocs-autorefs

Conversation

@Alphaharrius

Copy link
Copy Markdown
Owner

See #174.

Summary

Precompute the full set of generated reference pages and use it when deciding which package re-exports to inline under "Exported API".

This avoids rendering symbols twice when they already have their own module or package reference page, which was causing mkdocs_autorefs warnings like:

  • Multiple primary URLs found for qten.abstracts.Convertible.convert
  • Multiple primary URLs found for qten.precision.set_precision

Behavior after this change:

  • Re-exports with their own generated reference page are skipped on the parent package page
  • Re-exports without their own page are still rendered under "Exported API"

Also verified the docs build succeeds with properdocs.yml and that no package re-export coverage is lost by the dedup logic.

Precompute the full set of generated reference pages and use it when deciding
which package re-exports to inline under "Exported API".

This avoids rendering symbols twice when they already have their own module or
package reference page, which was causing mkdocs_autorefs warnings like:

- Multiple primary URLs found for qten.abstracts.Convertible.convert
- Multiple primary URLs found for qten.precision.set_precision

Behavior after this change:
- Re-exports with their own generated reference page are skipped on the parent
  package page
- Re-exports without their own page are still rendered under "Exported API"

Also verified the docs build succeeds with properdocs.yml and that no package
re-export coverage is lost by the dedup logic.
@Alphaharrius Alphaharrius added this to the v0.4.2-qten milestone May 25, 2026
@Alphaharrius Alphaharrius requested a review from eyjafjallac May 25, 2026 13:17
@Alphaharrius Alphaharrius self-assigned this May 25, 2026
@Alphaharrius Alphaharrius added bug Something isn't working documentation Improvements or additions to documentation labels May 25, 2026

@eyjafjallac eyjafjallac left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@Alphaharrius Alphaharrius merged commit 566698c into main May 25, 2026
1 check passed
@Alphaharrius Alphaharrius deleted the bugfix/mkdocs-autorefs branch May 25, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mkdocs_autorefs duplicate primary URLs from generated package export pages

2 participants