Repository navigation
This release bring up to date Alpha for the latest Hugo versions (v0.156.0+) while significantly improving multilingual capabilities. Introduces full support for Simplified Chinese alongside a language-aware font system that optimizes typography based on the user's locale.
What's Changed
Added
- Multilingual Support (Chinese): Introduced full support for Simplified Chinese (
zh-cn). This includes specialized typography handling and localized UI elements. (Note: Initial translations inzh-cn.tomlwere AI-generated and require review by a native speaker.) - Smart Font Loading System: Implemented a language-aware font loading mechanism that optimizes performance by only serving necessary character sets:
- Dynamic Character Sets: Loads
fonts-zh.css(Noto Sans SC) exclusively for Chinese locales, while defaulting tofonts.css(Noto Sans) for Latin-based languages. - Monospace Consolidation: Introduced a common
fonts-mono.cssfor JetBrains Mono, shared across all languages to reduce redundancy. - Template Integration: Utilizes a new
head/fonts.htmlpartial to dynamically inject CSS variables, allowing Tailwind CSS to automatically adapt the--font-sansfamily based on the active language.
- Dynamic Character Sets: Loads
Changed
- Hugo Compatibility: Updated the supported version range to
0.156.0–0.159.2. This ensures full compatibility with the latest multidimensional content model and performance improvements. - Modernized Language Selector: Refactored the
multilingual.htmlcomponent to use the modern.Rotate "language"method. This simplifies the logic for generating language switchers and aligns with current Hugo best practices. - Deprecation Fixes: Resolved multiple deprecation warnings introduced in recent Hugo versions (v0.156.0 and later):
- Migrated all instances of
.Site.Dataandsite.Datato the newhugo.Dataglobal. - Updated language property usage: replaced
.Language.LanguageCodewith.Language.Localeand.Language.LanguageDirectionwith.Language.Direction. - Migrated
.Site.Languagesusage to the globalsite.Languagesfunction for consistency.
- Migrated all instances of
Updated
- Dependencies: Upgraded all npm dependencies to their latest stable versions.