From c84586a1bcd2c29f076cd4931721a72e244f233c Mon Sep 17 00:00:00 2001 From: taimafanl <1051135496@qq.com> Date: Wed, 21 Jan 2026 11:14:56 +0800 Subject: [PATCH] chore: auto deploy 2026-01-21 11:14:56 --- build.js | 11 ++++++++++- template.html | 8 +++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/build.js b/build.js index 3a551ec..8c8b477 100644 --- a/build.js +++ b/build.js @@ -41,6 +41,15 @@ data.languages.forEach(lang => { // SEO Dynamic Tags const canonicalUrl = `${fullDomain}${fullBasePath}/${lang}/index.html`; html = html.replace(/{{canonicalUrl}}/g, canonicalUrl); + + // Generate hreflang tags + const hreflangTags = data.languages.map(l => { + return ``; + }).join('\n '); + // Add x-default (usually English) + const xDefault = ``; + html = html.replace(/{{hreflangTags}}/g, hreflangTags + '\n ' + xDefault); + // Use a default OG image or generate one (placeholder for now) html = html.replace(/{{ogImage}}/g, `${fullDomain}${fullBasePath}/assets/og-shared.jpg`); @@ -195,7 +204,7 @@ const homeHtml = `
- +
Active Tool
⚽️
diff --git a/template.html b/template.html index 694446c..d3031a5 100644 --- a/template.html +++ b/template.html @@ -6,10 +6,11 @@ {{title}} - + - + {{hreflangTags}} + @@ -25,7 +26,8 @@ - +