feat: use NEXT_PUBLIC_SITE_URL and remove redundant preconnect
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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({
|
||||
<html lang="en" className="dark" suppressHydrationWarning>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="preconnect" href="https://kit.pivoine.art" />
|
||||
{isProd && umamiScript && umamiId && (
|
||||
<script defer src={umamiScript} data-website-id={umamiId}></script>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user