feat(frontend): prerender canonical URL for subpages #7401
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.
Motivation
I'm not entirely sure this is a strict requirement for a SPA, even if the pages are prerendered, since each page is behind a login screen and ultimately rendered with JavaScript. However, while reviewing a PR in Internet Identity, it crossed my mind that it might be more accurate to use a canonical URL - and correspondingly an
og:url- that reflects each subpage’s actual path rather than always pointing to the root. So, this PR introduces a similar change to what I just implemented for Juno (PR) and OISY (PR).Test
I tested the change locally, but it definitely needs to be verified the next time you deploy to any environment.
Notes
I'm really not certain this is necessary, so feel free to reject and close the PR if you don’t think it adds value.
Changes
og:urlafter build