To build and serve this Hugo website locally, follow these steps:
- Install Hugo (extended version recommended)
- Clone this repository
git clone https://github.com/LeelaChessZero/lczero.org.git cd lczero.org - Start the development server:
hugo serve
- Open your browser to:
http://localhost:1313
- Use
hugo serve -Dto include draft content
Add the new language to config.toml file under the [languages] section.
- Duplicate
i18n/en.tomltoi18n/[new-language-code].toml
(Example:i18n/es.tomlfor Spanish) - Translate all strings in the new file
For each page you want to translate:
- Create a copy with the language code suffix:
original.mdtooriginal.[lang-code].md
(Example:troubleshoot.mdtotroubleshoot.es.md) - Translate all content in the new file
If using AI/automated translation, add this to the page's front matter:
machineTranslated: true- Language codes should follow ISO 639-1 standards
- Untranslated pages will fall back to English
- Some reference inside the page will break if that reference is also not translated.
- The top level
_index.mdinside each first section (play, blog, dev, etc) must have a translated copy for all languages present in that category.