This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow link hrefs with a scope query param
Closes #35 Closes #33 See gravitational/teleport#11383 Previously, the Link component would always set the "scope" query parameter in its href to the current value of DocsContext.scope. I wanted to make it possible to link to other scopes, allowing readers who are interested in another edition of Teleport to read content intended for that edition. We could add explicit links to different scopes in, for example, warnings at the top of scope-irrelevant pages or in introduction pages to sections that are only helpful for a specific Teleport edition (e.g., the Enterprise section). This change edits useNormalizedHref to add a "scope" value to the href's query if the input href has a "scope" key and the value is a valid scope name ("oss", "cloud", or "enterprise").
- Loading branch information