Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion unified-doc/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand All @@ -25,6 +25,7 @@ const zlan = `./_remotes/zlan`;
const isVercel = process.env.IS_VERCEL === 'true';
const docsBase = isVercel ? '/' : '/docs/';


// 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) {
Expand Down Expand Up @@ -351,6 +352,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: {
Expand Down
2 changes: 1 addition & 1 deletion unified-doc/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</div>
<div className="card__footer">
<Link className="button button--primary button--block" to={useBaseUrl('/docs/zrok/getting-started')}>Go to zrok</Link>
<Link className="button button--primary button--block" to={useBaseUrl('/docs/zrok/intro')}>Go to zrok</Link>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions unified-doc/src/theme/Navbar/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
{
Expand Down Expand Up @@ -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: [
Expand Down