Verbesserung der Benutzeroberfläche und Inhalte für den Single Chat
All checks were successful
Deploy SingleChat / deploy (push) Successful in 51s
All checks were successful
Deploy SingleChat / deploy (push) Successful in 51s
This commit is contained in:
@@ -395,18 +395,10 @@ for (const locale of SEO_LOCALES) {
|
||||
}
|
||||
|
||||
function buildSitemapXml() {
|
||||
const currentDate = new Date().toISOString().split('T')[0];
|
||||
const urls = Object.entries(seoData)
|
||||
.map(([route, meta]) => {
|
||||
const priority = route === '/' ? '1.0' : '0.8';
|
||||
const changefreq = route === '/' ? 'daily' : 'weekly';
|
||||
return ` <url>
|
||||
const urls = Object.values(seoData)
|
||||
.map((meta) => ` <url>
|
||||
<loc>${meta.ogUrl}</loc>
|
||||
<lastmod>${currentDate}</lastmod>
|
||||
<changefreq>${changefreq}</changefreq>
|
||||
<priority>${priority}</priority>
|
||||
</url>`;
|
||||
})
|
||||
</url>`)
|
||||
.join('\n');
|
||||
|
||||
return `<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -461,6 +453,9 @@ function upsertJsonLd(html, schema) {
|
||||
|
||||
function upsertHreflangLinks(html, route) {
|
||||
const cleaned = html.replace(/<link\s+rel="alternate"\s+hreflang="[^"]+"\s+href="[^"]*"\s*>\n?/g, '');
|
||||
const isLocalizedHome = route === '/' || SEO_LOCALES.some((locale) => `/${locale.code}` === route);
|
||||
if (!isLocalizedHome) return cleaned;
|
||||
|
||||
const links = SEO_LOCALES.map(
|
||||
(locale) => ` <link rel="alternate" hreflang="${locale.code}" href="${SITE_URL}/${locale.code}">`
|
||||
);
|
||||
@@ -503,6 +498,21 @@ function buildLocalizedLandingContent(route, __dirname) {
|
||||
</section>`;
|
||||
}
|
||||
|
||||
function buildHomeSeoContent() {
|
||||
return `<section lang="de" style="max-width:960px;margin:24px auto;padding:0 16px;font:400 16px/1.6 sans-serif;color:#344038;">
|
||||
<p style="font:700 12px/1.2 sans-serif;color:#637067;text-transform:uppercase;margin:0 0 6px;">YPChat</p>
|
||||
<h1 style="font:700 34px/1.15 sans-serif;color:#18201b;margin:0 0 12px;">Kostenloser Single Chat ohne Anmeldung</h1>
|
||||
<p style="margin:0 0 18px;max-width:760px;">Bei YPChat kannst du kostenlos neue Singles kennenlernen, privat schreiben und direkt mit einem Nicknamen starten. Für den Einstieg wählst du Nickname, Alter, Geschlecht und Land – eine lange Registrierung ist nicht nötig.</p>
|
||||
<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;">
|
||||
<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Singles kennenlernen</h2><p style="margin:0;">Suche nach passenden Kontakten und beginne Gespräche in deinem Tempo.</p></article>
|
||||
<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Privat und respektvoll chatten</h2><p style="margin:0;">Private Unterhaltungen, Bilder im Chat sowie Blockier- und Meldefunktionen geben dir Kontrolle über deine Kontakte.</p></article>
|
||||
<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Ohne lange Anmeldung starten</h2><p style="margin:0;">Lege ein kurzes Profil an und öffne den Chat direkt im Browser.</p></article>
|
||||
</div>
|
||||
<section style="margin-top:24px;"><h2 style="font:600 24px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Häufige Fragen zum kostenlosen Single Chat</h2><h3 style="font:600 18px/1.3 sans-serif;color:#18201b;margin:16px 0 4px;">Ist der Einstieg kostenlos?</h3><p style="margin:0;">Ja. Du kannst dein Profil starten und den Chat kostenlos nutzen.</p><h3 style="font:600 18px/1.3 sans-serif;color:#18201b;margin:16px 0 4px;">Was brauche ich für den Start?</h3><p style="margin:0;">Ein Nickname sowie Alter, Geschlecht und Land genügen für den Einstieg.</p></section>
|
||||
<nav aria-label="Weitere Themen" style="margin-top:22px;"><strong style="color:#18201b;">Mehr zu YPChat:</strong> <a href="/single-chat-ohne-anmeldung">Chat ohne Anmeldung</a> · <a href="/single-treff-chat">Singles kennenlernen im Single Treff Chat</a> · <a href="/ratgeber/erste-nachricht">Tipps für die erste Nachricht</a> · <a href="/sicherheit">Sicher und anonym chatten</a></nav>
|
||||
</section>`;
|
||||
}
|
||||
|
||||
function buildSeoLandingContent(route) {
|
||||
const page = landingPages.find((entry) => entry.route === route);
|
||||
if (!page) return '';
|
||||
@@ -519,7 +529,7 @@ function buildSeoLandingContent(route) {
|
||||
<h1 style="font:700 34px/1.15 sans-serif;color:#18201b;margin:0 0 12px;">${escapeHtml(page.heading)}</h1>
|
||||
<p style="font:400 16px/1.6 sans-serif;color:#344038;margin:0 0 18px;max-width:760px;">${escapeHtml(page.intro)}</p>
|
||||
<div style="display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;">${sectionMarkup}</div>
|
||||
<p style="font:400 15px/1.6 sans-serif;color:#344038;margin:18px 0 0;">Weitere Einstiege: <a href="/kostenloser-single-chat">kostenloser Single Chat</a>, <a href="/single-chat-ohne-anmeldung">Single Chat ohne Anmeldung</a>, <a href="/single-treff-chat">Single Treff Chat</a>.</p>
|
||||
<p style="font:400 15px/1.6 sans-serif;color:#344038;margin:18px 0 0;">Entdecke weitere Bereiche von YPChat: <a href="/">Chat starten</a>, <a href="/single-chat-ohne-anmeldung">Chat ohne Anmeldung</a>, <a href="/single-treff-chat">Single Treff Chat</a> und <a href="/ratgeber">Ratgeber für bessere Gespräche</a>.</p>
|
||||
</section>`;
|
||||
}
|
||||
|
||||
@@ -557,10 +567,7 @@ function generateHTML(route, meta, __dirname) {
|
||||
html = upsertHreflangLinks(html, route);
|
||||
|
||||
if (route === '/') {
|
||||
const deLanding = buildLocalizedLandingContent('/de', __dirname);
|
||||
if (deLanding) {
|
||||
html = html.replace('<div id="app"></div>', `<div id="app">${deLanding}</div>`);
|
||||
}
|
||||
html = html.replace('<div id="app"></div>', `<div id="app">${buildHomeSeoContent()}</div>`);
|
||||
}
|
||||
|
||||
if (SEO_LOCALES.some((locale) => `/${locale.code}` === route)) {
|
||||
|
||||
Reference in New Issue
Block a user