From 9e353edef1f192a06578ea290ee60dbf59441cea Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Thu, 5 Mar 2026 19:59:30 +0000 Subject: [PATCH 1/4] fix redirects --- unified-doc/docusaurus.config.ts | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/unified-doc/docusaurus.config.ts b/unified-doc/docusaurus.config.ts index b43818d..ed88900 100644 --- a/unified-doc/docusaurus.config.ts +++ b/unified-doc/docusaurus.config.ts @@ -25,6 +25,52 @@ const zlan = `./_remotes/zlan`; const isVercel = process.env.IS_VERCEL === 'true'; const docsBase = isVercel ? '/' : '/docs/'; +// Redirect paths are relative to baseUrl. isVercel changes the prefix needed. +// Production (baseUrl='/docs/'): /zrok/... | Vercel (baseUrl='/'): /docs/zrok/... +const zrokBase = isVercel ? '/docs/zrok' : '/zrok'; +const zrokRedirects = [ + // getting-started → get-started + { to: '/get-started/', from: ['/getting-started'] }, + // category/guides → category/how-to-guides + { to: '/category/how-to-guides', from: ['/category/guides'] }, + // guides/* → how-tos/* + { to: '/how-tos/agent/', from: ['/guides/agent/'] }, + { to: '/how-tos/agent/http-healthcheck', from: ['/guides/agent/http-healthcheck'] }, + { to: '/how-tos/agent/linux-service', from: ['/guides/agent/linux-service'] }, + { to: '/how-tos/agent/remoting', from: ['/guides/agent/remoting'] }, + { to: '/how-tos/agent/windows-service/', from: ['/guides/agent/windows-service/'] }, + { to: '/how-tos/docker-share/', from: ['/guides/docker-share/'] }, + { to: '/how-tos/docker-share/private-share', from: ['/guides/docker-share/docker_private_share_guide'] }, + { to: '/how-tos/docker-share/public-share', from: ['/guides/docker-share/docker_public_share_guide'] }, + { to: '/how-tos/drives', from: ['/guides/drives'] }, + { to: '/how-tos/frontdoor', from: ['/guides/frontdoor'] }, + { to: '/how-tos/install/', from: ['/guides/install/'] }, + { to: '/how-tos/install/linux', from: ['/guides/install/linux'] }, + { to: '/how-tos/install/macos', from: ['/guides/install/macos'] }, + { to: '/how-tos/install/windows', from: ['/guides/install/windows'] }, + { to: '/how-tos/permission-modes', from: ['/guides/permission-modes'] }, + { to: '/how-tos/v2-migration-guide', from: ['/guides/v2-migration-guide'] }, + { to: '/how-tos/vpn', from: ['/guides/vpn'] }, + // guides/self-hosting/* → self-hosting/* + { to: '/self-hosting/docker', from: ['/guides/self-hosting/docker'] }, + { to: '/self-hosting/dynamic-proxy', from: ['/guides/self-hosting/dynamicProxy'] }, + { to: '/self-hosting/error-pages', from: ['/guides/self-hosting/error-pages'] }, + { to: '/self-hosting/instance-configuration', from: ['/guides/self-hosting/instance-configuration'] }, + { to: '/self-hosting/interstitial-page', from: ['/guides/self-hosting/interstitial-page'] }, + { to: '/self-hosting/kubernetes', from: ['/guides/self-hosting/kubernetes'] }, + { to: '/self-hosting/linux/', from: ['/guides/self-hosting/self_hosting_guide', '/guides/self-hosting/linux'] }, + { to: '/self-hosting/linux/nginx', from: ['/guides/self-hosting/nginx_tls_guide/', '/guides/self-hosting/linux/nginx'] }, + { to: '/self-hosting/metrics-and-limits/configuring-limits', from: ['/guides/metrics-and-limits/configuring-limits', '/guides/self-hosting/metrics-and-limits/configuring-limits'] }, + { to: '/self-hosting/metrics-and-limits/configuring-metrics', from: ['/guides/metrics-and-limits/configuring-metrics', '/guides/self-hosting/metrics-and-limits/configuring-metrics'] }, + { to: '/self-hosting/oauth/configuring-oauth', from: ['/guides/self-hosting/oauth/configuring-oauth'] }, + { to: '/self-hosting/oauth/integrations/github', from: ['/guides/self-hosting/oauth/integrations/github'] }, + { to: '/self-hosting/oauth/integrations/google', from: ['/guides/self-hosting/oauth/integrations/google'] }, + { to: '/self-hosting/oauth/integrations/oidc', from: ['/guides/self-hosting/oauth/integrations/oidc'] }, + { to: '/self-hosting/organizations', from: ['/guides/self-hosting/organizations'] }, + { to: '/self-hosting/personalized-frontend', from: ['/guides/self-hosting/personalized-frontend'] }, + { to: '/self-hosting/self-service-invite', from: ['/guides/self-hosting/self-service-invite'] }, +].map(({ to, from }) => ({ to: `${zrokBase}${to}`, from: from.map(f => `${zrokBase}${f}`) })); + // On Vercel previews, the baseUrl needs to be '/', routes need a 'docs/' prefix to match hardcoded /docs/ links in remote content. // On default non-Vercel-preview builds baseUrl is '/docs/' function routeBase(name: string) { @@ -351,6 +397,13 @@ const config: Config = { [pluginHotjar, {}], ['@docusaurus/plugin-google-tag-manager', {id: `openziti-gtm`, containerId: cfg.google.tag}], build(BUILD_FLAGS.SELFHOSTED) && onpremRedirects(routeBase('selfhosted')), + // Single plugin-client-redirects instance (only one instance allowed). + // Add other products' redirect arrays here as they are needed. + ['@docusaurus/plugin-client-redirects', { + redirects: [ + ...(build(BUILD_FLAGS.ZROK) ? zrokRedirects : []), + ], + }], ].filter(Boolean), themeConfig: { docs: { From 2a7b1d703d3062164303930c8c2aa5c2c628fd6b Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Thu, 5 Mar 2026 21:14:16 +0000 Subject: [PATCH 2/4] zrok redirects for docusaurus-shared --- unified-doc/docusaurus.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unified-doc/docusaurus.config.ts b/unified-doc/docusaurus.config.ts index b43818d..ee3b4fb 100644 --- a/unified-doc/docusaurus.config.ts +++ b/unified-doc/docusaurus.config.ts @@ -12,7 +12,7 @@ import { import remarkGithubAdmonitionsToDirectives from "remark-github-admonitions-to-directives"; import {pluginHotjar} from "@netfoundry/docusaurus-theme/node"; import {PublishConfig} from 'src/components/docusaurus' -import {zrokDocsPluginConfig} from "./_remotes/zrok/website/docusaurus-plugin-zrok-docs.ts"; +import {zrokDocsPluginConfig, zrokRedirects} from "./_remotes/zrok/website/docusaurus-plugin-zrok-docs.ts"; import {onpremRedirects} from "./_remotes/selfhosted/docusaurus/docusaurus-plugin-onprem-docs.ts"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) @@ -351,6 +351,7 @@ const config: Config = { [pluginHotjar, {}], ['@docusaurus/plugin-google-tag-manager', {id: `openziti-gtm`, containerId: cfg.google.tag}], build(BUILD_FLAGS.SELFHOSTED) && onpremRedirects(routeBase('selfhosted')), + build(BUILD_FLAGS.ZROK) && zrokRedirects(routeBase('zrok')), ].filter(Boolean), themeConfig: { docs: { From 06e5abc6d602a39a698b084e6c1a758f22e93dbe Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Thu, 5 Mar 2026 21:21:57 +0000 Subject: [PATCH 3/4] Remove stale inline zrokRedirects array (replaced by imported function) Co-Authored-By: Claude Sonnet 4.6 --- unified-doc/docusaurus.config.ts | 45 -------------------------------- 1 file changed, 45 deletions(-) diff --git a/unified-doc/docusaurus.config.ts b/unified-doc/docusaurus.config.ts index fa9f30a..90dfd41 100644 --- a/unified-doc/docusaurus.config.ts +++ b/unified-doc/docusaurus.config.ts @@ -25,51 +25,6 @@ const zlan = `./_remotes/zlan`; const isVercel = process.env.IS_VERCEL === 'true'; const docsBase = isVercel ? '/' : '/docs/'; -// Redirect paths are relative to baseUrl. isVercel changes the prefix needed. -// Production (baseUrl='/docs/'): /zrok/... | Vercel (baseUrl='/'): /docs/zrok/... -const zrokBase = isVercel ? '/docs/zrok' : '/zrok'; -const zrokRedirects = [ - // getting-started → get-started - { to: '/get-started/', from: ['/getting-started'] }, - // category/guides → category/how-to-guides - { to: '/category/how-to-guides', from: ['/category/guides'] }, - // guides/* → how-tos/* - { to: '/how-tos/agent/', from: ['/guides/agent/'] }, - { to: '/how-tos/agent/http-healthcheck', from: ['/guides/agent/http-healthcheck'] }, - { to: '/how-tos/agent/linux-service', from: ['/guides/agent/linux-service'] }, - { to: '/how-tos/agent/remoting', from: ['/guides/agent/remoting'] }, - { to: '/how-tos/agent/windows-service/', from: ['/guides/agent/windows-service/'] }, - { to: '/how-tos/docker-share/', from: ['/guides/docker-share/'] }, - { to: '/how-tos/docker-share/private-share', from: ['/guides/docker-share/docker_private_share_guide'] }, - { to: '/how-tos/docker-share/public-share', from: ['/guides/docker-share/docker_public_share_guide'] }, - { to: '/how-tos/drives', from: ['/guides/drives'] }, - { to: '/how-tos/frontdoor', from: ['/guides/frontdoor'] }, - { to: '/how-tos/install/', from: ['/guides/install/'] }, - { to: '/how-tos/install/linux', from: ['/guides/install/linux'] }, - { to: '/how-tos/install/macos', from: ['/guides/install/macos'] }, - { to: '/how-tos/install/windows', from: ['/guides/install/windows'] }, - { to: '/how-tos/permission-modes', from: ['/guides/permission-modes'] }, - { to: '/how-tos/v2-migration-guide', from: ['/guides/v2-migration-guide'] }, - { to: '/how-tos/vpn', from: ['/guides/vpn'] }, - // guides/self-hosting/* → self-hosting/* - { to: '/self-hosting/docker', from: ['/guides/self-hosting/docker'] }, - { to: '/self-hosting/dynamic-proxy', from: ['/guides/self-hosting/dynamicProxy'] }, - { to: '/self-hosting/error-pages', from: ['/guides/self-hosting/error-pages'] }, - { to: '/self-hosting/instance-configuration', from: ['/guides/self-hosting/instance-configuration'] }, - { to: '/self-hosting/interstitial-page', from: ['/guides/self-hosting/interstitial-page'] }, - { to: '/self-hosting/kubernetes', from: ['/guides/self-hosting/kubernetes'] }, - { to: '/self-hosting/linux/', from: ['/guides/self-hosting/self_hosting_guide', '/guides/self-hosting/linux'] }, - { to: '/self-hosting/linux/nginx', from: ['/guides/self-hosting/nginx_tls_guide/', '/guides/self-hosting/linux/nginx'] }, - { to: '/self-hosting/metrics-and-limits/configuring-limits', from: ['/guides/metrics-and-limits/configuring-limits', '/guides/self-hosting/metrics-and-limits/configuring-limits'] }, - { to: '/self-hosting/metrics-and-limits/configuring-metrics', from: ['/guides/metrics-and-limits/configuring-metrics', '/guides/self-hosting/metrics-and-limits/configuring-metrics'] }, - { to: '/self-hosting/oauth/configuring-oauth', from: ['/guides/self-hosting/oauth/configuring-oauth'] }, - { to: '/self-hosting/oauth/integrations/github', from: ['/guides/self-hosting/oauth/integrations/github'] }, - { to: '/self-hosting/oauth/integrations/google', from: ['/guides/self-hosting/oauth/integrations/google'] }, - { to: '/self-hosting/oauth/integrations/oidc', from: ['/guides/self-hosting/oauth/integrations/oidc'] }, - { to: '/self-hosting/organizations', from: ['/guides/self-hosting/organizations'] }, - { to: '/self-hosting/personalized-frontend', from: ['/guides/self-hosting/personalized-frontend'] }, - { to: '/self-hosting/self-service-invite', from: ['/guides/self-hosting/self-service-invite'] }, -].map(({ to, from }) => ({ to: `${zrokBase}${to}`, from: from.map(f => `${zrokBase}${f}`) })); // On Vercel previews, the baseUrl needs to be '/', routes need a 'docs/' prefix to match hardcoded /docs/ links in remote content. // On default non-Vercel-preview builds baseUrl is '/docs/' From eed08eb73a839cf8b42320190679211ea4726c23 Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Fri, 6 Mar 2026 16:02:33 +0000 Subject: [PATCH 4/4] =?UTF-8?q?Fix=20broken=20navbar/homepage=20links:=20g?= =?UTF-8?q?etting-started=20=E2=86=92=20intro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getting-started no longer exists after zrok restructure. Navbar and homepage card now point to intro instead. Co-Authored-By: Claude Sonnet 4.6 --- unified-doc/src/pages/index.tsx | 2 +- unified-doc/src/theme/Navbar/Content/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unified-doc/src/pages/index.tsx b/unified-doc/src/pages/index.tsx index 6d579b3..0c92836 100644 --- a/unified-doc/src/pages/index.tsx +++ b/unified-doc/src/pages/index.tsx @@ -107,7 +107,7 @@ export default function Home(): ReactNode { zrok is an open-source, self-hostable sharing platform that simplifies shielding and sharing network services or files.
- Go to zrok + Go to zrok
diff --git a/unified-doc/src/theme/Navbar/Content/index.tsx b/unified-doc/src/theme/Navbar/Content/index.tsx index 2d794ea..1880e99 100644 --- a/unified-doc/src/theme/Navbar/Content/index.tsx +++ b/unified-doc/src/theme/Navbar/Content/index.tsx @@ -28,7 +28,7 @@ const nfFrontDoorDocs = {to: `${DOCS_PREFIX}/frontdoor/intro`, label: 'Frontdoor const onPremDocs = {to: `${DOCS_PREFIX}/selfhosted/intro`, label: 'Self-Hosted'}; const zlanDocs = {to: `${DOCS_PREFIX}/zlan/intro`, label: 'zLAN'}; const ozDocs = {to: `${DOCS_PREFIX}/openziti/learn/introduction`, label: 'OpenZiti'}; -const zrokDocs = {to: `${DOCS_PREFIX}/zrok/getting-started`, label: 'zrok'}; +const zrokDocs = {to: `${DOCS_PREFIX}/zrok/intro`, label: 'zrok'}; const openZitiNav: Item[] = [ { @@ -97,7 +97,7 @@ const zlanNav: Item[] = [ const zrokNav: Item[] = [ { label: 'zrok Docs', - to: `${DOCS_PREFIX}/zrok/getting-started`, + to: `${DOCS_PREFIX}/zrok/intro`, position: 'left', type: 'dropdown', items: [