Skip to content

Open source CapCut alternative.

TypeScript

fix(site): declare the icons and pin metadataBase

David Le569b8caa21b7
diff --git a/site/src/app/apple-icon.png b/site/public/apple-icon.png
similarity index 100%
rename from site/src/app/apple-icon.png
rename to site/public/apple-icon.png
diff --git a/site/src/app/favicon.ico b/site/public/favicon.ico
similarity index 100%
rename from site/src/app/favicon.ico
rename to site/public/favicon.ico
diff --git a/site/src/app/layout.tsx b/site/src/app/layout.tsx
index 50c27d68..a6c895d8 100644
--- a/site/src/app/layout.tsx
+++ b/site/src/app/layout.tsx
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
+import { DONKEYCUT_CANONICAL } from "@/cut/lib/hosts";
import { QueryProvider } from "@/queries/QueryProvider";
import { PostHogProvider } from "./_components/PostHogProvider";
@@ -16,8 +17,20 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
+ // The base every relative card and canonical URL resolves against. Left
+ // unset, Next reads the request's own host to resolve them, which makes the
+ // metadata of an otherwise static page request-dependent.
+ metadataBase: new URL(DONKEYCUT_CANONICAL),
title: "Donkey Cut",
description: "A video editor that does all its work on your Mac.",
+ // Declared here and served from public/ at these URLs. File-based icons —
+ // favicon.ico and apple-icon.png sitting in app/ — resolve per request, which
+ // makes the metadata of every page in the app request-dependent and holds
+ // back its static shell.
+ icons: {
+ icon: "/favicon.ico",
+ apple: "/apple-icon.png",
+ },
};
export default function RootLayout({