-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
feat(v2): docs version banner configuration option #5052
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… instead of using "useActiveVersion" + global data
slorber
added
pr: new feature
This PR adds a new API or behavior.
pr: breaking change
Existing sites may not build successfully in the new version. Description contains more details.
labels
Jun 24, 2021
✔️ [V2] 🔨 Explore the source changes: 0feff47 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60d4a9f4ade8510008f1aba6 😎 Browse the preview: https://deploy-preview-5052--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5052--docusaurus-2.netlify.app/ |
Size Change: -40 B (0%) Total Size: 571 kB
ℹ️ View Unchanged
|
This was referenced Jun 29, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
Signed Facebook CLA
pr: breaking change
Existing sites may not build successfully in the new version. Description contains more details.
pr: new feature
This PR adds a new API or behavior.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking changes:
@theme/DocVersionSuggestions
component API modified, and component is renamed toDocVersionBanner
.@theme/DocVersionSuggestions
and@theme/DocItem
should probably be reswizzled/updatedMotivation
Fixes #3013
By default, we display a banner at the top of docs versions that are not the latest version, saying the version is either unreleased or unmaintained.
This is a problem for some sites that want to disable this banner.
Currently, the only solution is swizzle the banner component, which is a bit annoying for users.
This PR adds a new version config option so that the banner can be customized/disabled per-version.
This may not be the best API in case you want to disable the site on ALL banners at once, but is a good low-level first step enabling the user to disable banners without swizzling. We can introduce more APIs for that later.
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
tests