-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cca27b
commit 8db9f91
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
64 changes: 64 additions & 0 deletions
64
website/patches/@docusaurus+theme-classic+2.0.0-alpha.69.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
diff --git a/node_modules/@docusaurus/theme-classic/lib/theme/DocVersionSuggestions/index.js b/node_modules/@docusaurus/theme-classic/lib/theme/DocVersionSuggestions/index.js | ||
index bc8baa7..b12bebf 100644 | ||
--- a/node_modules/@docusaurus/theme-classic/lib/theme/DocVersionSuggestions/index.js | ||
+++ b/node_modules/@docusaurus/theme-classic/lib/theme/DocVersionSuggestions/index.js | ||
@@ -18,58 +18,7 @@ const getVersionMainDoc = (version) => | ||
version.docs.find((doc) => doc.id === version.mainDocId); | ||
|
||
function DocVersionSuggestions() { | ||
- const { | ||
- siteConfig: {title: siteTitle}, | ||
- } = useDocusaurusContext(); | ||
- const {pluginId} = useActivePlugin({ | ||
- failfast: true, | ||
- }); | ||
- const {savePreferredVersionName} = useDocsPreferredVersion(pluginId); | ||
- const activeVersion = useActiveVersion(pluginId); | ||
- const { | ||
- latestDocSuggestion, | ||
- latestVersionSuggestion, | ||
- } = useDocVersionSuggestions(pluginId); // No suggestion to be made | ||
- | ||
- if (!latestVersionSuggestion) { | ||
- return <></>; | ||
- } // try to link to same doc in latest version (not always possible) | ||
- // fallback to main doc of latest version | ||
- | ||
- const latestVersionSuggestedDoc = | ||
- latestDocSuggestion ?? getVersionMainDoc(latestVersionSuggestion); | ||
- return ( | ||
- <div className="alert alert--warning margin-bottom--md" role="alert"> | ||
- { | ||
- // TODO need refactoring | ||
- activeVersion.name === 'current' ? ( | ||
- <div> | ||
- This is unreleased documentation for {siteTitle}{' '} | ||
- <strong>{activeVersion.label}</strong> version. | ||
- </div> | ||
- ) : ( | ||
- <div> | ||
- This is documentation for {siteTitle}{' '} | ||
- <strong>{activeVersion.label}</strong>, which is no longer actively | ||
- maintained. | ||
- </div> | ||
- ) | ||
- } | ||
- <div className="margin-top--md"> | ||
- For up-to-date documentation, see the{' '} | ||
- <strong> | ||
- <Link | ||
- to={latestVersionSuggestedDoc.path} | ||
- onClick={() => | ||
- savePreferredVersionName(latestVersionSuggestion.name) | ||
- }> | ||
- latest version | ||
- </Link> | ||
- </strong>{' '} | ||
- ({latestVersionSuggestion.label}). | ||
- </div> | ||
- </div> | ||
- ); | ||
+ return null | ||
} | ||
|
||
export default DocVersionSuggestions; |