From 3b89a79a671832738a192f2d3ad199812372d9a8 Mon Sep 17 00:00:00 2001 From: Filip Stoyanov Date: Wed, 1 May 2024 16:33:58 +0100 Subject: [PATCH 1/6] filip(feat): abstract redirects to separate file for easier management --- docusaurus.config.ts | 12 ++---------- redirects.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 redirects.js diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 3caec91e..2660addd 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -1,6 +1,7 @@ import { themes as prismThemes } from 'prism-react-renderer' import type { Config } from '@docusaurus/types' import type * as Preset from '@docusaurus/preset-classic' +import { redirects } from './redirects' const config: Config = { title: 'Cardano Docs', @@ -33,16 +34,7 @@ const config: Config = { [ '@docusaurus/plugin-client-redirects', { - redirects: [ - { - to: '/cardano-testnets/tools/faucet', - from: '/cardano-testnet/tools/faucet', - }, - { - to: '/release-notes/comp-matrix', - from: '/tools/comp-matrix', - }, - ], + redirects: redirects, createRedirects(existingPath) { if (existingPath.includes('/cardano-testnet')) { return [ diff --git a/redirects.js b/redirects.js new file mode 100644 index 00000000..83f1542b --- /dev/null +++ b/redirects.js @@ -0,0 +1,10 @@ +export const redirects = [ + { + to: '/cardano-testnets/tools/faucet', + from: '/cardano-testnet/tools/faucet', + }, + { + to: '/release-notes/comp-matrix', + from: '/tools/comp-matrix', + }, +] From c0326dab2d7a363f81460eb19d8e43a4e7553e10 Mon Sep 17 00:00:00 2001 From: Filip Stoyanov Date: Wed, 1 May 2024 16:55:45 +0100 Subject: [PATCH 2/6] filip(feat): add all redirects from spreadsheet --- redirects.js | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 300 insertions(+) diff --git a/redirects.js b/redirects.js index 83f1542b..7c0b62a4 100644 --- a/redirects.js +++ b/redirects.js @@ -7,4 +7,304 @@ export const redirects = [ to: '/release-notes/comp-matrix', from: '/tools/comp-matrix', }, + { + to: '/cardano-testnets/', + from: '/cardano-testnet/overview/', + }, + { + to: '/cardano-testnets/', + from: '/cardano-testnet/about/testnet-introduction/', + }, + { + to: '/cardano-testnets/getting-started', + from: '/cardano-testnet/getting-started/', + }, + { + to: '/cardano-testnets/local-testnet', + from: '/cardano-testnet/local-testnet/', + }, + { + to: '/cardano-testnet/tools/faucet/', + from: '/cardano-testnets/tools/faucet', + }, + { + to: '/cardano-testnets/resources', + from: '/cardano-testnet/resources/links/', + }, + { + to: '/cardano-testnets/support-feedback', + from: '/cardano-testnet/support-feedback/', + }, + { + to: 'https://developers.cardano.org/docs/get-started/installing-cardano-node', + from: '/development-guidelines/installing-the-cardano-node/', + }, + { + to: 'https://cardano-course.gitbook.io/cardano-course/video-lessons', + from: '/development-guidelines/cardano-node-course/', + }, + { + to: 'https://tests.cardano.intersectmbo.org/', + from: '/development-guidelines/node-tests/', + }, + { + to: 'https://docs.cardano.org/operating-a-stake-pool/monitoring', + from: '/development-guidelines/node-monitoring/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-cli?tab=readme-ov-file#overview-of-the-cardano-cli-repository', + from: '/development-guidelines/use-cli/', + }, + { + to: '/development-guidelines/transaction-tutorials/', + from: '/development-guidelines/transaction-tutorials/introduction/', + }, + { + to: '/operating-a-stake-pool/', + from: '/operating-a-stake-pool/stake-pool-operations-101/', + }, + { + to: '/operating-a-stake-pool/', + from: '/operating-a-stake-pool/creating-a-stake-pool/', + }, + { + to: '/operating-a-stake-pool/maintenance', + from: '/operating-a-stake-pool/public-stake-pools/', + }, + { + to: '/operating-a-stake-pool/metadata-management', + from: '/operating-a-stake-pool/smash/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-node?tab=readme-ov-file#overview-of-the-cardano-node-repository', + from: '/cardano-components/cardano-node/', + }, + { + to: 'https://github.com/cardano-foundation/cardano-graphql#overview', + from: '/cardano-components/cardano-graphql/', + }, + { + to: 'https://github.com/cardano-foundation/cardano-rosetta?tab=readme-ov-file#cardano-rosetta', + from: '/cardano-components/cardano-rosetta/about-cardano-rosetta/', + }, + { + to: 'https://github.com/cardano-foundation/cardano-rosetta/tree/master/docs', + from: '/cardano-components/cardano-rosetta/learn/', + }, + { + to: 'https://github.com/cardano-foundation/cardano-rosetta/tree/master/docs', + from: '/cardano-components/cardano-rosetta/get-started-rosetta/', + }, + { + to: 'https://github.com/cardano-foundation/cardano-rosetta/tree/master/docs', + from: '/cardano-components/cardano-rosetta/api-calls-rosetta/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-ledger#cardano-ledger', + from: '/cardano-components/cardano-ledger-specs/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-db-sync#cardano-db-sync', + from: '/cardano-components/cardano-db-sync/about-db-sync/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-db-sync?tab=readme-ov-file#architecture', + from: '/cardano-components/cardano-db-sync/db-sync-components/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-db-sync?tab=readme-ov-file#installation', + from: '/cardano-components/cardano-db-sync/db-sync-set-up/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-db-sync/tree/master/doc', + from: '/cardano-components/cardano-db-sync/best-practices/', + }, + { + to: 'https://github.com/input-output-hk/data-analytics-bigquery/wiki', + from: '/cardano-components/cardano-db-sync/big-query/', + }, + { + to: 'https://github.com/cardano-foundation/cardano-wallet#overview', + from: '/cardano-components/cardano-wallet/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/smash.md', + from: '/cardano-components/smash/', + }, + { + to: 'https://github.com/IntersectMBO/ouroboros-network#ouroboros-network', + from: '/cardano-components/ouroboros-network/', + }, + { + to: 'https://github.com/IntersectMBO/cardano-node/blob/master/cardano-tracer/docs/cardano-rtview.md', + from: '/cardano-components/cardano-rtview/', + }, + { + to: 'https://github.com/Emurgo/cardano-serialization-lib?tab=readme-ov-file#cardano-serialization-lib', + from: '/cardano-components/cardano-serialization-lib/', + }, + { + to: 'https://github.com/input-output-hk/daedalus', + from: '/cardano-components/daedalus-wallet/', + }, + { + to: 'https://beta.explorer.cardano.org/en/', + from: '/cardano-components/cardano-explorer/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/basics/introduction-sidechains/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/basics/ouroboros-description/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/basics/block-explorer/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/sidechain-toolkit/introduction/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/sidechain-toolkit/mainchain-plutus-scripts/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/sidechain-toolkit/chain-follower/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/sidechain-toolkit/committee-rotation/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/create-and-fund-accounts/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/metamask/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/deploy-smart-contracts/setup-development/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/deploy-smart-contracts/verify-contract/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/deploy-smart-contracts/solidity-resources/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/sidechain-token/', + }, + { + to: 'https://github.com/input-output-hk/sc-evm/blob/main/TECHNICAL_SPECIFICATION_v1.1.pdf', + from: '/cardano-sidechains/proof-of-concept-evm-sidechain/transferring-tokens/', + }, + { + to: '/development-guidelines/native-tokens', + from: '/native-tokens/learn/', + }, + { + to: 'https://cardano-ledger.readthedocs.io/en/latest/explanations/min-utxo-mary.html', + from: '/native-tokens/minimum-ada-value-requirement/', + }, + { + to: 'https://developers.cardano.org/docs/native-tokens/minting', + from: '/native-tokens/getting-started/', + }, + { + to: 'https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/native-tokens/03-exercises.md', + from: '/native-tokens/exercises/', + }, + { + to: 'https://cardano-ledger.readthedocs.io/en/latest/explanations/faq.html', + from: '/native-tokens/faqs/', + }, + { + to: 'https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/native-tokens/04-exchange-scenarios.md', + from: '/exchange-multi-asset-management-scenarios/', + }, + { + to: 'https://cardano-ledger.readthedocs.io/en/latest/explanations/listing.html', + from: '/listing-cardano-native-assets-on-an-exchange/', + }, + { + to: '/development-guidelines/smart-contracts/plutus', + from: '/smart-contracts/plutus/learn-about-plutus/', + }, + { + to: '/development-guidelines/smart-contracts/plutus', + from: '/smart-contracts/plutus/plutus-resources/', + }, + { + to: 'https://plutus.readthedocs.io/en/latest/simple-example.html', + from: '/smart-contracts/plutus/plutus-scripts/', + }, + { + to: 'https://plutus.readthedocs.io/en/latest/index.html', + from: '/smart-contracts/plutus/dapp-development/', + }, + { + to: 'https://plutus.readthedocs.io/en/latest/index.html', + from: '/smart-contracts/plutus/plutus-use-cases/', + }, + { + to: '/learn/collateral-mechanism', + from: '/smart-contracts/plutus/collateral-mechanism/', + }, + { + to: '/learn/transaction-costs-determinism', + from: '/smart-contracts/plutus/transaction-costs-determinism/', + }, + { + to: '/development-guidelines/smart-contracts/plutus', + from: '/smart-contracts/plutus/sc-best-practices/', + }, + { + to: '/development-guidelines/smart-contracts/plutus', + from: '/smart-contracts/plutus/sc-best-practices/', + }, + { + to: 'development-guidelines/smart-contracts/plutus', + from: '/smart-contracts/plutus/sc-best-practices/', + }, + { + to: '/development-guidelines/smart-contracts/plutus', + from: '/smart-contracts/plutus/sc-best-practices/', + }, + { + to: '/development-guidelines/smart-contracts/marlowe', + from: '/smart-contracts/marlowe/learn-about-marlowe/', + }, + { + to: '/development-guidelines/smart-contracts/aiken', + from: '/smart-contracts/aiken/learn-about-aiken/', + }, + { + to: 'https://cips.cardano.org/', + from: '/community/cips/', + }, + { + to: 'https://www.essentialcardano.io/', + from: '/community/essential-cardano/', + }, + { + to: 'https://cardano.stackexchange.com/', + from: '/community/cardano-stack-exchange/', + }, + { + to: 'https://cardano.org/ambassadors/', + from: '/community/ambassador-program/', + }, + { + to: 'https://iohk.zendesk.com/hc/en-us', + from: '/community/getting-support/', + }, ] From 91f769cdd981a12b2fbf86e7a56bdbd22c6d6dfe Mon Sep 17 00:00:00 2001 From: Filip Stoyanov Date: Wed, 1 May 2024 17:00:04 +0100 Subject: [PATCH 3/6] filip(fix): adjust redirect --- redirects.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/redirects.js b/redirects.js index 7c0b62a4..14b6e661 100644 --- a/redirects.js +++ b/redirects.js @@ -23,10 +23,6 @@ export const redirects = [ to: '/cardano-testnets/local-testnet', from: '/cardano-testnet/local-testnet/', }, - { - to: '/cardano-testnet/tools/faucet/', - from: '/cardano-testnets/tools/faucet', - }, { to: '/cardano-testnets/resources', from: '/cardano-testnet/resources/links/', From 97a82e242d7cee329fa046c3ee5fc4bce8c4bf50 Mon Sep 17 00:00:00 2001 From: Filip Stoyanov Date: Wed, 1 May 2024 17:05:32 +0100 Subject: [PATCH 4/6] filip(fix): fix redirects and remove redundancies --- redirects.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/redirects.js b/redirects.js index 14b6e661..e9f662a3 100644 --- a/redirects.js +++ b/redirects.js @@ -37,7 +37,7 @@ export const redirects = [ }, { to: 'https://cardano-course.gitbook.io/cardano-course/video-lessons', - from: '/development-guidelines/cardano-node-course/', + from: '/development-guidelines/cardano-node-course', }, { to: 'https://tests.cardano.intersectmbo.org/', @@ -263,18 +263,6 @@ export const redirects = [ to: '/development-guidelines/smart-contracts/plutus', from: '/smart-contracts/plutus/sc-best-practices/', }, - { - to: '/development-guidelines/smart-contracts/plutus', - from: '/smart-contracts/plutus/sc-best-practices/', - }, - { - to: 'development-guidelines/smart-contracts/plutus', - from: '/smart-contracts/plutus/sc-best-practices/', - }, - { - to: '/development-guidelines/smart-contracts/plutus', - from: '/smart-contracts/plutus/sc-best-practices/', - }, { to: '/development-guidelines/smart-contracts/marlowe', from: '/smart-contracts/marlowe/learn-about-marlowe/', From a5c0683ff296bf7d73ce6f19860d8d1df87fcac4 Mon Sep 17 00:00:00 2001 From: Filip Stoyanov Date: Wed, 1 May 2024 17:07:28 +0100 Subject: [PATCH 5/6] filip(fix): fix redirect --- redirects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redirects.js b/redirects.js index e9f662a3..e1af003c 100644 --- a/redirects.js +++ b/redirects.js @@ -273,7 +273,7 @@ export const redirects = [ }, { to: 'https://cips.cardano.org/', - from: '/community/cips/', + from: '/community/cips', }, { to: 'https://www.essentialcardano.io/', From f920f65f3c7dfd3442688ead048da001ee8f3e39 Mon Sep 17 00:00:00 2001 From: Filip Stoyanov Date: Wed, 1 May 2024 17:09:29 +0100 Subject: [PATCH 6/6] filip(fix): fix redirects --- redirects.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redirects.js b/redirects.js index e1af003c..1c84ef37 100644 --- a/redirects.js +++ b/redirects.js @@ -277,18 +277,18 @@ export const redirects = [ }, { to: 'https://www.essentialcardano.io/', - from: '/community/essential-cardano/', + from: '/community/essential-cardano', }, { to: 'https://cardano.stackexchange.com/', - from: '/community/cardano-stack-exchange/', + from: '/community/cardano-stack-exchange', }, { to: 'https://cardano.org/ambassadors/', - from: '/community/ambassador-program/', + from: '/community/ambassador-program', }, { to: 'https://iohk.zendesk.com/hc/en-us', - from: '/community/getting-support/', + from: '/community/getting-support', }, ]