Skip to content

Force canonical URLs to include ROS distro#6159

Open
attu0 wants to merge 1 commit intoros2:rollingfrom
attu0:fix-canonical-url-rolling
Open

Force canonical URLs to include ROS distro#6159
attu0 wants to merge 1 commit intoros2:rollingfrom
attu0:fix-canonical-url-rolling

Conversation

@attu0
Copy link

@attu0 attu0 commented Jan 13, 2026

Description

This PR fixes canonical URL generation for sphinx-multiversion builds by
explicitly setting html_baseurl to include the ROS distribution
(e.g. https://docs.ros.org/en/rolling).

This prevents mirrors or alternate build environments from generating
incorrect canonical URLs that omit the ROS distribution or use
non-official domains.

Fixes #6112.

Did you use Generative AI?

Yes — ChatGPT (for guidance and explanation only).

Additional Information

  • Implemented as a clean commit on top of rolling
  • No unrelated documentation history included

@attu0
Copy link
Author

attu0 commented Jan 13, 2026

@fujitatomoya Thanks for the guidance!

I’ve recreated the change as a clean commit on top of rolling and opened
a new PR targeting the rolling branch, as requested.

Copy link
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

This doesn't appear to fix the problem. Running make html with this patch The canonical urls aren't changed.

This is inside the sphinx multi version logic which is only going to trigger if you use sphinx multi version not the basic keys. RUnning this version the canonical urls arn't changed for make html.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Canonical URL generation logic can lead to incorrect mirror results

3 participants