Skip to content

Use a wrapper A.tsx instead of ejecting A.tsx#331

Merged
jasikpark merged 2 commits intomainfrom
referer
Feb 27, 2026
Merged

Use a wrapper A.tsx instead of ejecting A.tsx#331
jasikpark merged 2 commits intomainfrom
referer

Conversation

@jasikpark
Copy link
Collaborator

@jasikpark jasikpark commented Feb 2, 2026

By default docusaurus adds noreferer to all links to "outside" sites, but we want to be able to see analytics between all *.defined.net sites. Followup to #330 which implemented an "ejected" version of this. See https://docusaurus.io/docs/swizzling#swizzling-process for more info.

"ejecting" has docusaurus make a copy of its source code and lets us edit it how we wish, then it uses that rewrite.
"wrapping" allows us to just import the default component, and customize its props / wrap it in other elements, which is simpler and easier to maintain across version upgrades.

@jasikpark jasikpark requested a review from bgolat February 2, 2026 17:32
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying docs-nebula with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e29789
Status: ✅  Deploy successful!
Preview URL: https://b0b83d88.docs-nebula.pages.dev
Branch Preview URL: https://referer.docs-nebula.pages.dev

View logs

@johnmaguire
Copy link
Member

Can you explain this change please? I see you are removing a class but I don't understand what impact it has on referers.

@jasikpark
Copy link
Collaborator Author

Can you explain this change please? I see you are removing a class but I don't understand what impact it has on referers.

Updated the description!

@jasikpark jasikpark merged commit 534556b into main Feb 27, 2026
4 checks passed
@jasikpark jasikpark deleted the referer branch February 27, 2026 21:10
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