-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add option to disable normalization of spec download URLs #402
Conversation
🦋 Changeset detectedLatest commit: 11d2f32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@ctreatma is attempting to deploy a commit to the Rohit Gohri's projects Team on Vercel. A member of the Team first needs to authorize it. |
packages/docusaurus-theme-redoc/src/theme/Redoc/ServerStyles.tsx
Outdated
Show resolved
Hide resolved
}) { | ||
const fullUrl = useBaseUrl(specProps.url, { absolute: true }); | ||
const fullUrl = specProps.normalizeUrl ? useBaseUrl(specProps.url, { absolute: true }) : specProps.url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember why I added absolute true, but thanks for keeping existing behaviour
packages/docusaurus-theme-redoc/src/theme/Redoc/ServerStyles.tsx
Outdated
Show resolved
Hide resolved
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This adds a
normalizeUrl
option to the spec options so that plugin users can opt out of the behavior to convert spec download URLs to absolute URLs, which makes it possible to build a self-contained site. For backwards compatibility, thenormalizeUrl
flag defaults to true.Fixes #400