DOC-3497 - Fix self-referencing canonical URLs via page-aliases on v8#4126
DOC-3497 - Fix self-referencing canonical URLs via page-aliases on v8#4126kemister85 wants to merge 1 commit intotinymce/8from
Conversation
Add page-aliases to 14 v8 pages that were renamed from v5/v6, allowing Antora to resolve the correct canonical URL for older versions.
MitchC1999
left a comment
There was a problem hiding this comment.
Glad this worked! Do we need to do the same for 6 or 7?
No, One thing to note: these aliases need to be carried forward whenever a new major version branch is created (e.g. |
That should be fine by default since each major is branched from the previous. I was just asking since I can navigate to |
Good point that branching handles the carry-forward naturally. On the version selector, unfortunately page-aliases don't connect versions in the page version selector (Antora explicitly documents this limitation). They only handle redirects and canonical URL resolution. The version selector only links pages that share the same page ID (filename) across versions, so v5's Adding react-cloud as an alias on v5 would create a redirect from Personally I don't think that's worth the added complexity. |
Ticket
DOC-3497 / TINY-14151
Site
Inspect this page
Notice it points to
<link rel="canonical" href="https://www.tiny.cloud/docs/tinymce/latest/react-cloud/">which is expected.then inspect this 5/react notice it now points to
<link rel="canonical" href="https://www.tiny.cloud/docs/tinymce/latest/react-cloud/">and not<link rel="canonical" href="https://www.tiny.cloud/docs/tinymce/5/react/">Changes
Adds
:page-aliases:to 14 pages on thetinymce/8branch to claim the old page IDs from v5/v6. This allows Antora to resolve the correct canonical URL for older versions that were renamed or restructured in v6+.Without these aliases, Antora cannot match the old page IDs to their v8 equivalents and falls back to self-referencing canonicals — causing Google to treat legacy pages as authoritative.
Framework integrations (8 pages):
react-cloud.adocclaimsreact.adocvue-cloud.adocclaimsvue.adocsvelte-cloud.adocclaimssvelte.adocwebcomponent-cloud.adocclaimswebcomponent.adocrails-cloud.adocclaimsrails.adocdjango-cloud.adocclaimsdjango.adocbootstrap-cloud.adocclaimsbootstrap.adoclaravel-tiny-cloud.adocclaimslaravel.adocPlugin/feature pages (6 pages):
copy-and-paste.adocclaimspaste.adoccloud-quick-start.adocclaimsquick-start.adocspelling.adocclaimsspellchecker.adocnon-editable-content-options.adocclaimsnoneditable.adocadvanced-templates.adocclaimstemplate.adocexportpdf.adocclaimsexport.adocEach change is a single
:page-aliases:line addition; no content changes.Note: The canonical fix requires a full multi-version build (v5 + v6 + v8) to verify — single-branch staging previews will show self-referencing canonicals regardless. Verify on production after merge by checking the
<link rel="canonical">tag on e.g./docs/tinymce/5/react/.Replaces: #4118 (v5) and #4119 (v6) — the
page-aliasesapproach on v8 fixes canonicals for all older versions from a single branch.Ref: Antora canonical URL docs