Add email verification, personal calendar feed, and full SEO implementation
- Customer accounts now require email verification (hashed, single-use, time-limited tokens) before they can request/confirm bookings, with resend flows on login/account/booking widget and rate limiting. - Admins get a private, rotatable iCalendar (ICS) subscription feed of their confirmed bookings and public events, timezone-correct for Europe/Berlin including DST, never exposing meeting passwords. - Adds a full SEO layer: per-page canonical/OG/Twitter metadata with CMS-editable overrides and content-derived fallbacks, a dynamic sitemap.xml and robots.txt driven by real published content, JSON-LD (Organization/LocalBusiness, WebSite, WebPage, BreadcrumbList, Service, Event, BlogPosting) that never fabricates data, and a CMS-managed redirect table for changed slugs. - Global ANOUMA-naming audit: the brand name is never used to label personal account/calendar areas anywhere in the app, CMS, or emails. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import type { Metadata } from "next";
|
||||
import { siteConfig } from "@/lib/site";
|
||||
import { getSiteUrl, isSiteIndexable } from "./config";
|
||||
|
||||
/**
|
||||
* Single shared Metadata builder used by every public page's
|
||||
* generateMetadata — guarantees every page gets its own canonical, robots,
|
||||
* Open Graph and Twitter/X card data instead of copy-pasted boilerplate
|
||||
* (and the accidental duplicate-description bugs that come with that).
|
||||
*
|
||||
* `path` is the page's path relative to the site root (e.g.
|
||||
* "/angebote/doula-begleitung", or "" for the homepage).
|
||||
*/
|
||||
export async function buildMetadata(args: {
|
||||
title: string;
|
||||
description: string;
|
||||
path: string;
|
||||
ogImageUrl?: string;
|
||||
keywords?: string;
|
||||
noindex?: boolean;
|
||||
type?: "website" | "article";
|
||||
}): Promise<Metadata> {
|
||||
const [siteUrl, sitewideIndexable] = await Promise.all([getSiteUrl(), isSiteIndexable()]);
|
||||
const canonical = `${siteUrl}${args.path}`;
|
||||
const indexable = !args.noindex && sitewideIndexable;
|
||||
const images = args.ogImageUrl ? [{ url: args.ogImageUrl }] : undefined;
|
||||
|
||||
return {
|
||||
title: args.title,
|
||||
description: args.description,
|
||||
keywords: args.keywords,
|
||||
alternates: { canonical },
|
||||
robots: indexable
|
||||
? { index: true, follow: true }
|
||||
: { index: false, follow: false },
|
||||
openGraph: {
|
||||
title: args.title,
|
||||
description: args.description,
|
||||
url: canonical,
|
||||
siteName: siteConfig.name,
|
||||
type: args.type ?? "website",
|
||||
images,
|
||||
locale: siteConfig.locale,
|
||||
},
|
||||
twitter: {
|
||||
card: images ? "summary_large_image" : "summary",
|
||||
title: args.title,
|
||||
description: args.description,
|
||||
images: images?.map((image) => image.url),
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user