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

[CI] Ensure that every page has a canonical link #4492

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented May 15, 2024

Test pages

Look at the page source to ensure that the canonical link is appropriately set:

All pages have canonical link:

$ curl -s https://opentelemetry.io/docs/ | perl -nle 'print $& if /canonical"?\s+href=.*?>/i'
canonical href=https://opentelemetry.io/docs/>

The canonical_url param takes precedence:

$ curl -s https://opentelemetry.io/blog/2019/opentelemetry-governance-committee-explained/ | perl -nle 'print $& if /canonical"?\s+href=.*?>/i'
canonical href=https://medium.com/opentelemetry/opentelemetry-governance-committee-explained-860353baba0>

But zh pages need fixing still (it should refer to en page), this will be addressed via #4494:

$ curl -s https://opentelemetry.io/zh/docs/getting-started/ | perl -nle 'print $& if /canonical"?\s+href=.*?>/i'
canonical href=https://opentelemetry.io/zh/docs/getting-started/>

@chalin chalin added the CI/infra CI & infrastructure label May 15, 2024
@chalin chalin added this to the 24Q2 milestone May 15, 2024
@chalin chalin requested a review from a team as a code owner May 15, 2024 17:34
@chalin chalin merged commit fdd8422 into open-telemetry:main May 15, 2024
15 checks passed
@chalin chalin deleted the chalin-im-canonical-for-all-2024-05-15 branch May 15, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants