diff --git a/website/4650678bb36b488d8f64343a67f1b931.txt b/website/4650678bb36b488d8f64343a67f1b931.txt new file mode 100644 index 0000000..9ee4c37 --- /dev/null +++ b/website/4650678bb36b488d8f64343a67f1b931.txt @@ -0,0 +1 @@ +4650678bb36b488d8f64343a67f1b931 \ No newline at end of file diff --git a/website/build.cjs b/website/build.cjs index 902e9a9..7a72ac2 100644 --- a/website/build.cjs +++ b/website/build.cjs @@ -314,7 +314,7 @@ async function compile() { } } - // ── 5. Copy generic static files ── + // ── 5. Copy generic static files and verification files ── const genericFiles = ['robots.txt', 'sitemap.xml', 'site.webmanifest', 'version.json']; for (const file of genericFiles) { const src = path.join(websiteDir, file); @@ -322,6 +322,23 @@ async function compile() { if (fs.existsSync(src)) { fs.copyFileSync(src, dest); } } + // Auto-copy Google verification files and IndexNow/txt key files from website source to www root + const websiteFiles = fs.readdirSync(websiteDir); + for (const file of websiteFiles) { + const filePath = path.join(websiteDir, file); + if (fs.statSync(filePath).isFile()) { + // Match google[hex/alphanumeric].html or any hex/uuid txt file (e.g. 4650678bb36b488d8f64343a67f1b931.txt) + const isGoogleVerification = /^google[a-zA-Z0-9_-]+\.html$/i.test(file); + const isIndexNowVerification = (/^[a-zA-Z0-9_-]{8,}\.txt$/i.test(file) || /^[a-f0-9-]{32,36}$/i.test(file)) && file !== 'robots.txt'; + + if (isGoogleVerification || isIndexNowVerification) { + const dest = path.join(wwwDir, file); + fs.copyFileSync(filePath, dest); + console.log(` Copied verification file: ${file} → ${file}`); + } + } + } + // ── 6. Copy assets ── console.log('Copying assets...'); const srcAssets = path.join(websiteDir, 'assets'); diff --git a/website/google157cb8453d13ccdc.html b/website/google157cb8453d13ccdc.html new file mode 100644 index 0000000..f24f20c --- /dev/null +++ b/website/google157cb8453d13ccdc.html @@ -0,0 +1 @@ +google-site-verification: google157cb8453d13ccdc.html \ No newline at end of file