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

Add option to disable normalization of spec download URLs #402

Merged
merged 8 commits into from
Mar 21, 2025

Conversation

ctreatma
Copy link
Contributor

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, the normalizeUrl flag defaults to true.

Fixes #400

Copy link

changeset-bot bot commented Mar 11, 2025

🦋 Changeset detected

Latest commit: 11d2f32

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
docusaurus-plugin-redoc Patch
docusaurus-theme-redoc Patch
redocusaurus Patch

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

Copy link

vercel bot commented Mar 11, 2025

@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.

}) {
const fullUrl = useBaseUrl(specProps.url, { absolute: true });
const fullUrl = specProps.normalizeUrl ? useBaseUrl(specProps.url, { absolute: true }) : specProps.url;
Copy link
Owner

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

Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
redocusaurus ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 6:49pm

@rohit-gohri rohit-gohri merged commit ba2bd9c into rohit-gohri:main Mar 21, 2025
4 of 5 checks passed
@github-actions github-actions bot mentioned this pull request Mar 21, 2025
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.

Can't specify a relative URL for download
2 participants