From 61514b9b6f23f87415edeee9ef1fa7f255fa0e31 Mon Sep 17 00:00:00 2001 From: KoalaDev <6156589+Shik3i@users.noreply.github.com> Date: Wed, 15 Jul 2026 03:30:22 +0200 Subject: [PATCH] fix(website): generate sitemap only in build output --- .github/workflows/release.yml | 6 +- website/build.cjs | 5 +- website/sitemap.xml | 2668 --------------------------------- website/submit-indexnow.cjs | 4 +- 4 files changed, 5 insertions(+), 2678 deletions(-) delete mode 100644 website/sitemap.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5da471e..a64c5af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,17 +114,13 @@ jobs: sed -i "s/New v[0-9]\+\.[0-9]\+\.[0-9]\+ Release/New v$VERSION Release/g" README.md echo " ✓ README.md -> v$VERSION" - # 7. website/sitemap.xml — lastmod dates - sed -i "s/[0-9-]*<\/lastmod>/$(date +%Y-%m-%d)<\/lastmod>/g" website/sitemap.xml - echo " ✓ website/sitemap.xml -> lastmod $(date +%Y-%m-%d)" - echo "Version injection complete." - name: Commit and push version updates back to main run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add extension/manifest.base.json shared/constants.js package.json website/version.json website/template.html README.md website/sitemap.xml + git add extension/manifest.base.json shared/constants.js package.json website/version.json website/template.html README.md git commit -m "chore(release): update versions to $GITHUB_REF_NAME [skip ci]" || echo "No changes to commit" git push origin HEAD:main env: diff --git a/website/build.cjs b/website/build.cjs index 1cbb8fc..4171418 100644 --- a/website/build.cjs +++ b/website/build.cjs @@ -539,7 +539,7 @@ async function compile() { } // ── 5.5 Generate dynamic sitemap ── - generateSitemap(wwwDir, websiteDir); + generateSitemap(wwwDir); // Auto-copy Google verification files and IndexNow/txt key files from website source to www root const websiteFiles = fs.readdirSync(websiteDir); @@ -684,7 +684,7 @@ async function compile() { console.log('KoalaSync build finished successfully! Output: website/www/'); } -function generateSitemap(wwwDir, websiteDir) { +function generateSitemap(wwwDir) { const languages = [ { code: 'en', prefix: '', hreflang: 'en' }, { code: 'de', prefix: 'de/', hreflang: 'de' }, @@ -774,7 +774,6 @@ function generateSitemap(wwwDir, websiteDir) { xml += `\n\n`; - fs.writeFileSync(path.join(websiteDir, 'sitemap.xml'), xml.trim() + '\n', 'utf8'); fs.writeFileSync(path.join(wwwDir, 'sitemap.xml'), xml.trim() + '\n', 'utf8'); console.log(' ✓ Dynamically generated sitemap.xml with current date'); } diff --git a/website/sitemap.xml b/website/sitemap.xml deleted file mode 100644 index a905d31..0000000 --- a/website/sitemap.xml +++ /dev/null @@ -1,2668 +0,0 @@ - - - - https://sync.koalastuff.net/imprint - 2026-07-14 - monthly - 0.3 - - - https://sync.koalastuff.net/privacy - 2026-07-14 - monthly - 0.3 - - - https://sync.koalastuff.net/de/impressum - 2026-07-14 - monthly - 0.3 - - - https://sync.koalastuff.net/de/datenschutz - 2026-07-14 - monthly - 0.3 - - - https://sync.koalastuff.net/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/ - 2026-07-14 - weekly - 1.0 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives/teleparty - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives/screen-sharing - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives/watch2gether - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives/scener - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives/kosmi - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/de/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/fr/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/es/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt-BR/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ru/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/it/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pl/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/tr/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/nl/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ja/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/ko/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/zh/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/uk/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - - https://sync.koalastuff.net/pt/alternatives/twoseven - 2026-07-14 - weekly - 0.7 - - - - - - - - - - - - - - - - - - diff --git a/website/submit-indexnow.cjs b/website/submit-indexnow.cjs index c293c94..9c31dfe 100644 --- a/website/submit-indexnow.cjs +++ b/website/submit-indexnow.cjs @@ -3,7 +3,7 @@ const path = require('path'); const https = require('https'); const websiteDir = __dirname; -const sitemapPath = path.join(websiteDir, 'sitemap.xml'); +const sitemapPath = path.join(websiteDir, 'www', 'sitemap.xml'); // 1. Find the IndexNow key file in the website directory const files = fs.readdirSync(websiteDir); @@ -34,7 +34,7 @@ console.log(`Key Location: ${keyLocation}`); // 2. Parse URLs from sitemap.xml if (!fs.existsSync(sitemapPath)) { - console.error(`Error: sitemap.xml not found at ${sitemapPath}`); + console.error(`Error: generated sitemap.xml not found at ${sitemapPath}. Run \`node website/build.cjs\` first.`); process.exit(1); }