Add canonical tags to API reference documentation #16398
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/pulumi/marketing/issues/1240
Adds canonical link tags to all 1,621 static HTML files in the API reference documentation to resolve Google Search Console duplicate content warnings.
The issue affected 34 URLs that were being indexed with query parameters (?iaid, ?__hstc, etc.) and with/without index.html, causing Google to flag them as duplicates without user-selected canonical URLs.
Created scripts/add-canonical-tags.js that automatically injects canonical tags during the documentation generation process. The script properly handles index.html files, converts relative canonical URLs to absolute, and is integrated into the Makefile generate target to run after TypeDoc/JavaDoc generation.
All generated HTML files now include proper canonical tags pointing to clean, absolute URLs.