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

filip(fix): add redirect for testnets subgroup #592

Merged
merged 5 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,28 @@ const config: Config = {
locales: ['en'],
},

plugins: [['docusaurus-node-polyfills', { excludeAliases: ['console'] }]],
plugins: [
['docusaurus-node-polyfills', { excludeAliases: ['console'] }],
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/cardano-testnets/tools/faucet',
from: '/cardano-testnet/tools/faucet',
},
],
createRedirects(existingPath) {
if (existingPath.includes('/cardano-testnet')) {
return [
existingPath.replace('/cardano-testnet', '/cardano-testnets'),
]
}
return undefined // Return a falsy value: no redirect created
},
},
],
],

presets: [
[
Expand All @@ -39,7 +60,8 @@ const config: Config = {
routeBasePath: '/',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/input-output-hk/cardano-documentation',
editUrl:
'https://github.com/input-output-hk/cardano-documentation/blob/master/',
},
// blog: {
// showReadingTime: true,
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dependencies": {
"@ctrl/tinycolor": "^4.0.3",
"@docusaurus/core": "3.1.1",
"@docusaurus/plugin-client-redirects": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@emotion/core": "^10.0.22",
"@emotion/react": "^11.9.3",
Expand All @@ -33,6 +34,7 @@
"@mui/material": "^5.9.2",
"clsx": "^2.0.0",
"dayjs": "^1.11.9",
"docusaurus-node-polyfills": "^1.0.0",
"emotion": "^10.0.23",
"emotion-server": "^10.0.17",
"emotion-theming": "^10.0.19",
Expand All @@ -47,13 +49,12 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-google-recaptcha": "^3.1.0",
"react-hook-form": "^7.51.0",
"react-icons": "^5.0.1",
"react-tooltip": "^4.2.21",
"styled-components": "^4.4.1",
"styled-icons": "^9.0.1",
"victory": "^36.5.3",
"docusaurus-node-polyfills": "^1.0.0",
"react-tooltip": "^4.2.21",
"react-hook-form": "^7.51.0"
"victory": "^36.5.3"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.1",
Expand Down
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,21 @@
react-helmet-async "*"
react-loadable "npm:@docusaurus/[email protected]"

"@docusaurus/[email protected]":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.1.1.tgz#73feb15c2f3fe292d618f8a81e5194142f982ddb"
integrity sha512-J/1Z75XkO+BmUXHW17FrCIYZQ3b0IKaJECH6yCxW5RQ8NMMJ+SZCtPtx5oYoAd0VHersNiUu+ZAxfOqbsn1jKQ==
dependencies:
"@docusaurus/core" "3.1.1"
"@docusaurus/logger" "3.1.1"
"@docusaurus/utils" "3.1.1"
"@docusaurus/utils-common" "3.1.1"
"@docusaurus/utils-validation" "3.1.1"
eta "^2.2.0"
fs-extra "^11.1.1"
lodash "^4.17.21"
tslib "^2.6.0"

"@docusaurus/[email protected]":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.1.1.tgz#16f4fd723227b2158461bba6b9bcc18c1926f7ea"
Expand Down
Loading