fix(site): use docs() helper for hardcoded documentation URLs (#23606)

This commit is contained in:
david-fraley
2026-03-26 17:10:47 +00:00
committed by GitHub
parent 6dee7cf11d
commit fea4560a64
6 changed files with 10 additions and 6 deletions
@@ -44,7 +44,7 @@ const PaywallAIGovernance = () => {
<span>
Visit{" "}
<a
href="https://coder.com/docs/ai-coder/ai-bridge"
href={docs("/ai-coder/ai-bridge")}
target="_blank"
rel="noreferrer"
className="text-content-link"
@@ -10,6 +10,7 @@ import {
import { isExternalApp, needsSessionToken } from "modules/apps/apps";
import { useAppLink } from "modules/apps/useAppLink";
import { type FC, type ReactNode, useState } from "react";
import { docs } from "utils/docs";
import type * as TypesGen from "#/api/typesGenerated";
import { DropdownMenuItem } from "#/components/DropdownMenu/DropdownMenu";
import { Link } from "#/components/Link/Link";
@@ -98,7 +99,7 @@ export const AppLink: FC<AppLinkProps> = ({
<>
Port forwarding will not work because hostname is too long, see the{" "}
<Link
href="https://coder.com/docs/user-guides/workspace-access/port-forwarding#dashboard"
href={docs("/user-guides/workspace-access/port-forwarding#dashboard")}
target="_blank"
size="sm"
>
@@ -7,6 +7,7 @@ import {
} from "components/PageHeader/PageHeader";
import type { FC, PropsWithChildren } from "react";
import { Outlet } from "react-router";
import { docs } from "utils/docs";
const AIBridgeSessionsLayout: FC<PropsWithChildren> = () => {
return (
@@ -20,7 +21,7 @@ const AIBridgeSessionsLayout: FC<PropsWithChildren> = () => {
<PageHeaderSubtitle>
Centralized auditing for LLM usage across your organization.{" "}
<Link
href="https://coder.com/docs/ai-coder/ai-governance"
href={docs("/ai-coder/ai-governance")}
className="ml-auto"
target="_blank"
>
@@ -2,6 +2,7 @@ import { type FC, useEffect, useRef, useState } from "react";
import { useQuery } from "react-query";
import { Link } from "react-router";
import { toast } from "sonner";
import { docs } from "utils/docs";
import { isApiError } from "#/api/errors";
import { workspaces } from "#/api/queries/workspaces";
import type * as TypesGen from "#/api/typesGenerated";
@@ -338,7 +339,7 @@ export const AgentCreateForm: FC<AgentCreateFormProps> = ({
<p className="mt-1 text-center text-xs text-content-secondary/50">
Coder Agents is available via{" "}
<a
href="https://coder.com/docs/ai-coder/agents/early-access"
href={docs("/ai-coder/agents/early-access")}
target="_blank"
rel="noreferrer"
className="text-content-secondary/50 underline hover:text-content-secondary"
@@ -1,5 +1,6 @@
import { useFormik } from "formik";
import type { FC } from "react";
import { docs } from "utils/docs";
import { getFormHelpers } from "utils/formUtils";
import type { UpdateAppearanceConfig } from "#/api/typesGenerated";
import {
@@ -89,7 +90,7 @@ export const AppearanceSettingsPageView: FC<
<PopoverPaywall
message="Appearance"
description="With a Premium license, you can customize the appearance and branding of your deployment."
documentationLink="https://coder.com/docs/admin/appearance"
documentationLink={docs("/admin/setup/appearance")}
/>
</TooltipContent>
</Tooltip>
@@ -62,7 +62,7 @@ export const OverviewPageView: FC<OverviewPageViewProps> = ({
It is recommended that you remove these experiments from your
configuration as they have no effect. See{" "}
<Link
href="https://coder.com/docs/reference/cli/server#--experiments"
href={docs("/reference/cli/server#--experiments")}
target="_blank"
rel="noreferrer"
>