Skip to content

Conversation

@AlexDaines
Copy link
Contributor

@AlexDaines AlexDaines commented Nov 25, 2025

Description

  • Changes canonical URLs from index.html?page=X&tocid=Y to direct paths like items/S3/TS3Client.html
  • Adds <meta name="aws-tocid"> for redirect logic
  • Updates parentloader.js to read tocid from meta tag

Motivation and Context

Canonical URLs pointed to frameset with query params. Search engines saw mismatch between canonical and actual page URL, hurting indexing.

Testing

  • Built doc generator
  • Verified canonical URLs on class, namespace, and method pages
  • Confirmed redirect behavior preserved via meta tag

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project
  • I have read the README document
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@AlexDaines AlexDaines changed the base branch from main to development November 25, 2025 18:34
@GarrettBeatty GarrettBeatty requested a review from Copilot December 1, 2025 19:15
@GarrettBeatty
Copy link
Contributor

can you share the exact testing steps/validations/screenshots that you tested?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the documentation generator to fix canonical URL formatting for better search engine indexing. The change moves from query parameter-based URLs (index.html?page=X&tocid=Y) to direct path URLs (items/S3/TS3Client.html), while preserving frameset redirect functionality through a new meta tag.

Key Changes

  • Canonical URLs now point directly to documentation pages instead of frameset with query parameters
  • Added <meta name="aws-tocid"> tag to store the table of contents ID needed for redirect logic
  • Updated JavaScript redirect logic to read tocid from meta tag instead of parsing canonical URL

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docgenerator/SDKDocGeneratorLib/Writers/BaseWriter.cs Updated canonical URL format to use direct paths and added aws-tocid meta tag
docgenerator/SDKDocGeneratorLib/output-files/resources/parentloader.js Modified frameset redirect logic to read tocid from meta tag and construct URL from current pathname

}
//Else do nothing because the link doesn't appear to be in a normal URL format where the
//hostname ends with a / starting the relative URL path.
if (tocid && itemsIndex !== -1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

so what happens if we don't get into this if statement? we dont set the window.location.href? Is that ever a valid case?

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.

3 participants