diff --git a/scripts/vercel-ignore.sh b/scripts/vercel-ignore.sh new file mode 100755 index 00000000..81cd16d4 --- /dev/null +++ b/scripts/vercel-ignore.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Vercel "Ignored Build Step" helper. +# Exit 0 = skip build, Exit 1 = build. +# Usage: scripts/vercel-ignore.sh e.g. scripts/vercel-ignore.sh packages/ + +set -e + +WATCH_PATH="$1" + +if [ -z "$WATCH_PATH" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# Vercel clones shallow with no 'origin' remote configured. Wire one up. +if ! git remote get-url origin >/dev/null 2>&1; then + git remote add origin "https://github.com/netfoundry/docusaurus-shared" +fi + +git fetch origin main --depth=100 + +if git diff --quiet origin/main...HEAD -- "$WATCH_PATH"; then + echo "No changes under $WATCH_PATH vs origin/main -- skipping build." + exit 0 +else + echo "Changes detected under $WATCH_PATH vs origin/main -- building." + exit 1 +fi + + diff --git a/unified-doc/docusaurus.config.ts b/unified-doc/docusaurus.config.ts index 2949da0c..0828dd11 100644 --- a/unified-doc/docusaurus.config.ts +++ b/unified-doc/docusaurus.config.ts @@ -446,28 +446,28 @@ const config: Config = { label: 'Edge Client API reference', route: `/${routeBase('openziti')}/reference/developer/api/edge-client-api-reference`, showNavLink: false, - configuration: {url: 'https://get.openziti.io/spec/client.yml', hideClientButton: true, hideTestRequestButton: true}, + configuration: {url: 'https://get.openziti.io/spec/client.yml', hideClientButton: true, hideTestRequestButton: true, searchHotKey: 'i'}, } as ScalarOptions], build(BUILD_FLAGS.OPENZITI) && ['@scalar/docusaurus', { id: 'edge-management', label: 'Edge Management API reference', route: `/${routeBase('openziti')}/reference/developer/api/edge-management-api-reference`, showNavLink: false, - configuration: {url: 'https://get.openziti.io/spec/management.yml', hideClientButton: true, hideTestRequestButton: true}, + configuration: {url: 'https://get.openziti.io/spec/management.yml', hideClientButton: true, hideTestRequestButton: true, searchHotKey: 'i'}, } as ScalarOptions], build(BUILD_FLAGS.PLATFORM) && ['@scalar/docusaurus', { id: 'platform-api', label: 'API reference', route: `/${routeBase('platform')}/api-guides/openapi-reference`, showNavLink: false, - configuration: {url: `${docsBase}console-api-spec.yaml`, hideClientButton: true, hideTestRequestButton: true}, + configuration: {url: `${docsBase}console-api-spec.yaml`, hideClientButton: true, hideTestRequestButton: true, searchHotKey: 'i'}, } as ScalarOptions], build(BUILD_FLAGS.FRONTDOOR) && ['@scalar/docusaurus', { id: 'frontdoor-api', label: 'API reference', route: `/${routeBase('frontdoor')}/reference/api-reference`, showNavLink: false, - configuration: {url: `${docsBase}frontdoor-api-spec.yaml`, hideClientButton: true, hideTestRequestButton: true}, + configuration: {url: `${docsBase}frontdoor-api-spec.yaml`, hideClientButton: true, hideTestRequestButton: true, searchHotKey: 'i'}, } as ScalarOptions], ].filter(Boolean), themeConfig: { diff --git a/unified-doc/src/pages/docs/index.tsx b/unified-doc/src/pages/docs/index.tsx index c9349e7c..866630c0 100644 --- a/unified-doc/src/pages/docs/index.tsx +++ b/unified-doc/src/pages/docs/index.tsx @@ -35,7 +35,7 @@ export default function Home(): ReactNode { Frontdoor Docs - OpenZiti Docs + OpenZiti Docs zLAN Docs @@ -85,7 +85,7 @@ export default function Home(): ReactNode { Open-source zero-trust networking project and SDKs.
- Go to OpenZiti + Go to OpenZiti
diff --git a/unified-doc/src/pages/index.tsx b/unified-doc/src/pages/index.tsx index 375548ae..4b082280 100644 --- a/unified-doc/src/pages/index.tsx +++ b/unified-doc/src/pages/index.tsx @@ -57,7 +57,7 @@ const products = [ logo: `${IMG}/openziti-sm-logo.svg`, tag: 'Open Source', accent: GREEN, - link: `${DOCS_BASE}openziti/learn/introduction`, + link: `${DOCS_BASE}openziti/intro`, features: ['Community support', 'Full overlay mesh: controller, routers, and SDKs', 'Embed zero-trust in any application'], description: 'The open-source zero-trust networking framework behind NetFoundry. Add zero trust to existing apps with tunnelers, or embed it directly with the SDK for the strongest posture.' }, diff --git a/unified-doc/src/theme/Layout/index.tsx b/unified-doc/src/theme/Layout/index.tsx index d9161843..2d61ba17 100644 --- a/unified-doc/src/theme/Layout/index.tsx +++ b/unified-doc/src/theme/Layout/index.tsx @@ -24,6 +24,7 @@ const mapFooter = (p: string) => { export default function LayoutWrapper(props: NetFoundryLayoutProps): ReactNode { const {pathname} = useLocation(); + const isApiPage = /(api-reference|openapi-reference)$/.test(pathname); let starProps: StarUsProps | undefined; if (matchPath(pathname, 'openziti')) { starProps = { @@ -39,8 +40,19 @@ export default function LayoutWrapper(props: NetFoundryLayoutProps): ReactNode { const footerToShow = mapFooter(pathname); return ( + {isApiPage && ( +
+ +
+ )} {props.children}
); } -