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

fix: SEO URL improvements #1409

Merged
merged 2 commits into from
Apr 4, 2023
Merged

fix: SEO URL improvements #1409

merged 2 commits into from
Apr 4, 2023

Conversation

shauke
Copy link
Collaborator

@shauke shauke commented Apr 3, 2023

PR Type

[x] Bugfix

What Is the New Behavior?

  • encode canonical link to match actual link URLs
  • improve matcher routing for SEO URLs (Products/categories or any other page with "pg" or "page" on the URL will request cms/page API #1387)
    • reordered check for routing matches to first check product routes then category routes and at the end content page routes (to be less eager to assume it is a content page)
    • replace all occurences of object markers (pg, prd, ctg) in slug data instead of only the first (to prevent unintended object markers with multiple occurences)
    • updated ts configuration to use the Angular 15 standard configuration of ES2022 for lib that includes replaceAll
      • replaceAll('pg', 'Pg') could be replaced by replace(/pg/g, 'Pg')

Does this PR Introduce a Breaking Change?

[x] No

Other Information

AB#85110

@shauke shauke added this to the 4.0 milestone Apr 3, 2023
@shauke shauke self-assigned this Apr 3, 2023
@shauke shauke force-pushed the feature/seo_improvements branch from afa4fab to 3f25d69 Compare April 4, 2023 09:20
shauke added 2 commits April 4, 2023 21:05
* reordered check for routing matches to first check product routes then category routes and at the end content page routes (to be less eager to assume it is a content page)
* replace all occurences of object markers (pg, prd, ctg) in slug data instead of only the first (to prevent unintended object markers with multiple occurences)
* updated ts configuration to use the Angular 15 standard configuration of `ES2022` for `lib` that includes `replaceAll`
- `replaceAll('pg', 'Pg')` could be replaced by `replace(/pg/g, 'Pg')`
@shauke shauke force-pushed the feature/seo_improvements branch from 3f25d69 to d7dd084 Compare April 4, 2023 19:28
@shauke shauke merged commit f952dc9 into develop Apr 4, 2023
@shauke shauke deleted the feature/seo_improvements branch April 4, 2023 19:37
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.

Products/categories or any other page with "pg" or "page" on the URL will request cms/page API
1 participant