Interne Vorschau-Seite /demo-abo/ für Konto mit aktivem Abo
Neue, nicht verlinkte Seite (noindex, aus der Sitemap ausgeschlossen), die beim Aufruf ein Demo-Konto mit aktivem "Großes Abo" (14 bezahlte Monate, verfügbare + bereits eingelöste Teddy-Prämien, mehrere Benachrichtigungen, laufender Treuebonus-Fortschritt) ins localStorage DES AUFRUFENDEN BROWSERS schreibt und direkt zum Abo-Tab im Kundenkonto weiterleitet — ändert nichts an echten Kundendaten, jede Person sieht die Vorschau nur bei sich selbst. Dafür neu: Layout.astro bekommt eine noindex-Prop, und die Kontoseite unterstützt jetzt Deep-Links per URL-Hash (#abo, #treuebonus, …), damit die Vorschau direkt im richtigen Tab landet. Separat per `wrangler pages deploy --branch=vorschau-abo` auf eine eigene Vorschau-URL deployed (vorschau-abo.vans-diy-bastelbedarf.pages.dev) — komplett getrennt von der normalen Produktions-URL, wird nicht durch den GitHub-Actions-Workflow (nur branch=main) überschrieben. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
380a32db87
commit
fec6626d1a
@@ -13,6 +13,9 @@ interface Props {
|
||||
path?: string;
|
||||
/** Seite existiert nur auf Deutsch (Rechtstexte) — siehe LanguageSwitcher. */
|
||||
legalOnly?: boolean;
|
||||
/** Interne Vorschau-/Demoseiten (z.B. /demo-abo/) sollen nie von Suchmaschinen indexiert
|
||||
* werden — setzt zusätzlich zum Sitemap-Ausschluss noch ein robots-Meta. */
|
||||
noindex?: boolean;
|
||||
}
|
||||
const {
|
||||
title,
|
||||
@@ -20,6 +23,7 @@ const {
|
||||
lang = defaultLocale,
|
||||
path = "/",
|
||||
legalOnly = false,
|
||||
noindex = false,
|
||||
} = Astro.props;
|
||||
|
||||
const t = useTranslations(lang);
|
||||
@@ -39,6 +43,7 @@ const p = (href: string) => `${localePrefix(lang)}${href}`;
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
<title>{title} · Van's DIY & Bastelbedarf</title>
|
||||
<meta name="description" content={description} />
|
||||
{noindex && <meta name="robots" content="noindex, nofollow" />}
|
||||
<link rel="canonical" href={new URL(Astro.url.pathname, Astro.site ?? "https://vans-diy-bastelbedarf.de").toString()} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="Van's DIY & Bastelbedarf" />
|
||||
|
||||
Reference in New Issue
Block a user