Openstatus www.openstatus.dev

fix: title and canonical tag

authored by

Maximilian Kaske and committed by
Maximilian Kaske
71691b3b 2ea34115

+25 -1
+4
apps/web/src/app/status-page/[domain]/events/page.tsx
··· 6 6 import { searchParamsCache } from "./search-params"; 7 7 import { formatter } from "./utils"; 8 8 9 + export const metadata: Metadata = { 10 + title: "Events", 11 + }; 12 + 9 13 type Props = { 10 14 params: Promise<{ domain: string }>; 11 15 searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
+4
apps/web/src/app/status-page/[domain]/events/report/[id]/page.tsx
··· 7 7 import { Badge } from "@openstatus/ui/src/components/badge"; 8 8 import { CopyLinkButton } from "./_components/copy-link-button"; 9 9 10 + export const metadata: Metadata = { 11 + title: "Report", 12 + }; 13 + 10 14 export default async function IncidentPage(props: { 11 15 params: Promise<{ domain: string; id: string }>; 12 16 }) {
+9 -1
apps/web/src/app/status-page/[domain]/layout.tsx
··· 80 80 81 81 return { 82 82 ...defaultMetadata, 83 - title: page?.title, 83 + title: { 84 + template: `%s | ${page?.title}`, 85 + default: page?.title, 86 + }, 84 87 description: page?.description, 85 88 icons: page?.icon, 89 + alternates: { 90 + canonical: page?.customDomain 91 + ? `https://${page.customDomain}` 92 + : `https://${page.slug}.openstatus.dev`, 93 + }, 86 94 twitter: { 87 95 ...twitterMetadata, 88 96 images: [
+4
apps/web/src/app/status-page/[domain]/monitors/[id]/page.tsx
··· 27 27 28 28 export const revalidate = 120; 29 29 30 + export const metadata: Metadata = { 31 + title: "Monitor", 32 + }; 33 + 30 34 export default async function Page(props: { 31 35 params: Promise<{ domain: string; id: string }>; 32 36 searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
+4
apps/web/src/app/status-page/[domain]/monitors/page.tsx
··· 14 14 15 15 // Add loading page 16 16 17 + export const metadata: Metadata = { 18 + title: "Monitors", 19 + }; 20 + 17 21 export const revalidate = 120; 18 22 19 23 export default async function Page(props: {