Basic configuration
Hugo reads site-level settings from hugo.yaml, hugo.toml, or hugo.json.
The OINK project site uses YAML because multilingual menus and theme options are
easier to read and review in that form.
This page covers the configuration a site needs to run. Navigation menus, multilingual details, and version management are in Site configuration.
Complete minimum configuration
Key parameters
-
baseURL,string, required The real production address, including any subpath. Deploying to
example.com/docs/requireshttps://example.com/docs/, or every asset link points at the wrong location.-
defaultContentLanguage,string, default:en The default language. It decides which language the unprefixed URLs serve.
-
languages.<lang>.weight,integer Language order. The lowest weight comes first, and the language button cycles in that order.
-
params.offlineSearch,boolean, default:false Enables the theme’s same-origin Lunr index and CJK substring fallback. Indexes are generated per language and queries never leave the site.
-
params.github_repo,string The content repository. Edit this page, View edit history, and Report an issue are all derived from it.
-
params.github_branch,string, default:main The branch that edit and history links point at.
-
params.ui.showLightDarkModeMenu,boolean, default:false Shows the light/dark control. OINK’s interactive features are opt-in; the theme does not set site policy on a site’s behalf.
Output formats
OINK forces no optional output format. A site declares what it wants:
| Format | Effect |
|---|---|
markdown |
Enables the Copy Markdown and View markdown page actions |
LLMS |
Emits llms.txt so AI tooling can index the site |
print |
Enables the whole-section print view |
Local runtimes
Mermaid, KaTeX, Markmap, Swagger UI, Redoc, Asciinema, ECharts, and Infographic all ship with the theme and load according to what each page actually uses. A page that uses none of them receives none of their runtimes.
PlantUML and Draw.io are the exception: their normal workflow depends on a rendering service, so OINK provides no default endpoint. Enabling one without configuring an endpoint fails the build:
This is deliberate: a failed build is better than silently sending content to a public service you never chose.
Production checklist
- Use the real production
baseURL, including any subpath. - Disable hosted analytics, comments, Google CSE, Algolia, and remote embeds unless each is an explicit product decision.
- Pin the Hugo Extended version and the theme version in CI.
- Use
hugo --gc --minifyas the production build command. - Keep
LICENSE,NOTICE, andVENDOR.jsonwhen redistributing an archive.
For a complete buildable reference, read the project site’s own hugo.yml.
Next steps
- Site configuration: menus, languages, versions
- Authoring: start writing documentation