From a16683cd99f9000c01da8bdf52074f34a7344e66 Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Fri, 30 Jan 2026 11:11:48 -0600 Subject: [PATCH 1/3] Customize DN link in intro CTA --- docs/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/intro.md b/docs/intro.md index 7a29dfad..b3d29e89 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -16,7 +16,7 @@ with on-demand, encrypted tunnels that work across any IP networks and without o Managed Nebula is Nebula with automated certificate management, SSO integration, and a web UI — ideal for teams that want Nebula without running the infrastructure themselves. -[Connect up to 100 devices for free](https://admin.defined.net/signup) +Connect up to 100 devices for free ::: From 56d64b71fa83d74311804948b4108f932097bb2c Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Fri, 30 Jan 2026 11:31:24 -0600 Subject: [PATCH 2/3] Use a swizzled MDX component to ensure *all* defined.net links get the referer --- docs/intro.md | 2 +- docusaurus.config.ts | 3 +++ package.json | 13 +++--------- pnpm-lock.yaml | 13 +++++++----- src/theme/MDXComponents/A/index.tsx | 31 +++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 src/theme/MDXComponents/A/index.tsx diff --git a/docs/intro.md b/docs/intro.md index b3d29e89..7a29dfad 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -16,7 +16,7 @@ with on-demand, encrypted tunnels that work across any IP networks and without o Managed Nebula is Nebula with automated certificate management, SSO integration, and a web UI — ideal for teams that want Nebula without running the infrastructure themselves. -Connect up to 100 devices for free +[Connect up to 100 devices for free](https://admin.defined.net/signup) ::: diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 21d68386..0a9763a6 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -134,14 +134,17 @@ const config: Config = { { label: 'Home', href: 'https://defined.net', + rel: 'noopener', }, { label: 'Blog', href: 'https://defined.net/blog', + rel: 'noopener', }, { label: 'Docs', href: 'https://docs.defined.net', + rel: 'noopener', }, ], }, diff --git a/package.json b/package.json index f8c05a22..4e235b49 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/preset-classic": "3.9.2", + "@docusaurus/theme-common": "3.9.2", "@mdx-js/react": "^3.1.1", "clsx": "^2.1.1", "parse-domain": "^8.2.2", @@ -41,16 +42,8 @@ "uvu": "^0.5.6" }, "browserslist": { - "production": [ - ">0.5%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] + "production": [">0.5%", "not dead", "not op_mini all"], + "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"] }, "packageManager": "pnpm@9.7.0", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b55f15c..46433717 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@docusaurus/preset-classic': specifier: 3.9.2 version: 3.9.2(@algolia/client-search@5.41.0)(@mdx-js/react@3.1.1(@types/react@19.2.2)(react@19.2.4))(@types/react@19.2.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.0)(typescript@5.9.3) + '@docusaurus/theme-common': + specifier: 3.9.2 + version: 3.9.2(@docusaurus/plugin-content-docs@3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.2)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3))(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@mdx-js/react': specifier: ^3.1.1 version: 3.1.1(@types/react@19.2.2)(react@19.2.4) @@ -7151,7 +7154,7 @@ snapshots: '@babel/preset-env': 7.28.5(@babel/core@7.28.5) '@babel/preset-react': 7.28.5(@babel/core@7.28.5) '@babel/preset-typescript': 7.28.5(@babel/core@7.28.5) - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 '@babel/runtime-corejs3': 7.28.4 '@babel/traverse': 7.28.5 '@docusaurus/logger': 3.9.2 @@ -9980,7 +9983,7 @@ snapshots: history@4.10.1: dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 loose-envify: 1.4.0 resolve-pathname: 3.0.0 tiny-invariant: 1.3.3 @@ -11774,13 +11777,13 @@ snapshots: react-loadable-ssr-addon-v5-slorber@1.0.1(@docusaurus/react-loadable@6.0.0(react@19.2.4))(webpack@5.102.1): dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.4)' webpack: 5.102.1 react-router-config@5.1.1(react-router@5.3.4(react@19.2.4))(react@19.2.4): dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 react: 19.2.4 react-router: 5.3.4(react@19.2.4) @@ -11797,7 +11800,7 @@ snapshots: react-router@5.3.4(react@19.2.4): dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 diff --git a/src/theme/MDXComponents/A/index.tsx b/src/theme/MDXComponents/A/index.tsx new file mode 100644 index 00000000..251069c1 --- /dev/null +++ b/src/theme/MDXComponents/A/index.tsx @@ -0,0 +1,31 @@ +import Link from '@docusaurus/Link'; +import { useAnchorTargetClassName } from '@docusaurus/theme-common'; +import type { Props } from '@theme/MDXComponents/A'; +import clsx from 'clsx'; +import React, { type ReactNode } from 'react'; + +export default function MDXA(props: Props): ReactNode { + // MDX Footnotes have ids such as + const anchorTargetClassName = useAnchorTargetClassName(props.id); + + // Customize rel attribute for *.defined.net links + let customRel = props.rel; + let customTarget = props.target; + if (props.href && typeof props.href === 'string') { + try { + const url = new URL(props.href, window.location.href); + // Check if it's an external link to *.defined.net + if (url.hostname.endsWith('.defined.net') || url.hostname === 'defined.net') { + // Override to only use 'noopener' (exclude 'noreferrer') + customRel = 'noopener'; + customTarget = '_blank'; + } + } catch { + // Invalid URL, let default behavior handle it + } + } + + return ( + + ); +} From ffcfac7ac6712bb1cebd464ce1a2a5f6f8382a21 Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Fri, 30 Jan 2026 11:32:29 -0600 Subject: [PATCH 3/3] pnpm format --- package.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4e235b49..48531c38 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,16 @@ "uvu": "^0.5.6" }, "browserslist": { - "production": [">0.5%", "not dead", "not op_mini all"], - "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"] + "production": [ + ">0.5%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] }, "packageManager": "pnpm@9.7.0", "engines": {