From 4882e058f10b28df16407bf454e531abc80be13b Mon Sep 17 00:00:00 2001 From: Timo <6156589+Shik3i@users.noreply.github.com> Date: Sun, 19 Jul 2026 21:21:49 +0200 Subject: [PATCH] fix: keep support SEO and sitemap metadata accurate --- scripts/test-website-theme.mjs | 20 ++++++++++++++++++++ website/build.cjs | 10 +--------- website/site-access-help.html | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/scripts/test-website-theme.mjs b/scripts/test-website-theme.mjs index 8d20604..c7dd168 100644 --- a/scripts/test-website-theme.mjs +++ b/scripts/test-website-theme.mjs @@ -12,6 +12,8 @@ const demoCss = fs.readFileSync(path.join(repoRoot, 'website', 'styles', 'demo.c const landingPrimaryCss = fs.readFileSync(path.join(repoRoot, 'website', 'styles', 'landing-primary.css'), 'utf8'); const legalCss = fs.readFileSync(path.join(repoRoot, 'website', 'styles', 'legal.css'), 'utf8'); const joinPage = fs.readFileSync(path.join(repoRoot, 'website', 'join.html'), 'utf8'); +const siteAccessHelpPage = fs.readFileSync(path.join(repoRoot, 'website', 'site-access-help.html'), 'utf8'); +const websiteBuild = fs.readFileSync(path.join(repoRoot, 'website', 'build.cjs'), 'utf8'); const imprintPage = fs.readFileSync(path.join(repoRoot, 'website', 'imprint.html'), 'utf8'); const germanImprintPage = fs.readFileSync(path.join(repoRoot, 'website', 'impressum-de.html'), 'utf8'); const alternativesIndex = fs.readFileSync(path.join(repoRoot, 'website', 'alternatives', 'index.html'), 'utf8'); @@ -67,6 +69,23 @@ if (/\bWebRTC\b|\bport 54000\b|peer-to-peer by design/i.test(llmsText)) { if (!llmsText.includes(`Current website release: ${websiteVersion}`)) { throw new Error(`llms.txt release must match website/version.json (${websiteVersion})`); } +const requiredSupportSocialMetadata = [ + 'name="twitter:card" content="summary_large_image"', + 'name="twitter:title"', + 'name="twitter:description"', + 'name="twitter:image"', + '"datePublished"', + '"dateModified"', + '"mainEntityOfPage"' +]; +for (const metadata of requiredSupportSocialMetadata) { + if (!siteAccessHelpPage.includes(metadata)) { + throw new Error(`site-access-help.html is missing SEO metadata: ${metadata}`); + } +} +if (//.test(websiteBuild) || /const today = new Date\(\)/.test(websiteBuild)) { + throw new Error('Sitemap must not claim synthetic modification dates for every URL'); +} const documentedRelayUrls = [...llmsText.matchAll(/`(wss:\/\/[^`\s]+)`/g)].map(([, value]) => new URL(value)); const hasCanonicalPublicRelay = documentedRelayUrls.some((url) => ( url.protocol === 'wss:' && @@ -180,6 +199,7 @@ if (!/animation:\s*none\s*!important/.test(reducedMotionRule)) { console.log('Extension mockup theme-sensitive text uses theme-aware colors'); console.log('Landing CSS is render-blocking, single-request, and cascade-stable'); console.log('Landing head discovers a complete and architecture-accurate llms.txt'); +console.log('Support-page social metadata and sitemap dates remain truthful'); console.log('Website self-hosting examples include production secrets and consistent networking'); console.log('Foreground film birds use complete, always-on wing and glide animations'); console.log('All Getting Started mockups define explicit light-theme surfaces'); diff --git a/website/build.cjs b/website/build.cjs index 2e7c2af..05155e9 100644 --- a/website/build.cjs +++ b/website/build.cjs @@ -716,8 +716,6 @@ function generateSitemap(wwwDir) { { code: 'pt', prefix: 'pt/', hreflang: 'pt' } ]; - const today = new Date().toISOString().split('T')[0]; - let xml = ` `; @@ -726,31 +724,26 @@ function generateSitemap(wwwDir) { xml += ` https://sync.koalastuff.net/imprint - ${today} monthly 0.3 https://sync.koalastuff.net/privacy - ${today} monthly 0.3 https://sync.koalastuff.net/site-access-help.html - ${today} weekly 0.8 https://sync.koalastuff.net/de/impressum - ${today} monthly 0.3 https://sync.koalastuff.net/de/datenschutz - ${today} monthly 0.3 `; @@ -761,7 +754,6 @@ function generateSitemap(wwwDir) { xml += ` ${loc} - ${today} ${changefreq} ${priority}`; for (const alt of languages) { @@ -794,6 +786,6 @@ function generateSitemap(wwwDir) { xml += `\n\n`; fs.writeFileSync(path.join(wwwDir, 'sitemap.xml'), xml.trim() + '\n', 'utf8'); - console.log(' ✓ Dynamically generated sitemap.xml with current date'); + console.log(' ✓ Dynamically generated sitemap.xml without synthetic modification dates'); } compile().catch(err => { console.error('Build failed:', err); process.exit(1); }); diff --git a/website/site-access-help.html b/website/site-access-help.html index 40570e3..86a738c 100644 --- a/website/site-access-help.html +++ b/website/site-access-help.html @@ -17,6 +17,14 @@ + + + + + + + +