diff --git a/client/src/router/index.js b/client/src/router/index.js index b800b46..2dc7d07 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -9,13 +9,61 @@ import SafetyView from '../views/SafetyView.vue'; const SITE_URL = 'https://www.ypchat.net'; 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 = { '@context': 'https://schema.org', '@type': 'WebSite', name: 'SingleChat', 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' }; @@ -24,7 +72,7 @@ const partnersSchema = { '@type': 'CollectionPage', name: 'Partner - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -38,7 +86,7 @@ const feedbackSchema = { '@type': 'CollectionPage', name: 'Feedback - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -52,7 +100,7 @@ const faqSchema = { '@type': 'FAQPage', name: 'FAQ - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -66,7 +114,7 @@ const rulesSchema = { '@type': 'WebPage', name: 'Regeln - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -80,7 +128,7 @@ const safetySchema = { '@type': 'WebPage', name: 'Sicherheit - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -95,11 +143,11 @@ const routes = [ name: 'chat', component: ChatView, meta: { - title: 'SingleChat - Chat, Single-Chat und Bildaustausch', - 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.', - keywords: 'Chat, Single-Chat, Bildaustausch, Online-Chat, Singles, Kontakte, Community', - ogTitle: 'SingleChat - Chat, Single-Chat und Bildaustausch', - ogDescription: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.', + 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', + ogTitle: 'SingleChat: Kostenloser Single Chat, privat & anonym', + ogDescription: 'Kostenlos chatten, privat bleiben und neue Kontakte kennenlernen - mit sicherem Bildaustausch.', ogType: 'website', image: DEFAULT_IMAGE, robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', @@ -111,11 +159,11 @@ const routes = [ name: 'partners', component: PartnersView, meta: { - title: 'Partner - SingleChat', - description: 'Unsere Partner und befreundete Seiten. Entdecke weitere interessante Angebote und Communities.', - keywords: 'Partner, Links, befreundete Seiten, Community', - ogTitle: 'Partner - SingleChat', - ogDescription: 'Unsere Partner und befreundete Seiten.', + title: 'Partner für Single Chat & Community - SingleChat', + description: 'Partnerseiten rund um Single Chat, Community und Online-Kontakte. Entdecke weitere Angebote und hilfreiche Ressourcen.', + keywords: 'single chat partner, chat community, kontaktseiten, single-chat links, online dating chat', + ogTitle: 'Partner für Single Chat & Community - SingleChat', + ogDescription: 'Befreundete Seiten und Ressourcen rund um Chat, Kontakte und Community.', ogType: 'website', image: DEFAULT_IMAGE, robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', @@ -127,11 +175,11 @@ const routes = [ name: 'feedback', component: FeedbackView, meta: { - title: 'Feedback - SingleChat', - description: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', - keywords: 'SingleChat Feedback, Kommentare, Rueckmeldungen, Verbesserungsvorschlaege', - ogTitle: 'Feedback - SingleChat', - ogDescription: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', + title: 'Feedback zur Chat-Plattform - SingleChat', + description: 'Öffentliches Feedback zu SingleChat: Meinungen, Vorschläge und Erfahrungsberichte für einen besseren privaten Chat.', + keywords: 'chat feedback, single chat erfahrungen, rückmeldung chat, verbesserungsvorschläge', + ogTitle: 'Feedback zur Chat-Plattform - SingleChat', + ogDescription: 'Teile deine Erfahrungen und Verbesserungsvorschläge für SingleChat.', ogType: 'website', image: DEFAULT_IMAGE, robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', @@ -143,11 +191,11 @@ const routes = [ name: 'faq', component: FaqView, meta: { - title: 'FAQ - SingleChat', - description: 'Häufige Fragen zu SingleChat: Einstieg, Privatsphäre, Bildaustausch, Blockieren und mehr.', - keywords: 'SingleChat FAQ, Hilfe, Privatsphäre, Blockieren, Bilder, Chat', - ogTitle: 'FAQ - SingleChat', - ogDescription: 'Antworten auf häufige Fragen rund um SingleChat.', + title: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat', + description: 'FAQ zum kostenlosen Single Chat: anonym chatten, Privatsphäre schützen, Bilder sicher teilen und Nutzer blockieren.', + keywords: 'single chat faq, kostenlos chatten, anonym chatten, privater chat, safe chat', + ogTitle: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat', + ogDescription: 'Antworten auf Fragen zu Sicherheit, Privatsphäre und Funktionen im Single Chat.', ogType: 'website', image: DEFAULT_IMAGE, robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', @@ -159,11 +207,11 @@ const routes = [ name: 'regeln', component: RulesView, meta: { - title: 'Regeln - SingleChat', - description: 'Chat-Regeln für ein respektvolles und sicheres Miteinander auf SingleChat.', - keywords: 'SingleChat Regeln, Chat Regeln, Community, Sicherheit', - ogTitle: 'Regeln - SingleChat', - ogDescription: 'Chat-Regeln für ein respektvolles und sicheres Miteinander.', + title: 'Chat-Regeln für sicheren Single Chat - SingleChat', + description: 'Regeln für respektvollen, privaten und sicheren Single Chat. Hinweise zu Verhalten, Spam und verbotenen Inhalten.', + keywords: 'chat regeln, single chat regeln, sicher chatten, spam vermeiden, community richtlinien', + ogTitle: 'Chat-Regeln für sicheren Single Chat - SingleChat', + ogDescription: 'Unsere Richtlinien für respektvolle und sichere Gespräche im Chat.', ogType: 'website', image: DEFAULT_IMAGE, robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1', @@ -175,11 +223,11 @@ const routes = [ name: 'sicherheit', component: SafetyView, meta: { - title: 'Sicherheit & Privatsphäre - SingleChat', - description: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung von SingleChat.', - keywords: 'SingleChat Sicherheit, Privatsphäre, Blockieren, Melden', - ogTitle: 'Sicherheit & Privatsphäre - SingleChat', - ogDescription: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung.', + title: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat', + description: 'Sicherheitsseite für privaten und anonymen Chat: Privatsphäre, Schutz vor Spam, Blockieren und Melden.', + keywords: 'privatsphäre chat, anonym chat sicherheit, blockieren melden, private chat safety', + ogTitle: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat', + ogDescription: 'So schützt du deine Daten und chattest sicher und anonym.', ogType: 'website', image: DEFAULT_IMAGE, 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({ history: createWebHistory(), routes @@ -254,8 +329,12 @@ router.beforeEach((to, from, next) => { const ogType = meta.ogType || 'website'; const image = meta.image || DEFAULT_IMAGE; const robots = meta.robots || 'index, follow'; + const localeFromPath = SUPPORTED_LOCALES.includes((to.path || '').replace('/', '')) + ? (to.path || '').replace('/', '') + : 'de'; document.title = title; + document.documentElement.setAttribute('lang', localeFromPath); updateMetaTag('description', description); updateMetaTag('keywords', keywords); diff --git a/client/src/views/FaqView.vue b/client/src/views/FaqView.vue index 318f275..23d85ac 100644 --- a/client/src/views/FaqView.vue +++ b/client/src/views/FaqView.vue @@ -14,13 +14,17 @@

Häufige Fragen (FAQ)

- 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 Feedback-Seite.

+

+ Unser Fokus liegt auf privatem und anonymem Chatten mit klaren Regeln. Mehr dazu findest du auch unter + Sicherheit und Regeln. +

Wie starte ich?

- 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.

diff --git a/client/src/views/PartnersView.vue b/client/src/views/PartnersView.vue index bdf1d21..ae258a4 100644 --- a/client/src/views/PartnersView.vue +++ b/client/src/views/PartnersView.vue @@ -28,6 +28,11 @@ Hinweis: Externe Links öffnen sich in einem neuen Tab. Wenn du Partner werden möchtest, schreib uns bitte über die Feedback-Seite.

+

+ Wenn du zuerst wissen möchtest, wie privater und anonymer Chat bei uns funktioniert, schau in unsere + FAQ oder auf die Seite + Sicherheit & Privatsphäre. +

diff --git a/client/src/views/RulesView.vue b/client/src/views/RulesView.vue index dbd9823..e3e54ac 100644 --- a/client/src/views/RulesView.vue +++ b/client/src/views/RulesView.vue @@ -14,9 +14,13 @@

Chat-Regeln

- 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.

+

+ Ergänzende Hinweise zum anonymen Chatten findest du unter + Sicherheit & Privatsphäre. +

1) Respekt

diff --git a/client/src/views/SafetyView.vue b/client/src/views/SafetyView.vue index 573348a..3082d39 100644 --- a/client/src/views/SafetyView.vue +++ b/client/src/views/SafetyView.vue @@ -14,8 +14,8 @@

Sicherheit & Privatsphäre

- 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. + SingleChat ist auf schnellen Einstieg ausgelegt – trotzdem ist uns Sicherheit wichtig. Diese Hinweise helfen dir, + im privaten und anonymen Chat deine Privatsphäre zu schützen und gute Entscheidungen zu treffen.

Empfehlungen für sichere Nutzung

@@ -36,7 +36,8 @@

Datenschutz

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 + Chat-Regeln.

diff --git a/server/routes-seo.js b/server/routes-seo.js index ff5a2f4..68e81d4 100644 --- a/server/routes-seo.js +++ b/server/routes-seo.js @@ -15,14 +15,61 @@ const SEO_LOCALES = [ { code: 'th', label: 'Thai' }, { 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 = { '/': { - title: 'SingleChat - Chat, Single-Chat und Bildaustausch', - 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.', - keywords: 'Chat, Single-Chat, Bildaustausch, Online-Chat, Singles, Kontakte, Community', - ogTitle: 'SingleChat - Chat, Single-Chat und Bildaustausch', - ogDescription: 'Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.', + 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', + ogTitle: 'SingleChat: Kostenloser Single Chat, privat & anonym', + ogDescription: 'Kostenlos chatten, privat bleiben und neue Kontakte kennenlernen - mit sicherem Bildaustausch.', ogType: 'website', ogUrl: `${SITE_URL}/`, ogImage: DEFAULT_IMAGE, @@ -32,16 +79,16 @@ const seoData = { '@type': 'WebSite', name: 'SingleChat', 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' } }, '/partners': { - title: 'Partner - SingleChat', - description: 'Unsere Partner und befreundete Seiten. Entdecke weitere interessante Angebote und Communities.', - keywords: 'Partner, Links, befreundete Seiten, Community', - ogTitle: 'Partner - SingleChat', - ogDescription: 'Unsere Partner und befreundete Seiten.', + title: 'Partner für Single Chat & Community - SingleChat', + description: 'Partnerseiten rund um Single Chat, Community und Online-Kontakte. Entdecke weitere Angebote und hilfreiche Ressourcen.', + keywords: 'single chat partner, chat community, kontaktseiten, single-chat links, online dating chat', + ogTitle: 'Partner für Single Chat & Community - SingleChat', + ogDescription: 'Befreundete Seiten und Ressourcen rund um Chat, Kontakte und Community.', ogType: 'website', ogUrl: `${SITE_URL}/partners`, ogImage: DEFAULT_IMAGE, @@ -51,7 +98,7 @@ const seoData = { '@type': 'CollectionPage', name: 'Partner - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -61,11 +108,11 @@ const seoData = { } }, '/feedback': { - title: 'Feedback - SingleChat', - description: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', - keywords: 'SingleChat Feedback, Kommentare, Rueckmeldungen, Verbesserungsvorschlaege', - ogTitle: 'Feedback - SingleChat', - ogDescription: 'Oeffentliche Rueckmeldungen, Meinungen und Verbesserungsvorschlaege zu SingleChat.', + title: 'Feedback zur Chat-Plattform - SingleChat', + description: 'Öffentliches Feedback zu SingleChat: Meinungen, Vorschläge und Erfahrungsberichte für einen besseren privaten Chat.', + keywords: 'chat feedback, single chat erfahrungen, rückmeldung chat, verbesserungsvorschläge', + ogTitle: 'Feedback zur Chat-Plattform - SingleChat', + ogDescription: 'Teile deine Erfahrungen und Verbesserungsvorschläge für SingleChat.', ogType: 'website', ogUrl: `${SITE_URL}/feedback`, ogImage: DEFAULT_IMAGE, @@ -75,7 +122,7 @@ const seoData = { '@type': 'CollectionPage', name: 'Feedback - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -85,11 +132,11 @@ const seoData = { } }, '/faq': { - title: 'FAQ - SingleChat', - description: 'Häufige Fragen zu SingleChat: Einstieg, Privatsphäre, Bildaustausch, Blockieren und mehr.', - keywords: 'SingleChat FAQ, Hilfe, Privatsphäre, Blockieren, Bilder, Chat', - ogTitle: 'FAQ - SingleChat', - ogDescription: 'Antworten auf häufige Fragen rund um SingleChat.', + title: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat', + description: 'FAQ zum kostenlosen Single Chat: anonym chatten, Privatsphäre schützen, Bilder sicher teilen und Nutzer blockieren.', + keywords: 'single chat faq, kostenlos chatten, anonym chatten, privater chat, safe chat', + ogTitle: 'FAQ: Kostenlos, privat und anonym chatten - SingleChat', + ogDescription: 'Antworten auf Fragen zu Sicherheit, Privatsphäre und Funktionen im Single Chat.', ogType: 'website', ogUrl: `${SITE_URL}/faq`, ogImage: DEFAULT_IMAGE, @@ -99,7 +146,7 @@ const seoData = { '@type': 'FAQPage', name: 'FAQ - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -109,11 +156,11 @@ const seoData = { } }, '/regeln': { - title: 'Regeln - SingleChat', - description: 'Chat-Regeln für ein respektvolles und sicheres Miteinander auf SingleChat.', - keywords: 'SingleChat Regeln, Chat Regeln, Community, Sicherheit', - ogTitle: 'Regeln - SingleChat', - ogDescription: 'Chat-Regeln für ein respektvolles und sicheres Miteinander.', + title: 'Chat-Regeln für sicheren Single Chat - SingleChat', + description: 'Regeln für respektvollen, privaten und sicheren Single Chat. Hinweise zu Verhalten, Spam und verbotenen Inhalten.', + keywords: 'chat regeln, single chat regeln, sicher chatten, spam vermeiden, community richtlinien', + ogTitle: 'Chat-Regeln für sicheren Single Chat - SingleChat', + ogDescription: 'Unsere Richtlinien für respektvolle und sichere Gespräche im Chat.', ogType: 'website', ogUrl: `${SITE_URL}/regeln`, ogImage: DEFAULT_IMAGE, @@ -123,7 +170,7 @@ const seoData = { '@type': 'WebPage', name: 'Regeln - SingleChat', 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: { '@type': 'WebSite', name: 'SingleChat', @@ -133,11 +180,11 @@ const seoData = { } }, '/sicherheit': { - title: 'Sicherheit & Privatsphäre - SingleChat', - description: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung von SingleChat.', - keywords: 'SingleChat Sicherheit, Privatsphäre, Blockieren, Melden', - ogTitle: 'Sicherheit & Privatsphäre - SingleChat', - ogDescription: 'Hinweise zu Privatsphäre, Blockieren/Melden und sicherer Nutzung.', + title: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat', + description: 'Sicherheitsseite für privaten und anonymen Chat: Privatsphäre, Schutz vor Spam, Blockieren und Melden.', + keywords: 'privatsphäre chat, anonym chat sicherheit, blockieren melden, private chat safety', + ogTitle: 'Sicherheit & Privatsphäre im privaten Chat - SingleChat', + ogDescription: 'So schützt du deine Daten und chattest sicher und anonym.', ogType: 'website', ogUrl: `${SITE_URL}/sicherheit`, ogImage: DEFAULT_IMAGE, @@ -147,7 +194,7 @@ const seoData = { '@type': 'WebPage', name: 'Sicherheit & Privatsphäre - SingleChat', 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: { '@type': 'WebSite', 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() { const currentDate = new Date().toISOString().split('T')[0]; const urls = Object.entries(seoData) @@ -223,42 +293,47 @@ function upsertJsonLd(html, schema) { return html.replace('', ` ${tag}\n`); } +function upsertHreflangLinks(html, route) { + const cleaned = html.replace(/\n?/g, ''); + const links = SEO_LOCALES.map( + (locale) => ` ` + ); + links.push(` `); + return cleaned.replace('', `${links.join('\n')}\n`); +} + function sanitizeLocalizedHtml(input = '') { return String(input) .replace(/[\s\S]*?<\/script>/gi, '') .trim(); } -function buildMultilingualSeoContent(__dirname) { +function loadLocaleSeoSections(__dirname, localeCode) { const localesDir = join(__dirname, '../client/src/i18n/locales'); - const blocks = []; - - for (const locale of SEO_LOCALES) { - const filePath = join(localesDir, `${locale.code}.json`); - if (!existsSync(filePath)) continue; - - try { - const parsed = JSON.parse(readFileSync(filePath, 'utf-8')); - const welcome = sanitizeLocalizedHtml(parsed.welcome || ''); - const intro = sanitizeLocalizedHtml(parsed.introduction || ''); - if (!welcome && !intro) continue; - - blocks.push(`
-

${escapeHtml(locale.label)}

- ${welcome} - ${intro} -
`); - } catch (error) { - console.warn(`[SEO] Locale konnte nicht gelesen werden (${locale.code}): ${error.message}`); - } + const filePath = join(localesDir, `${localeCode}.json`); + if (!existsSync(filePath)) return { welcome: '', intro: '' }; + try { + const parsed = JSON.parse(readFileSync(filePath, 'utf-8')); + return { + welcome: sanitizeLocalizedHtml(parsed.welcome || ''), + intro: sanitizeLocalizedHtml(parsed.introduction || '') + }; + } catch (error) { + console.warn(`[SEO] Locale konnte nicht gelesen werden (${localeCode}): ${error.message}`); + return { welcome: '', intro: '' }; } +} - 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 `
-

Mehrsprachige Inhalte

-

Diese Texte sind serverseitig eingebettet, damit Suchmaschinen die Inhalte in allen verfügbaren Sprachen direkt erfassen können.

- ${blocks.join('\n')} + return `
+

${escapeHtml(locale.label)}

+ ${sections.welcome} + ${sections.intro}
`; } @@ -293,11 +368,19 @@ function generateHTML(route, meta, __dirname) { html = upsertLinkTag(html, 'canonical', meta.ogUrl); html = upsertJsonLd(html, meta.schema); + html = upsertHreflangLinks(html, route); if (route === '/') { - const multilingual = buildMultilingualSeoContent(__dirname); - if (multilingual) { - html = html.replace('
', `
${multilingual}
`); + const deLanding = buildLocalizedLandingContent('/de', __dirname); + if (deLanding) { + html = html.replace('
', `
${deLanding}
`); + } + } + + if (SEO_LOCALES.some((locale) => `/${locale.code}` === route)) { + const localizedLanding = buildLocalizedLandingContent(route, __dirname); + if (localizedLanding) { + html = html.replace('
', `
${localizedLanding}
`); } }