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 // SEO Dynamic Tags
const canonicalUrl = `${fullDomain}${fullBasePath}/${lang}/index.html`; const canonicalUrl = `${fullDomain}${fullBasePath}/${lang}/index.html`;
html = html.replace(/{{canonicalUrl}}/g, canonicalUrl); 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) // Use a default OG image or generate one (placeholder for now)
html = html.replace(/{{ogImage}}/g, `${fullDomain}${fullBasePath}/assets/og-shared.jpg`); html = html.replace(/{{ogImage}}/g, `${fullDomain}${fullBasePath}/assets/og-shared.jpg`);
@@ -195,7 +204,7 @@ const homeHtml = `<!DOCTYPE html>
</header> </header>
<div class="bento-grid"> <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="tag">Active Tool</div>
<div class="icon">⚽️</div> <div class="icon">⚽️</div>
<div> <div>

View File

@@ -9,6 +9,7 @@
<!-- SEO & Canonical --> <!-- SEO & Canonical -->
<link rel="canonical" href="{{canonicalUrl}}"> <link rel="canonical" href="{{canonicalUrl}}">
{{hreflangTags}}
<!-- Open Graph / Facebook --> <!-- Open Graph / Facebook -->
<meta property="og:type" content="website"> <meta property="og:type" content="website">
@@ -25,7 +26,8 @@
<meta property="twitter:image" content="{{ogImage}}"> <meta property="twitter:image" content="{{ogImage}}">
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚽️</text></svg>"> <link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚽️</text></svg>">
<!-- Google Fonts --> <!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">