fix: clean up code and add canonical url

This commit is contained in:
Dominik Koch
2025-07-24 13:35:06 +02:00
parent 81ad5c1782
commit 275a23f583
3 changed files with 25 additions and 16 deletions
+6 -15
View File
@@ -1,24 +1,15 @@
import { Metadata } from "next"; import type { Metadata } from "next";
import { SITE_INFO, SITE_URL } from "@/constants/site";
export const SITE_INFO = {
title: "OpenCut",
description:
"A simple but powerful video editor that gets the job done. In your browser.",
url: "https://opencut.app",
openGraphImage: "https://opencut.app/open-graph/default.jpg",
twitterImage: "/open-graph/default.jpg",
favicon: "/favicon.ico",
};
export const baseMetaData: Metadata = { export const baseMetaData: Metadata = {
metadataBase: new URL("https://opencut.app"), metadataBase: new URL(SITE_URL),
title: SITE_INFO.title, title: SITE_INFO.title,
description: SITE_INFO.description, description: SITE_INFO.description,
openGraph: { openGraph: {
title: SITE_INFO.title, title: SITE_INFO.title,
description: SITE_INFO.description, description: SITE_INFO.description,
url: "https://opencut.app", url: SITE_URL,
siteName: "OpenCut", siteName: SITE_INFO.title,
locale: "en_US", locale: "en_US",
type: "website", type: "website",
images: [ images: [
@@ -26,7 +17,7 @@ export const baseMetaData: Metadata = {
url: SITE_INFO.openGraphImage, url: SITE_INFO.openGraphImage,
width: 1200, width: 1200,
height: 630, height: 630,
alt: "OpenCut", alt: "OpenCut Wordmark",
}, },
], ],
}, },
+8
View File
@@ -1,6 +1,14 @@
import { Hero } from "@/components/landing/hero"; import { Hero } from "@/components/landing/hero";
import { Header } from "@/components/header"; import { Header } from "@/components/header";
import { Footer } from "@/components/footer"; import { Footer } from "@/components/footer";
import type { Metadata } from "next";
import { SITE_URL } from "@/constants/site";
export const metadata: Metadata = {
alternates: {
canonical: SITE_URL,
},
};
export default async function Home() { export default async function Home() {
return ( return (
+11 -1
View File
@@ -1 +1,11 @@
export const SITE_URL = "https://opencut.app"; export const SITE_URL = "https://opencut.app";
export const SITE_INFO = {
title: "OpenCut",
description:
"A simple but powerful video editor that gets the job done. In your browser.",
url: SITE_URL,
openGraphImage: "/open-graph/default.jpg",
twitterImage: "/open-graph/default.jpg",
favicon: "/favicon.ico",
};