Implement static multilingual SEO generation
mainThis plan outlines the transition from client-side i18n to build-time static HTML generation. The goal is to improve SEO by using hreflang, JSON-LD, and og:image tags, and to serve localized content via URL paths (e.g., / for English and /zh-TW/ for Traditional Chinese).
Core Architecture:
- Template: A
website/template.htmlfile uses{{key.path}}placeholders for all localized text and metadata. - Build Script:
scripts/update-website.tsreads the template and locale JSONs to generate staticindex.htmlandzh-TW/index.htmlfiles. - Language Switching:
website/i18n.jsis refactored into a lightweight URL-based redirector that detects the current language from the path and provides the alternative language URL.