refactor: Deprecate language configuration and template methods
Configuration:
- languageCode -> locale (either in root or per-language)
- languageName -> label
- languageDirection -> direction
Methods:
- .Language.LanguageCode -> .Language.Locale
- .Language.LanguageName -> .Language.Label
- .Language.LanguageDirection -> .Language.Direction
- .Site.LanguageCode -> .Site.Language.Locale
Example configuration:
[languages.en] direction = ‘ltr’ label = ‘English’ locale = ‘en-US’ weight = 1
Closes #14269
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
A fast and flexible static site generator built with love by bep, spf13, and friends in Go.
Website | Installation | Documentation | Support | Contributing | Mastodon
Overview
Hugo is a static site generator written in Go, optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less.
Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is widely used to create:
Use Hugo’s embedded web server during development to instantly see changes to content, structure, behavior, and presentation. Then deploy the site to your host, or push changes to your Git provider for automated builds and deployment.
Hugo’s fast asset pipelines include:
And with Hugo Modules, you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories.
See the features section of the documentation for a comprehensive summary of Hugo’s capabilities.
Sponsors
Editions
Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below.
Installation
Install Hugo from a prebuilt binary, package manager, or package repository. Please see the installation instructions for your operating system:
Build from source
Prerequisites to build Hugo from source:
Build the standard edition:
Build the extended edition:
Build the extended/deploy edition:
Star History
Documentation
Hugo’s documentation includes installation instructions, a quick start guide, conceptual explanations, reference information, and examples.
Please submit documentation issues and pull requests to the documentation repository.
Support
Please do not use the issue queue for questions or troubleshooting. Unless you are certain that your issue is a software defect, use the forum.
Hugo’s forum is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about requesting help before asking your first question.
Contributing
You can contribute to the Hugo project by:
Please submit documentation issues and pull requests to the documentation repository.
If you have an idea for an enhancement or new feature, create a new topic on the forum in the “Feature” category. This will help you to:
If there is sufficient interest, create a proposal. Do not submit a pull request until the project lead accepts the proposal.
For a complete guide to contributing to Hugo, see the Contribution Guide.
License
For the Hugo source code, see LICENSE.
We also bundle some libraries in binary/WASM form:
Dependencies
Hugo stands on the shoulders of great open source libraries. Run
hugo env --logLevel infoto display a list of dependencies.See current dependencies