diff --git a/.env.example b/.env.example index 5d6e98ce1..7411c1692 100644 --- a/.env.example +++ b/.env.example @@ -8,6 +8,20 @@ SPREE_PUBLISHABLE_KEY=your_publishable_api_key NEXT_PUBLIC_DEFAULT_COUNTRY=us NEXT_PUBLIC_DEFAULT_LOCALE=en NEXT_PUBLIC_STORE_NAME=Spree Store +NEXT_PUBLIC_STORE_DESCRIPTION=A modern e-commerce storefront powered by Spree Commerce and Next.js. + +# Store SEO settings (server-side only) +STORE_URL=https://your-store-domain.com +STORE_SEO_TITLE= +STORE_META_DESCRIPTION= +STORE_META_KEYWORDS= + +# Store social / Organization JSON-LD (optional) +STORE_TWITTER= +STORE_FACEBOOK= +STORE_INSTAGRAM= +STORE_LOGO_URL= +STORE_SUPPORT_EMAIL= # Google Tag Manager (leave empty to disable) GTM_ID= diff --git a/public/social-image.png b/public/social-image.png new file mode 100644 index 000000000..44c7e319b Binary files /dev/null and b/public/social-image.png differ diff --git a/src/app/[country]/[locale]/(checkout)/layout.tsx b/src/app/[country]/[locale]/(checkout)/layout.tsx index c0c1af9d8..5079cd4d7 100644 --- a/src/app/[country]/[locale]/(checkout)/layout.tsx +++ b/src/app/[country]/[locale]/(checkout)/layout.tsx @@ -19,7 +19,7 @@ function CheckoutHeader() { Spree Store; } +export async function generateMetadata({ + params, +}: CategoryPageProps): Promise { + const { country, locale, permalink } = await params; + return generateCategoryMetadata({ country, locale, permalink }); +} + export default async function CategoryPage({ params }: CategoryPageProps) { const { country, locale, permalink } = await params; const fullPermalink = permalink.join("/"); @@ -34,8 +45,14 @@ export default async function CategoryPage({ params }: CategoryPageProps) { notFound(); } + const storeUrl = getStoreUrl(); + return (
+ {storeUrl && ( + + )} + {/* Banner Image — returns null when image missing or fails to load */} diff --git a/src/app/[country]/[locale]/(storefront)/page.tsx b/src/app/[country]/[locale]/(storefront)/page.tsx index 5513d9fbb..5de9a508e 100644 --- a/src/app/[country]/[locale]/(storefront)/page.tsx +++ b/src/app/[country]/[locale]/(storefront)/page.tsx @@ -1,6 +1,9 @@ +import type { Metadata } from "next"; import Link from "next/link"; import { ProductCarousel } from "@/components/products/ProductCarousel"; import { Button } from "@/components/ui/button"; +import { generateHomeMetadata } from "@/lib/metadata/home"; +import { getStoreDescription, getStoreName } from "@/lib/seo"; interface HomePageProps { params: Promise<{ @@ -9,6 +12,13 @@ interface HomePageProps { }>; } +export async function generateMetadata({ + params, +}: HomePageProps): Promise { + const { country, locale } = await params; + return generateHomeMetadata({ country, locale }); +} + export default async function HomePage({ params }: HomePageProps) { const { country, locale } = await params; const basePath = `/${country}/${locale}`; @@ -20,11 +30,10 @@ export default async function HomePage({ params }: HomePageProps) {

- Welcome to Spree Store + Welcome to {getStoreName()}

- Discover amazing products with our modern e-commerce experience - powered by Spree Commerce. + {getStoreDescription()}