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>
|
||||
|
||||
Reference in New Issue
Block a user