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

set pageurl through get_target_uri in StandaloneHTMLBuilder #9731

Merged
merged 3 commits into from
Oct 5, 2024

Conversation

lexming
Copy link
Contributor

@lexming lexming commented Oct 12, 2021

Subject: set pageurl through get_target_uri in StandaloneHTMLBuilder

Feature or Bugfix

  • Bugfix

Purpose

Fixes #9730

Detail

Suggestion to fix #9730 by using get_target_uri() to set the page URL instead of hard-coding the addition of file extension (out_suffix). The method get_target_uri() is already re-defined by DirectoryHTMLBuilder, doing the right thing independently of the builder.

@tk0miya tk0miya changed the base branch from 4.x to 5.x May 22, 2022 12:57
@AA-Turner AA-Turner changed the base branch from 5.x to master October 16, 2022 15:25
Copy link
Contributor

@benjaoming benjaoming left a comment

Choose a reason for hiding this comment

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

This could be a good simple fix. I looked at some workarounds and they seem to anticipate that pageurl behavior would be fixed. So fixing this should not break the workarounds.

@ericholscher
Copy link
Contributor

@AA-Turner This seems like a useful bug fix, if you have time to review it. Though I imagine also having a test would make it easier to merge, I do think this is causing real issues with canonical URLs.

@lexming
Copy link
Contributor Author

lexming commented Mar 23, 2023

If there is anything I can do on my side to get this merged, please let me know.

@AA-Turner AA-Turner added this to the some future version milestone Apr 29, 2023
# Conflicts:
#	sphinx/builders/html/__init__.py
@AA-Turner AA-Turner merged commit 1c7e006 into sphinx-doc:master Oct 5, 2024
23 checks passed
@lexming lexming deleted the canonical-dirhtml branch October 7, 2024 09:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DirHTML builder generates wrong canonical links
4 participants