Files
nym/documentation/docs/next.config.js
T
mfahampshire 7c890ea0c5 TS SDK docs (#6840)
* First sweep packages + some minor tweaking

* Second sweep

* Regenerate lockfile + package.json mods

* Regenerate lockfile again

* Fix CI

* Fix CI again

* All building properly

* unblock

* Tweak examples

* Comments + readme + fix rotten unit test

* First pass docs

* Big pass

* Massive pass on new docs

* Update integrations.md w mobile

* Partial overhaul review

* new playground + big pass

* new fix lychee err

* IPR notice tweak
2026-06-09 13:31:08 +00:00

1506 lines
46 KiB
JavaScript

// const path = require('path');
// const CopyPlugin = require('copy-webpack-plugin');
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});
const nextra = withNextra();
nextra.webpack = (config, options) => {
// generate Nextra's webpack config
const newConfig = withNextra().webpack(config, options);
newConfig.module.rules.push({
test: /\.txt$/i,
use: "raw-loader",
});
// TODO: figure out how to properly bundle WASM and workers with Nextra
// newConfig.plugins.push(
// new CopyPlugin({
// patterns: [
// {
// from: path.resolve(path.dirname(require.resolve('@nymproject/mix-fetch/package.json')), '*.wasm'),
// to: '[name][ext]',
// context: path.resolve(__dirname, 'out'),
// },
// {
// from: path.resolve(path.dirname(require.resolve('@nymproject/mix-fetch/package.json')), '*worker*.js'),
// to: '[name][ext]',
// context: path.resolve(__dirname, 'out'),
// },
// ],
// }),
// );
return newConfig;
};
const config = {
...nextra,
basePath: "/docs",
async redirects() {
return [
// network docs
{
source: "/operators",
destination: "docs/operators/introduction",
permanent: true,
basePath: false,
},
{
source: "/docs/operators",
destination: "docs/operators/introduction",
permanent: true,
basePath: false,
},
{
source: "/developers",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
// TS SDK reorg 2026-05: the per-package /developers/typescript/examples/*
// and /developers/typescript/playground/* pages were consolidated into
// top-level package pages (mix-fetch, mix-dns, mix-websocket) and
// typescript/quick-start, typescript/smart-contracts, typescript/cosmos-kit.
{
source: "/docs/developers/typescript/examples/mix-fetch",
destination: "/docs/developers/mix-fetch",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/examples/mixnet",
destination: "/docs/developers/typescript/quick-start",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/examples/nym-smart-contracts",
destination: "/docs/developers/typescript/smart-contracts",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/examples/cosmos-kit",
destination: "/docs/developers/typescript/cosmos-kit",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/examples",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/playground/mixfetch",
destination: "/docs/developers/mix-fetch",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/playground/traffic",
destination: "/docs/developers/typescript/quick-start",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/playground/mixnodes",
destination: "/docs/developers/typescript/smart-contracts",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/playground/wallet",
destination: "/docs/developers/typescript/cosmos-kit",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/playground/cosmos-kit",
destination: "/docs/developers/typescript/cosmos-kit",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/playground",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
// The per-package typedoc dirs moved out of typescript/api/<pkg>/ to
// <pkg>/api/ so each package's API reference nests under its own sidebar
// entry (matches the rust/<module>/ pattern). @nymproject/sdk's typedoc
// stays at typescript/api/sdk/ since its landing is typescript.mdx.
{
source: "/docs/developers/typescript/api/mix-tunnel/:path*",
destination: "/docs/developers/mix-tunnel/api/:path*",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/api/mix-fetch/:path*",
destination: "/docs/developers/mix-fetch/api/:path*",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/api/mix-dns/:path*",
destination: "/docs/developers/mix-dns/api/:path*",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/api/mix-websocket/:path*",
destination: "/docs/developers/mix-websocket/api/:path*",
permanent: true,
basePath: false,
},
{
source: "/docs/architecture/nym-vs-others.html",
destination: "/docs/network/overview/comparisons",
permanent: true,
basePath: false,
},
{
source: "/docs/architecture/traffic-flow.html",
destination: "/docs/network/mixnet-mode/traffic-flow",
permanent: true,
basePath: false,
},
{
source: "/docs/architecture/addressing-system.html",
destination: "/docs/network/reference/addressing",
permanent: true,
basePath: false,
},
{
source: "/docs/binaries/pre-built-binaries.html",
destination: "/docs/developers/binaries#building-from-source",
permanent: true,
basePath: false,
},
{
source: "/docs/binaries/init-and-config.html",
destination: "/docs/developers/binaries#building-from-source",
permanent: true,
basePath: false,
},
{
source: "/docs/binaries/building-nym.html",
destination: "/docs/developers/binaries#building-from-source",
permanent: true,
basePath: false,
},
{
source: "/docs/nodes/overview.html ",
destination: "/docs/network/infrastructure/nym-nodes",
permanent: true,
basePath: false,
},
{
source: "/docs/wallet/desktop-wallet.html",
destination:
"https://github.com/nymtech/nym/tree/master/nym-wallet#installation-prerequisites---linux--mac",
permanent: true,
basePath: false,
},
{
source: "/docs/wallet/cli-wallet.html",
destination: "/docs/developers/chain/cli-wallet",
permanent: true,
basePath: false,
},
{
source: "/docs/explorers/mixnet-explorer.html",
destination:
"https://github.com/nymtech/nym/tree/master/explorer#nym-network-explorer",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/interacting-with-chain.html",
destination: "/docs/developers/chain",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/smart-contracts.html",
destination: "/docs/network/infrastructure/nyx#smart-contracts",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/mixnet-contract.html",
destination: "/docs/network/infrastructure/nyx#mixnet-contract",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/vesting-contract.html",
destination: "/docs/network/infrastructure/nyx#vesting-contract",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/rpc-node.html",
destination: "/docs/developers/chain/rpc-node",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/ledger-live.html",
destination: "/docs/developers/chain/ledger-live",
permanent: true,
basePath: false,
},
{
source: "/docs/coconut.html",
destination: "/docs/network/cryptography/zk-nym",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/bandwidth-credentials.html",
destination: "/docs/network/cryptography/zk-nym",
permanent: true,
basePath: false,
},
{
source: "/docs/tools/nym-cli.html",
destination: "/docs/developers/tools/nym-cli",
permanent: true,
basePath: false,
},
{
source: "/docs/coc.html",
destination: "/docs/network/coc",
permanent: true,
basePath: false,
},
{
source: "/docs/licensing.html",
destination: "/docs/network/licensing",
permanent: true,
basePath: false,
},
// dev docs
{
source: "/developers/clients-overview.html",
destination: "/docs/developers/clients",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/rust.html",
destination: "/docs/developers/rust",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/message-types.html",
destination: "/docs/developers/rust/mixnet/message-types",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/message-helpers.html",
destination: "/docs/developers/rust/mixnet/message-helpers",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/troubleshooting.html",
destination: "/docs/developers/rust/mixnet/troubleshooting",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples.html",
destination: "/docs/developers/rust/mixnet/examples",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/simple.html",
destination: "/docs/developers/rust/mixnet/examples/simple",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/keys.html",
destination: "/docs/developers/sdk/rust/examples/keys.html",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/storage.html",
destination:
"/docs/developers/rust/mixnet/examples/builders/builder-with-storage",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/surbs.html",
destination: "/docs/developers/rust/mixnet/examples/surbs",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/custom-network.html",
destination: "/docs/developers/rust/mixnet/examples/custom-topology",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/socks.html",
destination: "/docs/developers/rust/mixnet/examples/socks",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/split-send.html",
destination: "/docs/developers/rust/mixnet/examples/split-send",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/credential.html",
destination: "/docs/developers/rust/mixnet",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/rust/examples/cargo.html",
destination: "/docs/developers/rust/importing",
permanent: true,
basePath: false,
},
{
source: "/developers/sdk/typescript.html",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
{
source: "/developers/binaries/pre-built-binaries.html",
destination: "/docs/developers/binaries#pre-built-binaries",
permanent: true,
basePath: false,
},
{
source: "/developers/binaries/building-nym.html",
destination: "/docs/developers/binaries",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket-client.html",
destination: "/docs/developers/clients/websocket",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket/setup.html",
destination: "/docs/developers/clients/websocket/setup",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket/config.html",
destination: "/docs/developers/clients/websocket/config",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket/usage.html",
destination: "/docs/developers/clients/websocket/usage",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket/examples.html",
destination: "/docs/developers/clients/websocket/examples",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/socks5-client.html",
destination: "/docs/developers/clients/socks5",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/socks5/setup.html",
destination: "/docs/developers/clients/socks5#client-setup",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/socks5/usage.html",
destination: "/docs/developers/clients/socks5#using-your-socks5-client",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/webassembly-client.html",
destination: "/docs/developers/clients/webassembly-client",
permanent: true,
basePath: false,
},
{
source: "/developers/tutorials/coming-soon.html",
destination: "/docs/developers/rust#",
permanent: true,
basePath: false,
},
{
source: "/developers/tutorials/rust-sdk.html",
destination: "/docs/developers/rust/mixnet/examples",
permanent: true,
basePath: false,
},
{
source: "/developers/integrations/integration-options.html",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
{
source: "/developers/faq/integrations-faq.html",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
{
source: "/developers/coc.html",
destination: "/docs/developers/coc",
permanent: true,
basePath: false,
},
{
source: "/developers/licensing.html",
destination: "/docs/developers/licensing",
permanent: true,
basePath: false,
},
{
source: "/developers/nymvpn/intro.html",
destination: "/docs/developers/archive/nymvpn",
permanent: true,
basePath: false,
},
{
source: "/developers/nymvpn/cli.html",
destination: "/docs/developers/nymvpn/cli",
permanent: true,
basePath: false,
},
{
source: "/developers/archive/nym-connect.html",
destination: "/docs/developers/archive/nym-connect",
permanent: true,
basePath: false,
},
{
source: "/developers/examples/custom-services.html",
destination: "/docs/developers/rust/mixnet/other-examples#services",
permanent: true,
basePath: false,
},
{
source: "/developers/examples/browser-only.html",
destination: "/docs/developers/rust/mixnet/other-examples#browser-only",
permanent: true,
basePath: false,
},
{
source: "/developers/examples/using-nrs.html",
destination: "/docs/developers/rust/mixnet/other-examples",
permanent: true,
basePath: false,
},
{
source: "/developers/examples/monorepo-examples.html",
destination: "/docs/developers/rust/mixnet/other-examples",
permanent: true,
basePath: false,
},
{
source: "/developers/integrations",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
// operators:
// specific urls that have changed
{
source: "/operators/nodes/wallet-preparation.html",
destination:
"/docs/operators/nodes/preliminary-steps/wallet-preparation",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/vps-setup.html",
destination: "/docs/operators/nodes/preliminary-steps/vps-setup",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/proxy-configuration.html",
destination:
"/docs/operators/nodes/nym-node/configuration/proxy-configuration",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/bonding.html",
destination: "/docs/operators/nodes/nym-node/bonding",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/nym-api.html",
destination: "/docs/operators/nodes/validator-setup/nym-api",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/nyx-configuration.html",
destination: "/docs/operators/nodes/validator-setup/nyx-configuration",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/manual-upgrade.html",
destination: "/docs/operators/nodes/maintenance/manual-upgrade",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/nymvisor-upgrade.html",
destination: "/docs/operators/nodes/maintenance/nymvisor-upgrade",
permanent: true,
basePath: false,
},
{
source: "/operators/testing/performance.html",
destination: "/docs/operators/nodes/performance-and-testing",
permanent: true,
basePath: false,
},
{
source: "/operators/testing/gateway-probe.html",
destination:
"/docs/operators/nodes/performance-and-testing/gateway-probe",
permanent: true,
basePath: false,
},
{
source: "/operators/testing/prometheus-grafana.html",
destination:
"/docs/operators/nodes/performance-and-testing/prometheus-grafana",
permanent: true,
basePath: false,
},
{
source: "/operators/testing/explorenym-scripts.html",
destination:
"/docs/operators/nodes/performance-and-testing/prometheus-grafana/explorenym-scripts",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/community-counsel.html",
destination: "/docs/operators/community-counsel",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/exit-gateway.html",
destination: "/docs/operators/community-counsel/exit-gateway",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/isp-list.html",
destination: "/docs/operators/community-counsel/isp-list",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/jurisdictions.html",
destination: "/docs/operators/community-counsel/jurisdictions",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/swiss.html",
destination: "/docs/operators/community-counsel/jurisdictions/swiss",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/united-states.html",
destination:
"/docs/operators/community-counsel/jurisdictions/united-states",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/landing-pages.html",
destination: "/docs/operators/community-counsel/landing-pages",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/add-content.html",
destination: "/docs/operators/community-counsel/add-content",
permanent: true,
basePath: false,
},
{
source: "/docs/sdk/rust/rust.html",
destination: "/docs/developers/rust",
permanent: true,
basePath: false,
},
{
source: "/docs/sdk/rust.html",
destination: "/docs/developers/rust",
permanent: true,
basePath: false,
},
{
source: "/docs/sdk/typescript.html",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/changelog.html",
destination: "/docs/operators/changelog",
permanent: true,
basePath: false,
},
{
source: "/operators/changelog.html",
destination: "/docs/operators/changelog",
permanent: true,
basePath: false,
},
{
source: "/operators/changelog",
destination: "/docs/operators/changelog",
permanent: true,
basePath: false,
},
{
source: "/docs/tools/nym-cli",
destination: "/docs/developers/tools/nym-cli",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/clients/socks5/setup",
destination: "/docs/developers/clients/socks5#client-setup",
permanent: true,
basePath: false,
},
{
source: "/docs/architecture/network-overview.html",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/archive/nymvpn/troubleshooting",
destination: "/docs/developers/archive/nymvpn/faq",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/archive/nymvpn/intro",
destination: "/docs/developers/archive/nymvpn",
permanent: true,
basePath: false,
},
{
source: "/docs/network/architecture/nyx/smart-contracts/ecash",
destination: "/docs/network/infrastructure/nyx#zk-nym-contract",
permanent: true,
basePath: false,
},
{
source: "/docs/network/cryptography/tools/nym-cli",
destination: "/docs/developers/tools/nym-cli",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/variables.html",
destination: "/docs/operators/variables",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/testing/performance",
destination: "/docs/operators/nodes/performance-and-testing",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/setup",
destination: "/docs/operators/nodes/nym-node/setup",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/configuration",
destination: "/docs/operators/nodes/nym-node/configuration",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/proxy-configuration",
destination:
"/docs/operators/nodes/nym-node/configuration/proxy-configuration",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/testing/gateway-probe",
destination:
"/docs/operators/nodes/performance-and-testing/gateway-probe",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/legal/isp-list",
destination: "/docs/operators/community-counsel/isp-list",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/vps-setup",
destination: "/docs/operators/nodes/preliminary-steps/vps-setup",
permanent: true,
basePath: false,
},
{
source: "/docs/binaries/building-nym",
destination: "/docs/developers/binaries#building-nym",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/nym-node/proxy-configuration",
destination:
"/docs/operators/nodes/nym-node/configuration/proxy-configuration",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/nym-node/vps-setup",
destination: "/docs/operators/nodes/preliminary-steps/vps-setup",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/binaries/pre-built-binaries",
destination: "/docs/operators/binaries/pre-built-binaries",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/binaries/building-nym",
destination: "/docs/operators/binaries/building-nym",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/preliminrary-steps/vps-setup",
destination: "/docs/operators/nodes/preliminary-steps/vps-setup",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/perfomance-and-testing/gateway-probe",
destination:
"/docs/operators/nodes/performance-and-testing/gateway-probe",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/binaries/pre-build-binaries",
destination: "/docs/operators/binaries/pre-built-binaries",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/add-content",
destination: "/docs/operators/community-counsel/add-content",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/archive/faq/mixnodes-faq",
destination: "/docs/operators/archive/faq/smoosh-faq",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/legal/exit-gateway",
destination: "/docs/operators/community-counsel/exit-gateway",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/misc/nodes/setup",
destination: "/docs/operators/nodes/nym-node/setup",
permanent: true,
basePath: false,
},
{
source: "/operators/troubleshooting/nodes.html",
destination: "/docs/operators/troubleshooting/nodes",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/manual-upgrade.html",
destination: "/docs/operators/nodes/maintenance/manual-upgrade",
permanent: true,
basePath: false,
},
{
source: "/developers/faq/general-faq.html",
destination: "/docs/operators/faq/general-faq",
permanent: true,
basePath: false,
},
{
source: "/developers/tutorials/cosmos-service/intro.html",
destination: "/docs/developers/rust#",
permanent: true,
basePath: false,
},
{
source: "/developers/faq/integrations-faq.html",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
{
source: "/developers/nymvpn/cli.html",
destination: "/docs/developers/archive/nymvpn/cli",
permanent: true,
basePath: false,
},
{
source: "/developers/archive/nym-connect.html",
destination: "/docs/developers/archive/nym-connect",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket-client.html",
destination: "/docs/developers/clients/websocket",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/socks5-client.html",
destination: "/docs/developers/clients/socks5",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/webassembly-client.html",
destination: "/docs/developers/clients/webassembly-client",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/nym-node/nym-node",
destination: "/docs/operators/nodes/nym-node",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/network/concepts/anonymous-replies",
destination: "/docs/network/concepts/anonymous-replies",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/nodes/nym-node/nym-node",
destination: "/docs/operators/nodes/nym-node",
permanent: true,
basePath: false,
},
{
source: "/docs/bandwidth-credentials.html",
destination: "/docs/network/cryptography/zk-nym",
permanent: true,
basePath: false,
},
{
source: "/developers/faq/general-faq.html",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
{
source: "/operators/faq/mixnodes-faq.html",
destination: "/docs/operators/faq/general-faq",
permanent: true,
basePath: false,
},
{
source: "/operators/faq/smoosh-faq.html",
destination: "/docs/operators/faq/nym-nodes-faq",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/exit-gateway.html",
destination: "/docs/operators/community-counsel/exit-gateway",
permanent: true,
basePath: false,
},
{
source: "/developers/tutorials/cosmos-service/intro.html",
destination: "/docs/developers/rust",
permanent: true,
basePath: false,
},
{
source: "/developers/faq/integrations-faq.html",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/testing/gateway-probe.html",
destination:
"/docs/operators/nodes/performance-and-testing/gateway-probe",
permanent: true,
basePath: false,
},
{
source: "/developers/nymvpn/cli.html",
destination: "/docs/developers/archive/nymvpn/cli",
permanent: true,
basePath: false,
},
{
source: "/developers/archive/nym-connect.html",
destination: "/docs/developers/archive/nym-connect",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/vps-setup.html",
destination: "/docs/operators/nodes/preliminary-steps/vps-setup",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/maintenance.html",
destination: "/docs/operators/nodes/maintenance",
permanent: true,
basePath: false,
},
{
source: "/operators/troubleshooting/vps-isp.html",
destination: "/docs/operators/community-counsel/isp-list",
permanent: true,
basePath: false,
},
{
source: "/operators/legal/isp-list.html",
destination: "/docs/operators/community-counsel/isp-list",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/proxy-configuration.html",
destination:
"/docs/operators/nodes/nym-node/configuration/proxy-configuration",
permanent: true,
basePath: false,
},
{
source: "/operators/nodes/bonding.html",
destination: "/docs/operators/nodes/nym-node/bonding",
permanent: true,
basePath: false,
},
{
source: "/operators/sandbox.html",
destination: "/docs/operators/sandbox",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/websocket-client.html",
destination: "/docs/developers/clients/websocket",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/socks5-client.html",
destination: "/docs/developers/clients/socks5",
permanent: true,
basePath: false,
},
{
source: "/developers/clients/webassembly-client.html",
destination: "/docs/developers/clients/webassembly-client",
permanent: true,
basePath: false,
},
{
source: "/docs/operators/landing-pages",
destination: "/docs/operators/community-counsel/landing-pages",
permanent: true,
basePath: false,
},
// Change the basePath to /docs
{
source: "/",
destination: "/docs",
basePath: false,
permanent: true,
},
// TODO these need to go in the config of the existing deployed ts sdk docs to redirect from there
// these assume source basePath = sdk.nymtech.net
// {
// source: "/intro",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript",
// permanent: true,
// },
// {
// source: "/overview",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/overview",
// permanent: true,
// },
// {
// source: "/integrations",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/integrations",
// permanent: true,
// },
// {
// source: "/installation",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/installation",
// permanent: true,
// },
// {
// source: "/start",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/start",
// permanent: true,
// },
// {
// source: "/examples/mix-fetch",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>developers/typescript/examples/mix-fetch",
// permanent: true,
// },
// {
// source: "/examples/mixnet",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>//developers/typescript/examples/mixnet",
// permanent: true,
// },
// {
// source: "/examples/nym-smart-contracts",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/examples/nym-smart-contracts",
// permanent: true,
// },
// {
// source: "/examples/cosmos-kit",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>//developers/typescript/examples/cosmos-kit",
// permanent: true,
// },
// {
// source: "/playground/mixfetch",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/playground/mixfetch",
// permanent: true,
// },
// {
// source: "/playground/traffic",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/playground/traffic",
// permanent: true,
// },
// {
// source: "/playground/mixnodes",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/playground/mixnodes",
// permanent: true,
// },
// {
// source: "/playground/wallet",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/typescript/playground/wallet",
// permanent: true,
// },
// {
// source: "/playground/cosmos-kit",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/playground/cosmos-kit",
// permanent: true,
// },
// {
// source: "/bundling/bundling",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/bundling/bundling",
// permanent: true,
// },
// {
// source: "/bundling/esbuild",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/bundling/esbuild",
// permanent: true,
// },
// {
// source: "/bundling/webpack",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/bundling/webpack",
// permanent: true,
// },
// {
// source: "/FAQ/general",
// destination: "https://www.<TODO_EDIT_DESTINATION_BASE>/developers/typescript/FAQ",
// permanent: true,
// },
// ==========================================
// Docs rework redirects (2026)
// ==========================================
// --- Network overview: deleted pages ---
{
source: "/docs/network/overview/two-modes",
destination: "/docs/network/overview/choosing-a-mode",
permanent: true,
basePath: false,
},
{
source: "/docs/network/overview/network-components",
destination: "/docs/network/infrastructure",
permanent: true,
basePath: false,
},
// --- TypeScript SDK: merged pages ---
{
source: "/docs/developers/typescript/overview",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/installation",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/start",
destination: "/docs/developers/typescript",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/typescript/FAQ",
destination: "/docs/developers/typescript/bundling/bundling",
permanent: true,
basePath: false,
},
// --- Rust SDK: deleted mixnet example subpages ---
{
source: "/docs/developers/rust/mixnet/examples/:path+",
destination: "/docs/developers/rust/mixnet/examples",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/rust/mixnet/message-helpers",
destination: "/docs/developers/rust/mixnet",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/rust/mixnet/message-types",
destination: "/docs/developers/rust/mixnet",
permanent: true,
basePath: false,
},
// --- Rust SDK: deleted client-pool subpages ---
{
source: "/docs/developers/rust/client-pool/architecture",
destination: "/docs/developers/rust/client-pool",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/rust/client-pool/example",
destination: "/docs/developers/rust/client-pool",
permanent: true,
basePath: false,
},
// --- Rust SDK: collapsed TcpProxy subpages ---
{
source: "/docs/developers/rust/tcpproxy/troubleshooting",
destination: "/docs/developers/rust/tcpproxy",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/rust/tcpproxy/tutorial",
destination: "/docs/developers/rust/tcpproxy",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/rust/tcpproxy/architecture",
destination: "/docs/developers/rust/tcpproxy",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/rust/tcpproxy/examples",
destination: "/docs/developers/rust/tcpproxy",
permanent: true,
basePath: false,
},
// Docs reorg: language-based sidebar
// Deleted routing pages → merged into the developer overview
{
source: "/docs/developers/native",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
{
source: "/docs/developers/browsers",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
// --- Developers reorg (2026-06): single front door + collapsed mix-* pages ---
// integrations.mdx merged into the overview (index)
{
source: "/docs/developers/integrations",
destination: "/docs/developers",
permanent: true,
basePath: false,
},
// mix-dns concepts merged into its reference page
{
source: "/docs/developers/mix-dns/concepts",
destination: "/docs/developers/mix-dns/guides",
permanent: true,
basePath: false,
},
// mix-tunnel concepts removed; security lives in exit-security, architecture on its own page
{
source: "/docs/developers/mix-tunnel/concepts",
destination: "/docs/developers/mix-tunnel",
permanent: true,
basePath: false,
},
// --- Directory index redirects (directories without index pages) ---
{
source: "/docs/developers/concepts",
destination: "/docs/developers/concepts/message-queue",
permanent: false,
basePath: false,
},
{
source: "/docs/developers/typescript/bundling",
destination: "/docs/developers/typescript/bundling/bundling",
permanent: false,
basePath: false,
},
{
source: "/docs/developers/typescript/api/mix-fetch",
destination: "/docs/developers/mix-fetch/api/globals",
permanent: false,
basePath: false,
},
{
source: "/docs/developers/typescript/api/sdk",
destination: "/docs/developers/typescript/api/sdk/globals",
permanent: false,
basePath: false,
},
{
source: "/docs/developers/typescript/api",
destination: "/docs/developers/typescript/api/sdk",
permanent: false,
basePath: false,
},
{
source: "/docs/developers/clients",
destination: "/docs/developers/clients/socks5",
permanent: false,
basePath: false,
},
{
source: "/developers/rust/importing",
destination: "/docs/developers/rust/importing",
permanent: true,
basePath: false,
},
// --- APIs: flattened structure ---
{
source: "/docs/apis/ns-api/mainnet",
destination: "/docs/apis/ns-api",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/ns-api/sandbox",
destination: "/docs/apis/ns-api",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/ns-api/ns-api-run-deploy",
destination:
"/docs/operators/performance-and-testing/ns-api-deployment",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/nym-api/mainnet",
destination: "/docs/apis/nym-api",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/explorer-api/mainnet",
destination: "/docs/apis/explorer-api",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/explorer-api/sandbox",
destination: "/docs/apis/explorer-api",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/cosmos-sdk-nyx/mainnet",
destination: "/docs/apis/cosmos-sdk-nyx",
permanent: true,
basePath: false,
},
{
source: "/docs/apis/cosmos-sdk-nyx/sandbox",
destination: "/docs/apis/cosmos-sdk-nyx",
permanent: true,
basePath: false,
},
// --- Network: archived sections ---
{
source: "/docs/network/architecture",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
{
source: "/docs/network/architecture/:path*",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
{
source: "/docs/network/concepts",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
{
source: "/docs/network/concepts/:path*",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
{
source: "/docs/network/traffic",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
{
source: "/docs/network/traffic/:path*",
destination: "/docs/network/overview",
permanent: true,
basePath: false,
},
];
},
images: {
unoptimized: true,
},
transpilePackages: ["@nymproject/contract-clients"],
async headers() {
const isDev = process.env.NODE_ENV === "development";
const csp = isDev
? `
default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob: *;
script-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob: *;
font-src 'self' data: blob: *;
style-src 'self' 'unsafe-inline' data: blob: *;
img-src 'self' data: blob: *;
object-src 'self' data: blob: *;
base-uri 'self';
form-action 'self';
frame-ancestors 'self';
upgrade-insecure-requests;
connect-src 'self' data: blob: *;
frame-src 'self' data: blob: *;
worker-src 'self' blob: *;
`
: `
default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://vercel.live *.nymtech.net *.nymvpn.com *.vercel.app *.nymte.ch *.nyx.network *.nym.com https://nym.com nymvpn.com https://nymvpn.com *.nymtech.cc;
font-src 'self' data:;
style-src 'self' 'unsafe-inline';
img-src 'self';
object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
upgrade-insecure-requests;
connect-src 'self' wss://nym-node-cli.devrel.nymte.ch:9001 https://github.com *.vercel.app *.nymtech.net *.nymvpn.com *.nymte.ch *.nyx.network *.nym.com https://nym.com nymvpn.com https://nymvpn.com *.nymtech.cc;
frame-src 'self' https://vercel.live *.vercel.app *.nym.com https://nym.com;
worker-src 'self' blob: https://vercel.live *.vercel.app *.nym.com https://nym.com;
`;
return [
{
source: "/(.*)",
headers: [
{
key: "Content-Security-Policy",
value: csp.replace(/\s{2,}/g, " ").trim(),
},
],
},
];
},
};
module.exports = config;