feat: Custom canonical tags
DESCRIBE YOUR PR
We've been asked to update some canonical tags, the request is documented here: https://docs.google.com/spreadsheets/d/1jaP6A53p09vxoCLMhaX2RcynERN3PE0AsIAOJYNwq44/edit?usp=sharing
The codebase didn't have the capability to add custom canonical tags, so I added it through Frontmatter data, and updated the canonicals of the urls in the document above.
To verify:
Go to https://sentry-docs-git-custom-canonical-tags.sentry.dev/platforms/javascript/guides/react/configuration/options/
and inspect, you'll see a canonical tag as follows:
<link rel="canonical" href="https://docs.sentry.io/platforms/javascript/configuration/options/">
Go to https://sentry-docs-git-custom-canonical-tags.sentry.dev/platforms/javascript/guides/react/session-replay/privacy/ and inspect and you'll see a canonical tag as follows:
<link rel="canonical" href="https://docs.sentry.io/platforms/javascript/session-replay/privacy/">
Notice the canonical urls are different from the page urls. This works for all the urls requested in the user doc.
Go to any other docs page on my preview branch, and you'll see the canonical tag is the same as the page url, which is expected behavior.
I saw Jest is in the codebase but didn't see any place where unit tests live, if I missed them let me know.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
- [ ] Urgent deadline (GA date, etc.):
- [X] Other deadline:
- [ ] None: Not urgent, can wait up to 1 week+
SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts)
- [ ] PR was reviewed and approved by a member of the Sentry docs team
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| changelog | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 28, 2024 6:19pm |
| develop-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 28, 2024 6:19pm |
| sentry-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 28, 2024 6:19pm |
Bundle Report
Changes will increase total bundle size by 539 bytes (0.0%) :arrow_up:. This is within the configured threshold :white_check_mark:
Detailed changes
| Bundle name | Size | Change |
|---|---|---|
| sentry-docs-server-cjs | 7.38MB | 548 bytes (0.01%) :arrow_up: |
| sentry-docs-edge-server-array-push | 333.11kB | 3 bytes (-0.0%) :arrow_down: |
| sentry-docs-client-array-push | 6.44MB | 6 bytes (-0.0%) :arrow_down: |