chore: auto deploy 2026-01-21 11:14:56
This commit is contained in:
11
build.js
11
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 `<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>
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{title}}</title>
|
||||
<meta name="description" content="{{metaDesc}}">
|
||||
|
||||
|
||||
<!-- SEO & Canonical -->
|
||||
<link rel="canonical" href="{{canonicalUrl}}">
|
||||
|
||||
{{hreflangTags}}
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="{{canonicalUrl}}">
|
||||
@@ -25,7 +26,8 @@
|
||||
<meta property="twitter:image" content="{{ogImage}}">
|
||||
|
||||
<!-- 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 -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
|
||||
Reference in New Issue
Block a user