chore: auto deploy 2026-01-21 11:14:56

This commit is contained in:
taimafanl
2026-01-21 11:14:56 +08:00
parent 3e978c1d26
commit c84586a1bc
2 changed files with 15 additions and 4 deletions

View File

@@ -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 `<link rel="alternate" hreflang="${l}" href="${fullDomain}${fullBasePath}/${l}/index.html" />`;
}).join('\n ');
// Add x-default (usually English)
const xDefault = `<link rel="alternate" hreflang="x-default" href="${fullDomain}${fullBasePath}/en/index.html" />`;
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 = `<!DOCTYPE html>
</header>
<div class="bento-grid">
<a href="${data.siteConfig.basePath}/zh/index.html" class="card featured">
<a href="${data.siteConfig.basePath}/en/index.html" class="card featured">
<div class="tag">Active Tool</div>
<div class="icon">⚽️</div>
<div>