feat: full site build — Project/Melody schema (Option A), admin CRUD, public sections, uploads, email+SMTP, internal analytics, legal pages, docs
This commit is contained in:
+4
-4
@@ -1,6 +1,6 @@
|
||||
import type { Metadata } from "next";
|
||||
import { getActiveLocale, getDictionary, type Locale } from "@/lib/i18n";
|
||||
import { getLocalizedPath, getLocalizedUrl, getModeValue, isComingSoonMode } from "@/lib/site";
|
||||
import { getLocalizedPath, getLocalizedUrl, getModeValue, isSiteClosedMode } from "@/lib/site";
|
||||
|
||||
type PageKey = "home" | "about" | "contact";
|
||||
|
||||
@@ -31,8 +31,8 @@ export function buildPageMetadata(locale: Locale, page: PageKey): Metadata {
|
||||
} as const;
|
||||
|
||||
const pageMetadata = metadataByPage[page];
|
||||
const canonicalPath = isComingSoonMode() && page === "home" ? "/" : getLocalizedPath(pathname, activeLocale);
|
||||
const alternates = isComingSoonMode()
|
||||
const canonicalPath = isSiteClosedMode() && page === "home" ? "/" : getLocalizedPath(pathname, activeLocale);
|
||||
const alternates = isSiteClosedMode()
|
||||
? {
|
||||
canonical: canonicalPath,
|
||||
languages: {
|
||||
@@ -56,7 +56,7 @@ export function buildPageMetadata(locale: Locale, page: PageKey): Metadata {
|
||||
openGraph: {
|
||||
title: pageMetadata.title,
|
||||
description: pageMetadata.description,
|
||||
url: isComingSoonMode() && page === "home" ? getLocalizedUrl("/", "en") : getLocalizedUrl(pathname, activeLocale),
|
||||
url: isSiteClosedMode() && page === "home" ? getLocalizedUrl("/", "en") : getLocalizedUrl(pathname, activeLocale),
|
||||
siteName: dictionary.common.siteTitle,
|
||||
locale: activeLocale === "ar" ? "ar_SA" : "en_US",
|
||||
type: "website",
|
||||
|
||||
Reference in New Issue
Block a user