Skip to content

Commit cb3f49b

Browse files
committed
Point the quick start links at the quick start
#135 fixed the 404 behind this constant by adding the missing version segment, so the links work now, but all four call sites label themselves "Open quick start" and land on the documentation home instead - the reader still has to find the quick start from there. Renamed the constant for what every caller actually wants and pointed it at the kind quick start, which is the operator's canonical local walkthrough. Linking the page directly also skips the redirect stubs at /documentdb-kubernetes-operator/ and .../latest/, which are meta refreshes that only browsers follow. No call site is left wanting the docs home, so the old name is gone rather than kept as a second export.
1 parent 9dc5780 commit cb3f49b

3 files changed

Lines changed: 16 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

@@ -278,7 +278,7 @@ export default function KubernetesOperatorPage() {
278278
</p>
279279
<div className="flex flex-col gap-3 sm:flex-row sm:flex-wrap">
280280
<a
281-
href={documentdbKubernetesOperatorDocsUrl}
281+
href={documentdbKubernetesOperatorQuickStartUrl}
282282
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"
283283
>
284284
Open quick start
@@ -465,7 +465,7 @@ export default function KubernetesOperatorPage() {
465465
</p>
466466
</div>
467467
<a
468-
href={documentdbKubernetesOperatorDocsUrl}
468+
href={documentdbKubernetesOperatorQuickStartUrl}
469469
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"
470470
>
471471
Open quick start
@@ -489,7 +489,7 @@ export default function KubernetesOperatorPage() {
489489
</p>
490490
<div className="flex flex-col justify-center gap-3 sm:flex-row sm:flex-wrap">
491491
<a
492-
href={documentdbKubernetesOperatorDocsUrl}
492+
href={documentdbKubernetesOperatorQuickStartUrl}
493493
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"
494494
>
495495
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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
export const documentdbDiscordUrl = 'https://discord.gg/vH7bYu524D';
22

3-
export const documentdbKubernetesOperatorDocsUrl =
4-
'https://documentdb.io/documentdb-kubernetes-operator/latest/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. The
5+
// `latest` alias keeps this following operator releases.
6+
//
7+
// Every call site labels this link "Open quick start", so it points at the
8+
// quick start rather than the docs home. Linking the page directly also avoids
9+
// the redirect stubs at /documentdb-kubernetes-operator/ and .../latest/, which
10+
// are meta refreshes that only browsers follow.
11+
export const documentdbKubernetesOperatorQuickStartUrl =
12+
'https://documentdb.io/documentdb-kubernetes-operator/latest/preview/getting-started/quickstart-kind/';
513

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

0 commit comments

Comments
 (0)