-
-
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
Allow disabling or customizing the next version banner #3013
Comments
Hi again :) There are multiple things that we plan to do for versioning (see feedbacks here: #2302). One of them is to be able to use the next version as the "current version", ie for example the We could support customizing these banners, from the messages to the admonition type/color. For this message: This wouldn't be so straightforward because we need to "inject" the link in the user message template here, it has been requested that this link is "dynamic", ie this link on Is there a way we could improve this 2nd message in a generic way so that it fits your usecase, and would be a decent message for all usecases? One solution we could also use is to make a dedicated component for showing this banner, allowing you to swizzle it and customize easily. |
Hi @slorber!
In this specific case, no:
Yeah, I figured it could be involved. I am not familiar with the Swizzle approach (I saw it mentioned but never used it with D2 yet). a dedicated component sounds like a promising direction.
It really depends on what we want to tell the user. The current banner is telling the user: What I want to tell the user is more like: Not sure there is a single message that conveys both messages at the same time. |
This PR has some versioning related refactorings also relative to the banner: #2971 I'll extract this part as a dedicated component so that it can be more easily swizzled in isolation |
Hey all, this is feature is now released! (there's a new dedicated theme comp) |
🤗
Facebook has nice open-source mascots 😉
Le sam. 25 juil. 2020 à 02:52, Omry Yadan <[email protected]> a
écrit :
… https://twitter.com/Hydra_Framework/status/1286746227808165888
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3013 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFW6PRGQVNUAUR22YPIL4LR5IUGDANCNFSM4OLPCOMA>
.
|
Hydra and Slash are quiet unique. I don't think you will find any other projects with similar logos. |
Check this versioning related RFC: #3285 |
Would it be also possible to allow disabling or customizing the banner of past versions? The current message hints that past versions are not maintained anymore which can be wrong. In the case of FoalTS, past versions have a lifetime during which bugs and security holes are fixed even if no new features are added. I currently use this (hacky) workaround: .alert.alert--warning.margin-bottom--md {
display: none;
} |
for now the best is to swizzle the component and implement the UI you prefer In any case I'm not sure we'll be able to find a theme API surface that will satisfy all our users use-cases, so the solution we may find is likely a best effort to solve most common usecases |
Thank you for the tip. I was able to override the content with the following command (v2.0.0-alpha.69):
|
I've been trying to figure out how to remove the "next" version entirely - seems like maybe it was implemented but I cant find and docs mentioning it. Any tips on how to achieve this? @slorber |
This will be fixed in #5052 and beta.2 For now, we just introduce an API that permits to customize this banner on a per-version basis: const docsOptions = {
versions: {
current: {
banner: "none"
}
"1.0.0": {
banner: "none"
}
}
}; This may not be the simplest API in case you want to disable ALL the versions at once but should be good enough to not requiring swizzling anymore. We may add new APIs in the future, also may provide a way to define a custom banner/message. Let me know if the current API is still preventing you from doing what you want. Note: even if you can't provide labels directly through config, the hardcoded predefined labels for "unreleased" and "unmaintained" are configurable thanks to the i18n support (example translation key Note: there's a breaking change, as the existing |
There is an (previously called: |
@slorber is there by any chance a follow-up issue or some plan to implement setting the default for all versions or deactivating the banner overall? I couldn't find one and it doesn't seem to be part of #3285. |
@GPMueller yes we have configuration options to customize the banner for each versions independently (not a global docs config, but it's probably good enough). https://docusaurus.io/docs/versioning#configuring-versioning-behavior Also for more advanced use-cases we have extracted all this feature in |
I'm trying to change the text of the banner, I attempted Swizzling it, but I don't get many customisation options. Any help? |
It's my plan to allow more flexibility options in Docusaurus on various axis: navbar items, footer items, sidebar (docs+blog) items... and also docs version banner items. See also temp workaround for custom navbar items here: #7227 For now we only provide a limited set of hardcoded banner item types, but we'd like to provide custom version banner items that you can register and implement yourself. It's not clear to me how to help you considering you don't say what you want to achieve, but in any case, swizzling |
adding this |
🚀 Feature
v58 adds this banner:
I would like to either disable it or customize it to something like:
The text was updated successfully, but these errors were encountered: