Skip to content

Commit 7fdc182

Browse files
authored
Merge pull request #39 from netfoundry/redirects-zrok
zrok redirects
2 parents 08bc47d + eed08eb commit 7fdc182

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

unified-doc/docusaurus.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import remarkGithubAdmonitionsToDirectives from "remark-github-admonitions-to-directives";
1313
import {pluginHotjar} from "@netfoundry/docusaurus-theme/node";
1414
import {PublishConfig} from 'src/components/docusaurus'
15-
import {zrokDocsPluginConfig} from "./_remotes/zrok/website/docusaurus-plugin-zrok-docs.ts";
15+
import {zrokDocsPluginConfig, zrokRedirects} from "./_remotes/zrok/website/docusaurus-plugin-zrok-docs.ts";
1616
import {onpremRedirects} from "./_remotes/selfhosted/docusaurus/docusaurus-plugin-onprem-docs.ts";
1717

1818
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
@@ -25,6 +25,7 @@ const zlan = `./_remotes/zlan`;
2525
const isVercel = process.env.IS_VERCEL === 'true';
2626
const docsBase = isVercel ? '/' : '/docs/';
2727

28+
2829
// On Vercel previews, the baseUrl needs to be '/', routes need a 'docs/' prefix to match hardcoded /docs/ links in remote content.
2930
// On default non-Vercel-preview builds baseUrl is '/docs/'
3031
function routeBase(name: string) {
@@ -351,6 +352,7 @@ const config: Config = {
351352
[pluginHotjar, {}],
352353
['@docusaurus/plugin-google-tag-manager', {id: `openziti-gtm`, containerId: cfg.google.tag}],
353354
build(BUILD_FLAGS.SELFHOSTED) && onpremRedirects(routeBase('selfhosted')),
355+
build(BUILD_FLAGS.ZROK) && zrokRedirects(routeBase('zrok')),
354356
].filter(Boolean),
355357
themeConfig: {
356358
docs: {

unified-doc/src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function Home(): ReactNode {
107107
zrok is an open-source, self-hostable sharing platform that simplifies shielding and sharing network services or files.
108108
</div>
109109
<div className="card__footer">
110-
<Link className="button button--primary button--block" to={useBaseUrl('/docs/zrok/getting-started')}>Go to zrok</Link>
110+
<Link className="button button--primary button--block" to={useBaseUrl('/docs/zrok/intro')}>Go to zrok</Link>
111111
</div>
112112
</div>
113113
</div>

unified-doc/src/theme/Navbar/Content/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const nfFrontDoorDocs = {to: `${DOCS_PREFIX}/frontdoor/intro`, label: 'Frontdoor
2828
const onPremDocs = {to: `${DOCS_PREFIX}/selfhosted/intro`, label: 'Self-Hosted'};
2929
const zlanDocs = {to: `${DOCS_PREFIX}/zlan/intro`, label: 'zLAN'};
3030
const ozDocs = {to: `${DOCS_PREFIX}/openziti/learn/introduction`, label: 'OpenZiti'};
31-
const zrokDocs = {to: `${DOCS_PREFIX}/zrok/getting-started`, label: 'zrok'};
31+
const zrokDocs = {to: `${DOCS_PREFIX}/zrok/intro`, label: 'zrok'};
3232

3333
const openZitiNav: Item[] = [
3434
{
@@ -97,7 +97,7 @@ const zlanNav: Item[] = [
9797
const zrokNav: Item[] = [
9898
{
9999
label: 'zrok Docs',
100-
to: `${DOCS_PREFIX}/zrok/getting-started`,
100+
to: `${DOCS_PREFIX}/zrok/intro`,
101101
position: 'left',
102102
type: 'dropdown',
103103
items: [

0 commit comments

Comments
 (0)