Skip to content

Commit aaadecb

Browse files
committed
Fix the 404 on every operator quick start link
The four "Open quick start" buttons - one on the homepage, three on /kubernetes-operator - all pointed at /documentdb-kubernetes-operator/preview/, which 404s. The operator docs are versioned as /<version-or-alias>/preview/...; `preview` is the content root inside a version, mirroring the upstream source layout, not a version itself. The URL skipped the version segment entirely. Point the link at the kind quick start under the `latest` alias, which also resolves the long-standing label mismatch: every call site says "Open quick start", but the old target was the docs home. Renamed the constant to match what it now links to. Linking the content page directly also skips two meta-refresh stubs - /documentdb-kubernetes-operator/ and .../latest/ both return HTTP 200 with no Location header and bounce via <meta http-equiv="refresh">, so link checkers and crawlers see a content-free page. Fixes #125
1 parent 9505e9c commit aaadecb

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎app/kubernetes-operator/page.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import CommandSnippet from "../components/CommandSnippet";
22
import { getMetadata } from "../services/metadataService";
33
import {
4-
documentdbKubernetesOperatorDocsUrl,
4+
documentdbKubernetesOperatorQuickStartUrl,
55
documentdbKubernetesOperatorGitHubUrl,
66
} from "../services/externalLinks";
77

@@ -279,7 +279,7 @@ export default function KubernetesOperatorPage() {
279279
</p>
280280
<div className="flex flex-col gap-3 sm:flex-row sm:flex-wrap">
281281
<a
282-
href={documentdbKubernetesOperatorDocsUrl}
282+
href={documentdbKubernetesOperatorQuickStartUrl}
283283
className="inline-flex w-full items-center justify-center rounded-md bg-emerald-500 px-6 py-3 text-sm font-semibold text-white transition-colors hover:bg-emerald-400 sm:w-auto"
284284
>
285285
Open quick start
@@ -466,7 +466,7 @@ export default function KubernetesOperatorPage() {
466466
</p>
467467
</div>
468468
<a
469-
href={documentdbKubernetesOperatorDocsUrl}
469+
href={documentdbKubernetesOperatorQuickStartUrl}
470470
className="inline-flex items-center justify-center rounded-md bg-emerald-500 px-5 py-3 text-sm font-semibold text-white transition-colors hover:bg-emerald-400"
471471
>
472472
Open quick start
@@ -490,7 +490,7 @@ export default function KubernetesOperatorPage() {
490490
</p>
491491
<div className="flex flex-col justify-center gap-3 sm:flex-row sm:flex-wrap">
492492
<a
493-
href={documentdbKubernetesOperatorDocsUrl}
493+
href={documentdbKubernetesOperatorQuickStartUrl}
494494
className="inline-flex w-full items-center justify-center rounded-md bg-emerald-500 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-emerald-400 sm:w-auto"
495495
>
496496
Open quick start

‎app/page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Image from "next/image";
22
import Link from "next/link";
33
import CommandSnippet from "./components/CommandSnippet";
4-
import { documentdbKubernetesOperatorDocsUrl } from "./services/externalLinks";
4+
import { documentdbKubernetesOperatorQuickStartUrl } from "./services/externalLinks";
55
import { getMetadata } from "./services/metadataService";
66
import { withBasePath } from "./services/sitePath";
77

@@ -549,7 +549,7 @@ export default function Home() {
549549
Read operator overview
550550
</Link>
551551
<a
552-
href={documentdbKubernetesOperatorDocsUrl}
552+
href={documentdbKubernetesOperatorQuickStartUrl}
553553
className="inline-flex items-center justify-center rounded-md border border-emerald-400/30 bg-emerald-500/10 px-6 py-3 text-sm font-semibold text-emerald-200 transition-colors hover:bg-emerald-500/20"
554554
>
555555
Open quick start

‎app/services/externalLinks.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
export const documentdbDiscordUrl = 'https://discord.gg/vH7bYu524D';
22

3-
export const documentdbKubernetesOperatorDocsUrl =
4-
'https://documentdb.io/documentdb-kubernetes-operator/preview/';
3+
// The operator docs are versioned as /<version-or-alias>/preview/..., where
4+
// `preview` is the content root inside a version - not a version itself. Use
5+
// the `latest` alias so the link follows operator releases, and link the kind
6+
// quick start directly: it is what every call site labels the link, and both
7+
// /documentdb-kubernetes-operator/ and .../latest/ are meta-refresh stubs that
8+
// only browsers follow.
9+
export const documentdbKubernetesOperatorQuickStartUrl =
10+
'https://documentdb.io/documentdb-kubernetes-operator/latest/preview/getting-started/quickstart-kind/';
511

612
export const documentdbKubernetesOperatorGitHubUrl =
713
'https://github.com/documentdb/documentdb-kubernetes-operator';

0 commit comments

Comments
 (0)