-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): added
latest
alias to redirect to latest version in place o…
…f version number. (#217) * feat(): introduced alias to redirect to latest version * fix(): routing of uninstall and uninstall-kubeslice file * feat(): redirected the ctaegory type routes * cleanup
- Loading branch information
1 parent
f17d231
commit 488150f
Showing
5 changed files
with
98 additions
and
2 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,31 @@ | ||
function uniquePath(path) { | ||
const segments = path?.split("/").filter(Boolean); | ||
for (let i = 0; i < segments.length; i++) { | ||
if (segments.length === 2 && segments[i] === segments[i + 1]) { | ||
return segments[0] + "/"; | ||
} | ||
} | ||
return path; | ||
} | ||
|
||
|
||
export function getValidPaths(items) { | ||
return items?.flatMap((item) => { | ||
const paths = []; | ||
|
||
if (item?.label) { | ||
if (item.label !== "Overview") { | ||
const formattedTitle = `category/${item?.label.toLowerCase().replace(/\s+/g, "-")}`; | ||
paths.push(formattedTitle); | ||
} | ||
} | ||
|
||
if (item?.items) { | ||
paths.push(...getValidPaths(item?.items)); | ||
} else if (typeof item === "string") { | ||
paths.push(uniquePath(item)); | ||
} | ||
|
||
return paths; | ||
}); | ||
} |
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 |
---|---|---|
|
@@ -1360,6 +1360,21 @@ | |
react-helmet-async "*" | ||
react-loadable "npm:@docusaurus/[email protected]" | ||
|
||
"@docusaurus/plugin-client-redirects@^3.4.0": | ||
version "3.4.0" | ||
resolved "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.4.0.tgz" | ||
integrity sha512-Pr8kyh/+OsmYCvdZhc60jy/FnrY6flD2TEAhl4rJxeVFxnvvRgEhoaIVX8q9MuJmaQoh6frPk94pjs7/6YgBDQ== | ||
dependencies: | ||
"@docusaurus/core" "3.4.0" | ||
"@docusaurus/logger" "3.4.0" | ||
"@docusaurus/utils" "3.4.0" | ||
"@docusaurus/utils-common" "3.4.0" | ||
"@docusaurus/utils-validation" "3.4.0" | ||
eta "^2.2.0" | ||
fs-extra "^11.1.1" | ||
lodash "^4.17.21" | ||
tslib "^2.6.0" | ||
|
||
"@docusaurus/plugin-content-blog@^3.4.0", "@docusaurus/[email protected]": | ||
version "3.4.0" | ||
resolved "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.4.0.tgz" | ||
|