diff --git a/Dockerfile b/Dockerfile index 07ecf3b..5d36e22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,15 @@ FROM node:20-alpine AS builder WORKDIR /app -# Add build arguments for Umami +# Add build arguments for Umami and Site URL ARG UMAMI_SCRIPT ARG UMAMI_ID +ARG NEXT_PUBLIC_SITE_URL # Set environment variables for the build process ENV UMAMI_SCRIPT=$UMAMI_SCRIPT ENV UMAMI_ID=$UMAMI_ID +ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL ENV NODE_ENV=production # Copy package files diff --git a/app/layout.tsx b/app/layout.tsx index bf042dd..73c58af 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,6 +2,8 @@ import type { Metadata } from 'next'; import './globals.css'; import { Providers } from '@/components/providers/Providers'; +const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'; + export const metadata: Metadata = { title: 'Kit - Your Creative Toolkit', description: 'A curated collection of creative and utility tools for developers and creators. Features file conversion, image editing, and color manipulation.', @@ -9,11 +11,11 @@ export const metadata: Metadata = { authors: [{ name: 'pivoine.art' }], creator: 'pivoine.art', publisher: 'pivoine.art', - metadataBase: new URL('https://kit.pivoine.art'), + metadataBase: new URL(siteUrl), openGraph: { title: 'Kit - Your Creative Toolkit', description: 'A curated collection of creative and utility tools for developers and creators. Privacy-first, open source, and free to use.', - url: 'https://kit.pivoine.art', + url: siteUrl, siteName: 'Kit', locale: 'en_US', type: 'website', @@ -58,7 +60,6 @@ export default function RootLayout({
- {isProd && umamiScript && umamiId && ( )}