diff --git a/articleRedirects.js b/articleRedirects.js new file mode 100644 index 00000000000..63e098568e3 --- /dev/null +++ b/articleRedirects.js @@ -0,0 +1,523 @@ +exports.articleRedirects = [ + { + from: '/develop/category/nodes/rest-api/messages', + to: '/apis/core/v1/submit-a-message', + }, + { + from: '/develop/category/nodes/rest-api/milestones', + to: '/apis/core/v1/look-up-a-milestone-by-a-given-milestone-index', + }, + { + from: '/develop/category/nodes/rest-api/node', + to: '/apis/core/v1/returns-the-health-of-the-node', + }, + { + from: '/develop/category/nodes/rest-api/peers', + to: '/apis/core/v1/get-information-about-the-peers-of-the-node', + }, + { + from: '/develop/category/nodes/rest-api/tangle', + to: '/apis/core/v1/returns-tips-that-are-ideal-for-attaching-a-message', + }, + { + from: '/develop/category/nodes/rest-api/utxo', + to: '/apis/core/v1/find-an-output-by-its-identifier', + }, + { + from: '/develop/endpoints/devnet', + to: '/build/networks-endpoints', + }, + { + from: '/develop/endpoints/mainnet', + to: '/build/networks-endpoints', + }, + { + from: '/develop/network-token-migration', + to: '/tips/tips/TIP-0017', + }, + { + from: '/develop/nodes/about-nodes', + to: '/maintain/welcome', + }, + { + from: '/develop/nodes/api_reference', + to: '/apis/welcome', + }, + { + from: '/develop/nodes/become-a-node-operator', + to: '/maintain/welcome', + }, + { + from: '/develop/nodes/explanations/nodes_101', + to: '/maintain/welcome', + }, + { + from: '/develop/nodes/explanations/security_101', + to: '/maintain/welcome', + }, + { + from: '/develop/nodes/node-software', + to: '/maintain/welcome', + }, + { + from: '/develop/tools', + to: '/build/tools', + }, + { + from: '/develop/welcome', + to: '/build/welcome', + }, + { + from: '/learn/about-iota/an-introduction-to-iota', + to: '/learn/protocols/introduction', + }, + { + from: '/learn/about-iota/coordinator', + to: '/learn/protocols/coordinator', + }, + { + from: '/learn/about-iota/data-transfer', + to: '/learn/protocols/stardust/core-concepts/output-features', + }, + { + from: '/learn/about-iota/energy-efficiency', + to: '/learn/protocols/chrysalis/introduction', + }, + { + from: '/learn/about-iota/messages', + to: '/tips/tips/TIP-0006', + }, + { + from: '/learn/about-iota/tangle', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/about-iota/value-transfer', + to: '/learn/protocols/stardust/core-concepts/output-features', + }, + { + from: '/learn/about-iota/why-is-iota-feeless', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/faqs', + to: '/get-started/faq', + }, + { + from: '/learn/iota-token/buying-iota', + to: '/get-started/introduction/iota/iota-token', + }, + { + from: '/learn/iota-token/staking-iota', + to: '/get-started/research-papers', + }, + { + from: '/learn/research/iota-devnet-wallet', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/research/research-outline', + to: '/get-started/research-papers', + }, + { + from: '/learn/research/research-papers', + to: '/get-started/research-papers', + }, + { + from: '/learn/use-cases/data-confidence', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/use-cases/eco-social-projects', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/use-cases/healthcare', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/use-cases/industry-applications', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/use-cases/mobility', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/use-cases/real-estate', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/learn/use-cases/trade-and-supply-chain', + to: '/get-started/introduction/iota/introduction', + }, + { from: '/shimmer', to: '/' }, + { + from: '/shimmer/cookie-policy', + to: '/cookie-policy', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/blocks', + to: '/apis/core/v2/submit-a-block', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/control', + to: '/apis/core/v2/prunes-the-node-database', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/milestones', + to: '/apis/core/v2/look-up-a-milestone-by-a-given-milestone-id', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/node', + to: '/apis/core/v2/returns-the-health-of-the-node', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/peers', + to: '/apis/core/v2/get-information-about-the-peers-of-the-node', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/tangle', + to: '/apis/core/v2/returns-tips-that-are-ideal-for-attaching-a-block', + }, + { + from: '/shimmer/develop/category/nodes/core-rest-api/utxo', + to: '/apis/core/v2/find-an-output-by-its-identifier', + }, + { + from: '/shimmer/develop/docs', + to: '/build/welcome', + }, + { + from: '/shimmer/develop/endpoints/shimmer', + to: '/build/networks-endpoints', + }, + { + from: '/shimmer/develop/endpoints/testnet', + to: '/build/networks-endpoints', + }, + { + from: '/shimmer/develop/explanations/protocol-tip', + to: '/learn/protocols/stardust/tips', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/clients', + to: '/build/welcome', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/introduction', + to: '/learn/protocols/stardust/introduction', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/layer-1-landscape', + to: '/learn/protocols/introduction', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/networks', + to: '/learn/protocols/introduction', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/nodes/about-nodes', + to: '/maintain/welcome', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/nodes/become-a-node-operator', + to: '/maintain/welcome', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/nodes/hornet', + to: '/hornet/welcome', + }, + { + from: '/shimmer/develop/explanations/what-is-shimmer/tokens-and-wallets', + to: '/get-started/introduction/shimmer/shimmer-token', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust', + to: '/learn/protocols/stardust/introduction', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/data-processing', + to: '/learn/protocols/stardust/core-concepts/output-features', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/dynamic-pow', + to: '/tips', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/output-features', + to: '/learn/protocols/stardust/core-concepts/output-features', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/protecting-users', + to: '/tips/tips/TIP-0020', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/rethink-utxo', + to: '/tips/tips/TIP-0020', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/sc-support', + to: '/learn/protocols/stardust/introduction', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/storage-deposit', + to: '/learn/protocols/stardust/core-concepts/storage-deposit', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/tokenization', + to: '/learn/protocols/stardust/core-concepts/multi-asset-ledger', + }, + { + from: '/shimmer/develop/explanations/what-is-stardust/unlock-conditions', + to: '/learn/protocols/stardust/core-concepts/output-unlock-conditions', + }, + { + from: '/shimmer/develop/how-tos/introduction', + to: '/iota-sdk/how-tos/introduction', + }, + { + from: '/shimmer/develop/how-tos/native-token/burn-tokens', + to: '/iota-sdk/how-tos/native-tokens/burn', + }, + { + from: '/shimmer/develop/how-tos/native-token/create-foundry', + to: '/iota-sdk/how-tos/native-tokens/create', + }, + { + from: '/shimmer/develop/how-tos/native-token/introduction', + to: '/iota-sdk/how-tos/native-tokens/create', + }, + { + from: '/shimmer/develop/how-tos/native-token/melt-tokens', + to: '/iota-sdk/how-tos/native-tokens/melt', + }, + { + from: '/shimmer/develop/how-tos/native-token/mint-tokens', + to: '/iota-sdk/how-tos/native-tokens/mint', + }, + { + from: '/shimmer/develop/how-tos/native-token/storage-deposits', + to: '/iota-sdk/how-tos/native-tokens/create', + }, + { + from: '/shimmer/develop/how-tos/nft/burn', + to: '/iota-sdk/how-tos/nfts/burn-nft', + }, + { + from: '/shimmer/develop/how-tos/nft/claim', + to: '/iota-sdk/how-tos/advanced-transactions/claim-transaction', + }, + { + from: '/shimmer/develop/how-tos/nft/introduction', + to: '/iota-sdk/how-tos/nfts/mint-nft', + }, + { + from: '/shimmer/develop/how-tos/nft/mint', + to: '/iota-sdk/how-tos/nfts/mint-nft', + }, + { + from: '/shimmer/develop/how-tos/nft/nft-as-a-wallet', + to: '/iota-sdk/how-tos/alias-wallet/transaction', + }, + { + from: '/shimmer/develop/how-tos/nft/nft-collections', + to: '/iota-sdk/how-tos/nfts/mint-nft', + }, + { + from: '/shimmer/develop/how-tos/nft/transfer', + to: '/iota-sdk/how-tos/nfts/send-nft', + }, + { + from: '/shimmer/develop/how-tos/output-features/metadata', + to: '/iota-sdk/how-tos/outputs/features', + }, + { + from: '/shimmer/develop/how-tos/output-features/sender', + to: '/iota-sdk/how-tos/outputs/features', + }, + { + from: '/shimmer/develop/how-tos/output-features/tag', + to: '/iota-sdk/how-tos/outputs/features', + }, + { + from: '/shimmer/develop/how-tos/output-unlock-conditions/expiration', + to: '/iota-sdk/how-tos/outputs/unlock-conditions', + }, + { + from: '/shimmer/develop/how-tos/output-unlock-conditions/storage-deposit-return', + to: '/iota-sdk/how-tos/outputs/unlock-conditions', + }, + { + from: '/shimmer/develop/how-tos/output-unlock-conditions/timelock', + to: '/iota-sdk/how-tos/outputs/unlock-conditions', + }, + { + from: '/shimmer/develop/how-tos/request-testnet-funds', + to: '/iota-sdk/how-tos/simple-transaction/request-funds', + }, + { + from: '/shimmer/develop/how-tos/seeds-accounts-and-addresses/accounts-and-addresses', + to: '/iota-sdk/explanations/accounts-and-addresses', + }, + { + from: '/shimmer/develop/how-tos/seeds-accounts-and-addresses/seed-mnemonics', + to: '/iota-sdk/how-tos/accounts-and-addresses/create-mnemonic', + }, + { + from: '/shimmer/develop/how-tos/simple-transfer', + to: '/iota-sdk/how-tos/simple-transaction', + }, + { + from: '/shimmer/develop/how-tos/verify_download', + to: '/introduction/stardust/how_tos/verify_download', + }, + { + from: '/shimmer/develop/nodes/api_reference', + to: '/apis/welcome', + }, + { + from: '/shimmer/develop/tools', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/shimmer/learn/coordinator', + to: '/learn/protocols/coordinator', + }, + { + from: '/shimmer/learn/data-and-value-transfer', + to: '/learn/protocols/stardust/core-concepts/multi-asset-ledger', + }, + { + from: '/shimmer/learn/dust-protection', + to: '/learn/protocols/stardust/core-concepts/multi-asset-ledger', + }, + { + from: '/shimmer/learn/glossary', + to: '/learn/glossary', + }, + { + from: '/shimmer/learn/maintenance', + to: '/learn/protocols/stardust/introduction', + }, + { + from: '/shimmer/learn/native-assets', + to: '/learn/protocols/stardust/core-concepts/multi-asset-ledger', + }, + { + from: '/shimmer/learn/outputs', + to: '/learn/protocols/stardust/core-concepts/output-features', + }, + { + from: '/shimmer/learn/role-of-token', + to: '/get-started/introduction/shimmer/shimmer-token', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-chains', + to: '/learn/smart-contracts/core_concepts/isc-architecture', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-community-tutorials', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-consensus', + to: '/learn/smart-contracts/core_concepts/smart-contracts', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-dapps', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-introduction', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-tangle', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-validators', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/learn/smart-contracts/smart-contracts-VM-and-languages', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/learn/tangle', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/shimmer/learn/token/buying', + to: '/get-started/introduction/iota/iota-token', + }, + { + from: '/shimmer/learn/welcome', + to: '/get-started/introduction/iota/introduction', + }, + { + from: '/shimmer/search', + to: '/search', + }, + { + from: '/shimmer/smart-contracts/configuration', + to: '/wasp/configuration', + }, + { + from: '/shimmer/smart-contracts/contribute', + to: '/smart-contracts/contribute', + }, + { + from: '/shimmer/smart-contracts/guide/example_projects/fair_roulette', + to: '/smart-contracts/guide/wasm_vm/example_projects/fair_roulette', + }, + { + from: '/shimmer/smart-contracts/metrics', + to: '/wasp/metrics', + }, + { + from: '/shimmer/smart-contracts/overview', + to: '/smart-contracts/overview', + }, + { + from: '/shimmer/use/wallets/firefly/faq-and-troubleshooting', + to: '/get-started/wallets/firefly', + }, + { + from: '/shimmer/use/wallets/firefly/general', + to: '/get-started/wallets/firefly', + }, + { + from: '/shimmer/use/wallets/firefly/user-guide-ledger', + to: '/get-started/wallets/firefly', + }, + { + from: '/shimmer/use/wallets/firefly/user-guide', + to: '/get-started/wallets/firefly', + }, + { + from: '/shimmer/use/wallets/what-is-a-wallet', + to: '/get-started/wallets/firefly', + }, + { + from: '/use/wallets/firefly/faq-and-troubleshooting', + to: '/get-started/wallets/firefly', + }, + { + from: '/use/wallets/firefly/general', + to: '/get-started/wallets/firefly', + }, + { + from: '/use/wallets/firefly/user-guide-ledger', + to: '/get-started/wallets/firefly', + }, + { + from: '/use/wallets/firefly/user-guide', + to: '/get-started/wallets/firefly', + }, + { + from: '/use/wallets/what-is-a-wallet', + to: '/get-started/wallets/firefly', + }, +]; diff --git a/docusaurus.config.js b/docusaurus.config.js index 59e16bd3fa7..fef819942df 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -3,6 +3,7 @@ const path = require('path'); const { create_doc_plugin, globStatic } = require('./src/utils/config'); const common = require('./common/docusaurus.config'); const contentConfigs = require('./contentPlugins'); +const articleRedirectsFile = require('./articleRedirects'); module.exports = async () => { const contentPlugins = await Promise.all( @@ -227,6 +228,111 @@ module.exports = async () => { }, }, ], + [ + '@docusaurus/plugin-client-redirects', + { + redirects: articleRedirectsFile.articleRedirects, + // directory redirects - only added for directories that didn't have a direct match + createRedirects(existingPath) { + const redirects = [ + { + from: '/develop/nodes/rest-api', + to: '/apis/core/v1', + }, + { + from: '/shimmer/chronicle', + to: '/chronicle/1.0.0-rc.1', + }, + { + from: '/shimmer/cli-wallet', + to: '/cli-wallet', + }, + { + from: '/shimmer/community', + to: '/community', + }, + { + from: '/shimmer/develop/nodes/core-rest-api', + to: '/apis/core/v2', + }, + { + from: '/shimmer/goshimmer', + to: '/goshimmer', + }, + { + from: '/shimmer/hornet', + to: '/hornet/2.0.0-rc.6', + }, + { + from: '/shimmer/identity.rs', + to: '/identity.rs/0.7', + }, + { + from: '/shimmer/introduction', + to: '/introduction/stardust', + }, + { + from: '/shimmer/iota-sdk', + to: '/iota-sdk', + }, + { + from: '/shimmer/iota.js', + to: '/iota.js', + }, + { + from: '/shimmer/iota.rs', + to: '/iota.rs/2.0.1-rc.7', + }, + { + from: '/shimmer/smart-contracts/guide/chains_and_nodes', + to: '/smart-contracts/guide/chains_and_nodes', + }, + { + from: '/shimmer/smart-contracts/guide/core_concepts', + to: '/learn/smart-contracts/core_concepts', + }, + { + from: '/shimmer/smart-contracts/guide/evm/compatibility', + to: '/smart-contracts/guide/evm/compatibility', + }, + { + from: '/shimmer/smart-contracts/guide/evm', + to: '/smart-contracts/guide/evm', + }, + { + from: '/shimmer/smart-contracts/guide/solo', + to: '/smart-contracts/guide/solo', + }, + { + from: '/shimmer/smart-contracts/guide/wasm_vm', + to: '/smart-contracts/guide/wasm_vm', + }, + { + from: '/shimmer/stronghold.rs', + to: '/stronghold.rs', + }, + { + from: '/shimmer/team', + to: '/team', + }, + { + from: '/shimmer/tutorials', + to: '/tutorials', + }, + { + from: '/shimmer/wallet.rs', + to: '/wallet.rs/1.0.0-rc.6', + }, + ]; + + for (const redirect of redirects) { + if (existingPath.includes(redirect.to)) { + return existingPath.replace(redirect.to, redirect.from); + } + } + }, + }, + ], ], stylesheets: [ {