Add multilingual SEO metadata and enhance content descriptions

- Introduced localized SEO metadata for multiple languages in routes-seo.js, improving search engine visibility.
- Updated descriptions and keywords across various views (Home, Partners, Feedback, FAQ, Rules, Safety) to better reflect the platform's focus on private and anonymous chatting.
- Enhanced user guidance in FAQ, Partners, Rules, and Safety views with additional context on privacy and chat functionality.

These changes collectively improve the site's SEO performance and user experience by providing clearer, localized content.
This commit is contained in:
Torsten Schulz (local)
2026-04-09 09:49:30 +02:00
parent 43a5e595d7
commit 0fcc6878bd
6 changed files with 283 additions and 107 deletions

View File

@@ -9,13 +9,61 @@ import SafetyView from '../views/SafetyView.vue';
const SITE_URL = 'https://www.ypchat.net'; const SITE_URL = 'https://www.ypchat.net';
const DEFAULT_IMAGE = `${SITE_URL}/static/favicon.png`; const DEFAULT_IMAGE = `${SITE_URL}/static/favicon.png`;
const SUPPORTED_LOCALES = ['de', 'en', 'fr', 'es', 'it', 'ja', 'zh', 'th', 'tl'];
const LOCALIZED_HOME_META = {
de: {
title: 'SingleChat: Kostenloser Single Chat, privat & anonym',
description: 'Kostenloser Single Chat für private und anonyme Gespräche. Lerne neue Kontakte kennen und teile Bilder sicher online.',
keywords: 'single chat, kostenloser chat, privat chatten, anonym chat, free chat, private chat, anonymous chat, online chat'
},
en: {
title: 'SingleChat: Free Private & Anonymous Single Chat',
description: 'Free single chat for private and anonymous conversations. Meet new people and share images safely online.',
keywords: 'single chat, free chat, private chat, anonymous chat, online chat, meet singles'
},
fr: {
title: 'SingleChat: Chat célibataire gratuit, privé et anonyme',
description: 'Chat célibataire gratuit pour des conversations privées et anonymes. Rencontrez de nouvelles personnes en toute sécurité.',
keywords: 'chat célibataire, chat gratuit, chat privé, chat anonyme, rencontre en ligne'
},
es: {
title: 'SingleChat: Chat gratis, privado y anónimo',
description: 'Chat gratis para solteros con conversaciones privadas y anónimas. Conoce gente nueva y comparte imágenes de forma segura.',
keywords: 'chat gratis, chat privado, chat anónimo, chat para solteros, conocer gente'
},
it: {
title: 'SingleChat: Chat single gratis, privata e anonima',
description: 'Chat single gratis per conversazioni private e anonime. Conosci nuove persone e condividi immagini in sicurezza.',
keywords: 'chat single, chat gratis, chat privata, chat anonima, incontri online'
},
ja: {
title: 'SingleChat: 無料・匿名・プライベートのシングルチャット',
description: '無料で使えるシングルチャット。匿名かつプライベートに会話でき、画像共有も安全です。',
keywords: 'シングルチャット, 無料チャット, 匿名チャット, プライベートチャット, オンラインチャット'
},
zh: {
title: 'SingleChat免费、私密、匿名的单身聊天',
description: '免费单身聊天,支持私密和匿名交流,安全分享图片并结识新朋友。',
keywords: '单身聊天, 免费聊天, 私密聊天, 匿名聊天, 在线聊天'
},
th: {
title: 'SingleChat: แชตคนโสดฟรี แบบส่วนตัวและไม่ระบุตัวตน',
description: 'แชตคนโสดฟรี สำหรับการสนทนาแบบส่วนตัวและไม่ระบุตัวตน พบผู้คนใหม่ ๆ และแชร์รูปได้อย่างปลอดภัย',
keywords: 'แชตคนโสด, แชตฟรี, แชตส่วนตัว, แชตไม่ระบุตัวตน, แชตออนไลน์'
},
tl: {
title: 'SingleChat: Libreng private at anonymous na single chat',
description: 'Libreng single chat para sa private at anonymous na usapan. Kumilala ng bagong tao at magbahagi ng larawan nang ligtas.',
keywords: 'single chat, libreng chat, private chat, anonymous chat, online chat'
}
};
const homeSchema = { const homeSchema = {
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
url: `${SITE_URL}/`, url: `${SITE_URL}/`,
description: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.', description: 'Kostenloser Single Chat für private und anonyme Gespräche. Lerne neue Kontakte kennen und tausche Bilder sicher aus.',
inLanguage: 'de-DE' inLanguage: 'de-DE'
}; };
@@ -24,7 +72,7 @@ const partnersSchema = {
'@type': 'CollectionPage', '@type': 'CollectionPage',
name: 'Partner - SingleChat', name: 'Partner - SingleChat',
url: `${SITE_URL}/partners`, url: `${SITE_URL}/partners`,
description: 'Unsere Partner und befreundete Seiten. Entdecke weitere interessante Angebote und Communities.', description: 'Partnerseiten rund um Single Chat, Community und Online-Kontakte. Entdecke weitere Angebote und hilfreiche Ressourcen.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -38,7 +86,7 @@ const feedbackSchema = {
'@type': 'CollectionPage', '@type': 'CollectionPage',
name: 'Feedback - SingleChat', name: 'Feedback - SingleChat',
url: `${SITE_URL}/feedback`, url: `${SITE_URL}/feedback`,
description: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', description: 'Öffentliches Feedback zu SingleChat: Meinungen, Vorschläge und Erfahrungsberichte für einen besseren privaten Chat.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -52,7 +100,7 @@ const faqSchema = {
'@type': 'FAQPage', '@type': 'FAQPage',
name: 'FAQ - SingleChat', name: 'FAQ - SingleChat',
url: `${SITE_URL}/faq`, url: `${SITE_URL}/faq`,
description: 'Häufige Fragen zu SingleChat: Einstieg, Privatsphäre, Bildaustausch, Blockieren und mehr.', description: 'FAQ zum kostenlosen Single Chat: anonym chatten, Privatsphäre schützen, Bilder sicher teilen und Nutzer blockieren.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -66,7 +114,7 @@ const rulesSchema = {
'@type': 'WebPage', '@type': 'WebPage',
name: 'Regeln - SingleChat', name: 'Regeln - SingleChat',
url: `${SITE_URL}/regeln`, url: `${SITE_URL}/regeln`,
description: 'Chat-Regeln für ein respektvolles und sicheres Miteinander auf SingleChat.', description: 'Regeln für respektvollen, privaten und sicheren Single Chat. Hinweise zu Verhalten, Spam und verbotenen Inhalten.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -80,7 +128,7 @@ const safetySchema = {
'@type': 'WebPage', '@type': 'WebPage',
name: 'Sicherheit - SingleChat', name: 'Sicherheit - SingleChat',
url: `${SITE_URL}/sicherheit`, url: `${SITE_URL}/sicherheit`,
description: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung von SingleChat.', description: 'Sicherheitsseite für privaten und anonymen Chat: Privatsphäre, Schutz vor Spam, Blockieren und Melden.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -95,11 +143,11 @@ const routes = [
name: 'chat', name: 'chat',
component: ChatView, component: ChatView,
meta: { meta: {
title: 'SingleChat - Chat, Single-Chat und Bildaustausch', title: 'SingleChat: Kostenloser Single Chat, privat & anonym',
description: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch. Chatte mit Menschen aus aller Welt, finde neue Kontakte und teile Erinnerungen sicher und komfortabel.', description: 'Kostenloser Single Chat für private und anonyme Gespräche. Lerne neue Kontakte kennen und teile Bilder sicher online.',
keywords: 'Chat, Single-Chat, Bildaustausch, Online-Chat, Singles, Kontakte, Community', keywords: 'single chat, kostenloser chat, privat chatten, anonym chat, free chat, private chat, anonymous chat, online chat',
ogTitle: 'SingleChat - Chat, Single-Chat und Bildaustausch', ogTitle: 'SingleChat: Kostenloser Single Chat, privat & anonym',
ogDescription: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.', ogDescription: 'Kostenlos chatten, privat bleiben und neue Kontakte kennenlernen - mit sicherem Bildaustausch.',
ogType: 'website', ogType: 'website',
image: DEFAULT_IMAGE, image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
@@ -111,11 +159,11 @@ const routes = [
name: 'partners', name: 'partners',
component: PartnersView, component: PartnersView,
meta: { meta: {
title: 'Partner - SingleChat', title: 'Partner für Single Chat & Community - SingleChat',
description: 'Unsere Partner und befreundete Seiten. Entdecke weitere interessante Angebote und Communities.', description: 'Partnerseiten rund um Single Chat, Community und Online-Kontakte. Entdecke weitere Angebote und hilfreiche Ressourcen.',
keywords: 'Partner, Links, befreundete Seiten, Community', keywords: 'single chat partner, chat community, kontaktseiten, single-chat links, online dating chat',
ogTitle: 'Partner - SingleChat', ogTitle: 'Partner für Single Chat & Community - SingleChat',
ogDescription: 'Unsere Partner und befreundete Seiten.', ogDescription: 'Befreundete Seiten und Ressourcen rund um Chat, Kontakte und Community.',
ogType: 'website', ogType: 'website',
image: DEFAULT_IMAGE, image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
@@ -127,11 +175,11 @@ const routes = [
name: 'feedback', name: 'feedback',
component: FeedbackView, component: FeedbackView,
meta: { meta: {
title: 'Feedback - SingleChat', title: 'Feedback zur Chat-Plattform - SingleChat',
description: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', description: 'Öffentliches Feedback zu SingleChat: Meinungen, Vorschläge und Erfahrungsberichte für einen besseren privaten Chat.',
keywords: 'SingleChat Feedback, Kommentare, Rueckmeldungen, Verbesserungsvorschlaege', keywords: 'chat feedback, single chat erfahrungen, rückmeldung chat, verbesserungsvorschläge',
ogTitle: 'Feedback - SingleChat', ogTitle: 'Feedback zur Chat-Plattform - SingleChat',
ogDescription: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', ogDescription: 'Teile deine Erfahrungen und Verbesserungsvorschläge für SingleChat.',
ogType: 'website', ogType: 'website',
image: DEFAULT_IMAGE, image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
@@ -143,11 +191,11 @@ const routes = [
name: 'faq', name: 'faq',
component: FaqView, component: FaqView,
meta: { meta: {
title: 'FAQ - SingleChat', title: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat',
description: 'Häufige Fragen zu SingleChat: Einstieg, Privatsphäre, Bildaustausch, Blockieren und mehr.', description: 'FAQ zum kostenlosen Single Chat: anonym chatten, Privatsphäre schützen, Bilder sicher teilen und Nutzer blockieren.',
keywords: 'SingleChat FAQ, Hilfe, Privatsphäre, Blockieren, Bilder, Chat', keywords: 'single chat faq, kostenlos chatten, anonym chatten, privater chat, safe chat',
ogTitle: 'FAQ - SingleChat', ogTitle: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat',
ogDescription: 'Antworten auf häufige Fragen rund um SingleChat.', ogDescription: 'Antworten auf Fragen zu Sicherheit, Privatsphäre und Funktionen im Single Chat.',
ogType: 'website', ogType: 'website',
image: DEFAULT_IMAGE, image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
@@ -159,11 +207,11 @@ const routes = [
name: 'regeln', name: 'regeln',
component: RulesView, component: RulesView,
meta: { meta: {
title: 'Regeln - SingleChat', title: 'Chat-Regeln für sicheren Single Chat - SingleChat',
description: 'Chat-Regeln für ein respektvolles und sicheres Miteinander auf SingleChat.', description: 'Regeln für respektvollen, privaten und sicheren Single Chat. Hinweise zu Verhalten, Spam und verbotenen Inhalten.',
keywords: 'SingleChat Regeln, Chat Regeln, Community, Sicherheit', keywords: 'chat regeln, single chat regeln, sicher chatten, spam vermeiden, community richtlinien',
ogTitle: 'Regeln - SingleChat', ogTitle: 'Chat-Regeln für sicheren Single Chat - SingleChat',
ogDescription: 'Chat-Regeln für ein respektvolles und sicheres Miteinander.', ogDescription: 'Unsere Richtlinien für respektvolle und sichere Gespräche im Chat.',
ogType: 'website', ogType: 'website',
image: DEFAULT_IMAGE, image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
@@ -175,11 +223,11 @@ const routes = [
name: 'sicherheit', name: 'sicherheit',
component: SafetyView, component: SafetyView,
meta: { meta: {
title: 'Sicherheit & Privatsphäre - SingleChat', title: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat',
description: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung von SingleChat.', description: 'Sicherheitsseite für privaten und anonymen Chat: Privatsphäre, Schutz vor Spam, Blockieren und Melden.',
keywords: 'SingleChat Sicherheit, Privatsphäre, Blockieren, Melden', keywords: 'privatsphäre chat, anonym chat sicherheit, blockieren melden, private chat safety',
ogTitle: 'Sicherheit & Privatsphäre - SingleChat', ogTitle: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat',
ogDescription: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung.', ogDescription: 'So schützt du deine Daten und chattest sicher und anonym.',
ogType: 'website', ogType: 'website',
image: DEFAULT_IMAGE, image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
@@ -204,6 +252,33 @@ const routes = [
} }
]; ];
for (const locale of SUPPORTED_LOCALES) {
const localized = LOCALIZED_HOME_META[locale] || LOCALIZED_HOME_META.de;
routes.push({
path: `/${locale}`,
name: `chat-${locale}`,
component: ChatView,
meta: {
title: localized.title,
description: localized.description,
keywords: localized.keywords,
ogTitle: localized.title,
ogDescription: localized.description,
ogType: 'website',
image: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
schema: {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'SingleChat',
url: `${SITE_URL}/${locale}`,
description: localized.description,
inLanguage: locale
}
}
});
}
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes routes
@@ -254,8 +329,12 @@ router.beforeEach((to, from, next) => {
const ogType = meta.ogType || 'website'; const ogType = meta.ogType || 'website';
const image = meta.image || DEFAULT_IMAGE; const image = meta.image || DEFAULT_IMAGE;
const robots = meta.robots || 'index, follow'; const robots = meta.robots || 'index, follow';
const localeFromPath = SUPPORTED_LOCALES.includes((to.path || '').replace('/', ''))
? (to.path || '').replace('/', '')
: 'de';
document.title = title; document.title = title;
document.documentElement.setAttribute('lang', localeFromPath);
updateMetaTag('description', description); updateMetaTag('description', description);
updateMetaTag('keywords', keywords); updateMetaTag('keywords', keywords);

View File

@@ -14,13 +14,17 @@
<main class="content-page"> <main class="content-page">
<h2>Häufige Fragen (FAQ)</h2> <h2>Häufige Fragen (FAQ)</h2>
<p> <p>
Hier beantworten wir die häufigsten Fragen zu SingleChat. Wenn dir etwas fehlt, nutze bitte die Hier beantworten wir die häufigsten Fragen zum kostenlosen Single Chat. Wenn dir etwas fehlt, nutze bitte die
<router-link to="/feedback">Feedback-Seite</router-link>. <router-link to="/feedback">Feedback-Seite</router-link>.
</p> </p>
<p>
Unser Fokus liegt auf privatem und anonymem Chatten mit klaren Regeln. Mehr dazu findest du auch unter
<router-link to="/sicherheit">Sicherheit</router-link> und <router-link to="/regeln">Regeln</router-link>.
</p>
<h3>Wie starte ich?</h3> <h3>Wie starte ich?</h3>
<p> <p>
Wähle einen Nicknamen, gib Alter, Geschlecht und Land an und starte den Chat. Du kannst danach Benutzer suchen Wähle einen Nicknamen, gib Alter, Geschlecht und Land an und starte den Chat kostenlos. Du kannst danach Benutzer suchen
und Unterhaltungen beginnen. und Unterhaltungen beginnen.
</p> </p>

View File

@@ -28,6 +28,11 @@
Hinweis: Externe Links öffnen sich in einem neuen Tab. Wenn du Partner werden möchtest, schreib uns bitte Hinweis: Externe Links öffnen sich in einem neuen Tab. Wenn du Partner werden möchtest, schreib uns bitte
über die Feedback-Seite. über die Feedback-Seite.
</p> </p>
<p class="partners-intro">
Wenn du zuerst wissen möchtest, wie privater und anonymer Chat bei uns funktioniert, schau in unsere
<router-link to="/faq">FAQ</router-link> oder auf die Seite
<router-link to="/sicherheit">Sicherheit &amp; Privatsphäre</router-link>.
</p>
<div v-if="!chatStore.isLoggedIn" class="back-link"> <div v-if="!chatStore.isLoggedIn" class="back-link">
<router-link to="/">Zurück zur Hauptseite</router-link> <router-link to="/">Zurück zur Hauptseite</router-link>
</div> </div>

View File

@@ -14,9 +14,13 @@
<main class="content-page"> <main class="content-page">
<h2>Chat-Regeln</h2> <h2>Chat-Regeln</h2>
<p> <p>
Damit SingleChat freundlich und sicher bleibt, gelten ein paar einfache Regeln. Wer wiederholt dagegen Damit der private Single Chat freundlich und sicher bleibt, gelten ein paar einfache Regeln. Wer wiederholt dagegen
verstößt, kann blockiert oder vom Chat ausgeschlossen werden. verstößt, kann blockiert oder vom Chat ausgeschlossen werden.
</p> </p>
<p>
Ergänzende Hinweise zum anonymen Chatten findest du unter
<router-link to="/sicherheit">Sicherheit &amp; Privatsphäre</router-link>.
</p>
<h3>1) Respekt</h3> <h3>1) Respekt</h3>
<p> <p>

View File

@@ -14,8 +14,8 @@
<main class="content-page"> <main class="content-page">
<h2>Sicherheit &amp; Privatsphäre</h2> <h2>Sicherheit &amp; Privatsphäre</h2>
<p> <p>
SingleChat ist auf schnellen Einstieg ausgelegt trotzdem ist uns Sicherheit wichtig. Diese Hinweise helfen dir SingleChat ist auf schnellen Einstieg ausgelegt trotzdem ist uns Sicherheit wichtig. Diese Hinweise helfen dir,
dabei, deine Privatsphäre zu schützen und gute Entscheidungen im Chat zu treffen. im privaten und anonymen Chat deine Privatsphäre zu schützen und gute Entscheidungen zu treffen.
</p> </p>
<h3>Empfehlungen für sichere Nutzung</h3> <h3>Empfehlungen für sichere Nutzung</h3>
@@ -36,7 +36,8 @@
<h3>Datenschutz</h3> <h3>Datenschutz</h3>
<p> <p>
Details findest du im Impressum/Datenschutz-Hinweis unten auf der Seite. Wenn du Fragen hast, kontaktiere uns Details findest du im Impressum/Datenschutz-Hinweis unten auf der Seite. Wenn du Fragen hast, kontaktiere uns
gern über Feedback. gern über Feedback. Für den respektvollen Umgang im Chat beachte zusätzlich unsere
<router-link to="/regeln">Chat-Regeln</router-link>.
</p> </p>
</main> </main>

View File

@@ -15,14 +15,61 @@ const SEO_LOCALES = [
{ code: 'th', label: 'Thai' }, { code: 'th', label: 'Thai' },
{ code: 'tl', label: 'Tagalog' } { code: 'tl', label: 'Tagalog' }
]; ];
const LOCALE_SEO_META = {
de: {
title: 'SingleChat: Kostenloser Single Chat, privat & anonym',
description: 'Kostenloser Single Chat für private und anonyme Gespräche. Lerne neue Kontakte kennen und teile Bilder sicher online.',
keywords: 'single chat, kostenloser chat, privat chatten, anonym chat, free chat, private chat, anonymous chat, online chat'
},
en: {
title: 'SingleChat: Free Private & Anonymous Single Chat',
description: 'Free single chat for private and anonymous conversations. Meet new people and share images safely online.',
keywords: 'single chat, free chat, private chat, anonymous chat, online chat, meet singles'
},
fr: {
title: 'SingleChat: Chat célibataire gratuit, privé et anonyme',
description: 'Chat célibataire gratuit pour des conversations privées et anonymes. Rencontrez de nouvelles personnes en toute sécurité.',
keywords: 'chat célibataire, chat gratuit, chat privé, chat anonyme, rencontre en ligne'
},
es: {
title: 'SingleChat: Chat gratis, privado y anónimo',
description: 'Chat gratis para solteros con conversaciones privadas y anónimas. Conoce gente nueva y comparte imágenes de forma segura.',
keywords: 'chat gratis, chat privado, chat anónimo, chat para solteros, conocer gente'
},
it: {
title: 'SingleChat: Chat single gratis, privata e anonima',
description: 'Chat single gratis per conversazioni private e anonime. Conosci nuove persone e condividi immagini in sicurezza.',
keywords: 'chat single, chat gratis, chat privata, chat anonima, incontri online'
},
ja: {
title: 'SingleChat: 無料・匿名・プライベートのシングルチャット',
description: '無料で使えるシングルチャット。匿名かつプライベートに会話でき、画像共有も安全です。',
keywords: 'シングルチャット, 無料チャット, 匿名チャット, プライベートチャット, オンラインチャット'
},
zh: {
title: 'SingleChat免费、私密、匿名的单身聊天',
description: '免费单身聊天,支持私密和匿名交流,安全分享图片并结识新朋友。',
keywords: '单身聊天, 免费聊天, 私密聊天, 匿名聊天, 在线聊天'
},
th: {
title: 'SingleChat: แชตคนโสดฟรี แบบส่วนตัวและไม่ระบุตัวตน',
description: 'แชตคนโสดฟรี สำหรับการสนทนาแบบส่วนตัวและไม่ระบุตัวตน พบผู้คนใหม่ ๆ และแชร์รูปได้อย่างปลอดภัย',
keywords: 'แชตคนโสด, แชตฟรี, แชตส่วนตัว, แชตไม่ระบุตัวตน, แชตออนไลน์'
},
tl: {
title: 'SingleChat: Libreng private at anonymous na single chat',
description: 'Libreng single chat para sa private at anonymous na usapan. Kumilala ng bagong tao at magbahagi ng larawan nang ligtas.',
keywords: 'single chat, libreng chat, private chat, anonymous chat, online chat'
}
};
const seoData = { const seoData = {
'/': { '/': {
title: 'SingleChat - Chat, Single-Chat und Bildaustausch', title: 'SingleChat: Kostenloser Single Chat, privat & anonym',
description: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch. Chatte mit Menschen aus aller Welt, finde neue Kontakte und teile Erinnerungen sicher und komfortabel.', description: 'Kostenloser Single Chat für private und anonyme Gespräche. Lerne neue Kontakte kennen und teile Bilder sicher online.',
keywords: 'Chat, Single-Chat, Bildaustausch, Online-Chat, Singles, Kontakte, Community', keywords: 'single chat, kostenloser chat, privat chatten, anonym chat, free chat, private chat, anonymous chat, online chat',
ogTitle: 'SingleChat - Chat, Single-Chat und Bildaustausch', ogTitle: 'SingleChat: Kostenloser Single Chat, privat & anonym',
ogDescription: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.', ogDescription: 'Kostenlos chatten, privat bleiben und neue Kontakte kennenlernen - mit sicherem Bildaustausch.',
ogType: 'website', ogType: 'website',
ogUrl: `${SITE_URL}/`, ogUrl: `${SITE_URL}/`,
ogImage: DEFAULT_IMAGE, ogImage: DEFAULT_IMAGE,
@@ -32,16 +79,16 @@ const seoData = {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
url: `${SITE_URL}/`, url: `${SITE_URL}/`,
description: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.', description: 'Kostenloser Single Chat für private und anonyme Gespräche. Lerne neue Kontakte kennen und tausche Bilder sicher aus.',
inLanguage: 'de-DE' inLanguage: 'de-DE'
} }
}, },
'/partners': { '/partners': {
title: 'Partner - SingleChat', title: 'Partner für Single Chat & Community - SingleChat',
description: 'Unsere Partner und befreundete Seiten. Entdecke weitere interessante Angebote und Communities.', description: 'Partnerseiten rund um Single Chat, Community und Online-Kontakte. Entdecke weitere Angebote und hilfreiche Ressourcen.',
keywords: 'Partner, Links, befreundete Seiten, Community', keywords: 'single chat partner, chat community, kontaktseiten, single-chat links, online dating chat',
ogTitle: 'Partner - SingleChat', ogTitle: 'Partner für Single Chat & Community - SingleChat',
ogDescription: 'Unsere Partner und befreundete Seiten.', ogDescription: 'Befreundete Seiten und Ressourcen rund um Chat, Kontakte und Community.',
ogType: 'website', ogType: 'website',
ogUrl: `${SITE_URL}/partners`, ogUrl: `${SITE_URL}/partners`,
ogImage: DEFAULT_IMAGE, ogImage: DEFAULT_IMAGE,
@@ -51,7 +98,7 @@ const seoData = {
'@type': 'CollectionPage', '@type': 'CollectionPage',
name: 'Partner - SingleChat', name: 'Partner - SingleChat',
url: `${SITE_URL}/partners`, url: `${SITE_URL}/partners`,
description: 'Unsere Partner und befreundete Seiten. Entdecke weitere interessante Angebote und Communities.', description: 'Partnerseiten rund um Single Chat, Community und Online-Kontakte. Entdecke weitere Angebote und hilfreiche Ressourcen.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -61,11 +108,11 @@ const seoData = {
} }
}, },
'/feedback': { '/feedback': {
title: 'Feedback - SingleChat', title: 'Feedback zur Chat-Plattform - SingleChat',
description: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', description: 'Öffentliches Feedback zu SingleChat: Meinungen, Vorschläge und Erfahrungsberichte für einen besseren privaten Chat.',
keywords: 'SingleChat Feedback, Kommentare, Rueckmeldungen, Verbesserungsvorschlaege', keywords: 'chat feedback, single chat erfahrungen, rückmeldung chat, verbesserungsvorschläge',
ogTitle: 'Feedback - SingleChat', ogTitle: 'Feedback zur Chat-Plattform - SingleChat',
ogDescription: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', ogDescription: 'Teile deine Erfahrungen und Verbesserungsvorschläge für SingleChat.',
ogType: 'website', ogType: 'website',
ogUrl: `${SITE_URL}/feedback`, ogUrl: `${SITE_URL}/feedback`,
ogImage: DEFAULT_IMAGE, ogImage: DEFAULT_IMAGE,
@@ -75,7 +122,7 @@ const seoData = {
'@type': 'CollectionPage', '@type': 'CollectionPage',
name: 'Feedback - SingleChat', name: 'Feedback - SingleChat',
url: `${SITE_URL}/feedback`, url: `${SITE_URL}/feedback`,
description: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', description: 'Öffentliches Feedback zu SingleChat: Meinungen, Vorschläge und Erfahrungsberichte für einen besseren privaten Chat.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -85,11 +132,11 @@ const seoData = {
} }
}, },
'/faq': { '/faq': {
title: 'FAQ - SingleChat', title: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat',
description: 'Häufige Fragen zu SingleChat: Einstieg, Privatsphäre, Bildaustausch, Blockieren und mehr.', description: 'FAQ zum kostenlosen Single Chat: anonym chatten, Privatsphäre schützen, Bilder sicher teilen und Nutzer blockieren.',
keywords: 'SingleChat FAQ, Hilfe, Privatsphäre, Blockieren, Bilder, Chat', keywords: 'single chat faq, kostenlos chatten, anonym chatten, privater chat, safe chat',
ogTitle: 'FAQ - SingleChat', ogTitle: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat',
ogDescription: 'Antworten auf häufige Fragen rund um SingleChat.', ogDescription: 'Antworten auf Fragen zu Sicherheit, Privatsphäre und Funktionen im Single Chat.',
ogType: 'website', ogType: 'website',
ogUrl: `${SITE_URL}/faq`, ogUrl: `${SITE_URL}/faq`,
ogImage: DEFAULT_IMAGE, ogImage: DEFAULT_IMAGE,
@@ -99,7 +146,7 @@ const seoData = {
'@type': 'FAQPage', '@type': 'FAQPage',
name: 'FAQ - SingleChat', name: 'FAQ - SingleChat',
url: `${SITE_URL}/faq`, url: `${SITE_URL}/faq`,
description: 'Häufige Fragen zu SingleChat: Einstieg, Privatsphäre, Bildaustausch, Blockieren und mehr.', description: 'FAQ zum kostenlosen Single Chat: anonym chatten, Privatsphäre schützen, Bilder sicher teilen und Nutzer blockieren.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -109,11 +156,11 @@ const seoData = {
} }
}, },
'/regeln': { '/regeln': {
title: 'Regeln - SingleChat', title: 'Chat-Regeln für sicheren Single Chat - SingleChat',
description: 'Chat-Regeln für ein respektvolles und sicheres Miteinander auf SingleChat.', description: 'Regeln für respektvollen, privaten und sicheren Single Chat. Hinweise zu Verhalten, Spam und verbotenen Inhalten.',
keywords: 'SingleChat Regeln, Chat Regeln, Community, Sicherheit', keywords: 'chat regeln, single chat regeln, sicher chatten, spam vermeiden, community richtlinien',
ogTitle: 'Regeln - SingleChat', ogTitle: 'Chat-Regeln für sicheren Single Chat - SingleChat',
ogDescription: 'Chat-Regeln für ein respektvolles und sicheres Miteinander.', ogDescription: 'Unsere Richtlinien für respektvolle und sichere Gespräche im Chat.',
ogType: 'website', ogType: 'website',
ogUrl: `${SITE_URL}/regeln`, ogUrl: `${SITE_URL}/regeln`,
ogImage: DEFAULT_IMAGE, ogImage: DEFAULT_IMAGE,
@@ -123,7 +170,7 @@ const seoData = {
'@type': 'WebPage', '@type': 'WebPage',
name: 'Regeln - SingleChat', name: 'Regeln - SingleChat',
url: `${SITE_URL}/regeln`, url: `${SITE_URL}/regeln`,
description: 'Chat-Regeln für ein respektvolles und sicheres Miteinander auf SingleChat.', description: 'Regeln für respektvollen, privaten und sicheren Single Chat. Hinweise zu Verhalten, Spam und verbotenen Inhalten.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -133,11 +180,11 @@ const seoData = {
} }
}, },
'/sicherheit': { '/sicherheit': {
title: 'Sicherheit & Privatsphäre - SingleChat', title: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat',
description: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung von SingleChat.', description: 'Sicherheitsseite für privaten und anonymen Chat: Privatsphäre, Schutz vor Spam, Blockieren und Melden.',
keywords: 'SingleChat Sicherheit, Privatsphäre, Blockieren, Melden', keywords: 'privatsphäre chat, anonym chat sicherheit, blockieren melden, private chat safety',
ogTitle: 'Sicherheit & Privatsphäre - SingleChat', ogTitle: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat',
ogDescription: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung.', ogDescription: 'So schützt du deine Daten und chattest sicher und anonym.',
ogType: 'website', ogType: 'website',
ogUrl: `${SITE_URL}/sicherheit`, ogUrl: `${SITE_URL}/sicherheit`,
ogImage: DEFAULT_IMAGE, ogImage: DEFAULT_IMAGE,
@@ -147,7 +194,7 @@ const seoData = {
'@type': 'WebPage', '@type': 'WebPage',
name: 'Sicherheit & Privatsphäre - SingleChat', name: 'Sicherheit & Privatsphäre - SingleChat',
url: `${SITE_URL}/sicherheit`, url: `${SITE_URL}/sicherheit`,
description: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung von SingleChat.', description: 'Sicherheitsseite für privaten und anonymen Chat: Privatsphäre, Schutz vor Spam, Blockieren und Melden.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
name: 'SingleChat', name: 'SingleChat',
@@ -158,6 +205,29 @@ const seoData = {
} }
}; };
for (const locale of SEO_LOCALES) {
const meta = LOCALE_SEO_META[locale.code] || LOCALE_SEO_META.de;
seoData[`/${locale.code}`] = {
title: meta.title,
description: meta.description,
keywords: meta.keywords,
ogTitle: meta.title,
ogDescription: meta.description,
ogType: 'website',
ogUrl: `${SITE_URL}/${locale.code}`,
ogImage: DEFAULT_IMAGE,
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
schema: {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'SingleChat',
url: `${SITE_URL}/${locale.code}`,
description: meta.description,
inLanguage: locale.code
}
};
}
function buildSitemapXml() { function buildSitemapXml() {
const currentDate = new Date().toISOString().split('T')[0]; const currentDate = new Date().toISOString().split('T')[0];
const urls = Object.entries(seoData) const urls = Object.entries(seoData)
@@ -223,42 +293,47 @@ function upsertJsonLd(html, schema) {
return html.replace('</head>', ` ${tag}\n</head>`); return html.replace('</head>', ` ${tag}\n</head>`);
} }
function upsertHreflangLinks(html, route) {
const cleaned = html.replace(/<link\s+rel="alternate"\s+hreflang="[^"]+"\s+href="[^"]*"\s*>\n?/g, '');
const links = SEO_LOCALES.map(
(locale) => ` <link rel="alternate" hreflang="${locale.code}" href="${SITE_URL}/${locale.code}">`
);
links.push(` <link rel="alternate" hreflang="x-default" href="${SITE_URL}${route}">`);
return cleaned.replace('</head>', `${links.join('\n')}\n</head>`);
}
function sanitizeLocalizedHtml(input = '') { function sanitizeLocalizedHtml(input = '') {
return String(input) return String(input)
.replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, '') .replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, '')
.trim(); .trim();
} }
function buildMultilingualSeoContent(__dirname) { function loadLocaleSeoSections(__dirname, localeCode) {
const localesDir = join(__dirname, '../client/src/i18n/locales'); const localesDir = join(__dirname, '../client/src/i18n/locales');
const blocks = []; const filePath = join(localesDir, `${localeCode}.json`);
if (!existsSync(filePath)) return { welcome: '', intro: '' };
for (const locale of SEO_LOCALES) { try {
const filePath = join(localesDir, `${locale.code}.json`); const parsed = JSON.parse(readFileSync(filePath, 'utf-8'));
if (!existsSync(filePath)) continue; return {
welcome: sanitizeLocalizedHtml(parsed.welcome || ''),
try { intro: sanitizeLocalizedHtml(parsed.introduction || '')
const parsed = JSON.parse(readFileSync(filePath, 'utf-8')); };
const welcome = sanitizeLocalizedHtml(parsed.welcome || ''); } catch (error) {
const intro = sanitizeLocalizedHtml(parsed.introduction || ''); console.warn(`[SEO] Locale konnte nicht gelesen werden (${localeCode}): ${error.message}`);
if (!welcome && !intro) continue; return { welcome: '', intro: '' };
blocks.push(`<section lang="${escapeHtml(locale.code)}" style="margin-bottom:20px;">
<h2 style="font:600 22px/1.2 sans-serif;color:#18201b;margin:0 0 10px;">${escapeHtml(locale.label)}</h2>
${welcome}
${intro}
</section>`);
} catch (error) {
console.warn(`[SEO] Locale konnte nicht gelesen werden (${locale.code}): ${error.message}`);
}
} }
}
if (blocks.length === 0) return ''; function buildLocalizedLandingContent(route, __dirname) {
const localeCode = route.replace('/', '') || 'de';
const locale = SEO_LOCALES.find((entry) => entry.code === localeCode) || SEO_LOCALES[0];
const sections = loadLocaleSeoSections(__dirname, locale.code);
if (!sections.welcome && !sections.intro) return '';
return `<section style="max-width:960px;margin:24px auto;padding:0 16px;"> return `<section lang="${escapeHtml(locale.code)}" style="max-width:960px;margin:24px auto;padding:0 16px;">
<h2 style="font:600 28px/1.15 sans-serif;color:#18201b;margin:0 0 12px;">Mehrsprachige Inhalte</h2> <h2 style="font:600 28px/1.15 sans-serif;color:#18201b;margin:0 0 12px;">${escapeHtml(locale.label)}</h2>
<p style="font:400 15px/1.5 sans-serif;color:#4f5d54;margin:0 0 18px;">Diese Texte sind serverseitig eingebettet, damit Suchmaschinen die Inhalte in allen verfügbaren Sprachen direkt erfassen können.</p> ${sections.welcome}
${blocks.join('\n')} ${sections.intro}
</section>`; </section>`;
} }
@@ -293,11 +368,19 @@ function generateHTML(route, meta, __dirname) {
html = upsertLinkTag(html, 'canonical', meta.ogUrl); html = upsertLinkTag(html, 'canonical', meta.ogUrl);
html = upsertJsonLd(html, meta.schema); html = upsertJsonLd(html, meta.schema);
html = upsertHreflangLinks(html, route);
if (route === '/') { if (route === '/') {
const multilingual = buildMultilingualSeoContent(__dirname); const deLanding = buildLocalizedLandingContent('/de', __dirname);
if (multilingual) { if (deLanding) {
html = html.replace('<div id="app"></div>', `<div id="app">${multilingual}</div>`); html = html.replace('<div id="app"></div>', `<div id="app">${deLanding}</div>`);
}
}
if (SEO_LOCALES.some((locale) => `/${locale.code}` === route)) {
const localizedLanding = buildLocalizedLandingContent(route, __dirname);
if (localizedLanding) {
html = html.replace('<div id="app"></div>', `<div id="app">${localizedLanding}</div>`);
} }
} }