Get started

Build a bilingual OINK documentation site from scratch and deploy it.

OINK is a Hugo theme that ships its browser runtimes with the theme. A consuming site needs only Hugo Extended: no Node.js, no PostCSS, no CDN, and no remote theme asset download during the build.

What this chapter covers

Read these seven pages in order and you will have a deployable bilingual documentation site:

Prerequisites , 5 min

Install Hugo Extended and confirm the binary reports extended. Git and Go are needed depending on how you obtain the theme.

Install OINK , 5 min

Pin a version with Hugo Modules. The other three distribution methods — offline archive, submodule, clone — are on the same page.

Create a site , 15 min

From an empty directory to a previewable page, including how bilingual content is organized.

Basic configuration , 20 min

Site identity, languages, search, repository links, and production build flags.

Project site , optional

Adapt oink.pgsty.com directly as a template, which suits an open-source project that wants a documentation site quickly.

Container preview , optional

Run previews and production builds in a container instead of installing Hugo locally.

Troubleshooting , reference

How to locate build, language, search, and platform problems.

Three starting points

Your situation Suggested path
New project PrerequisitesInstallCreate a site
Existing Hugo site Go straight to Install and import OINK as a module
Existing Docsy site See Migrate from Docsy; prose does not need rewriting

Shortest path

With Hugo Extended, Git, and Go already installed, three commands get you running:

BASH
hugo mod init github.com/example/product-docs
hugo mod get github.com/pgsty/[email protected]
hugo server

Add the module import to hugo.yaml:

hugo.yaml
YAML
module:
  imports:
    - path: github.com/pgsty/oink

Every supported installation method uses the same preview and production commands:

BASH
hugo server --disableFastRender   # local preview
hugo --gc --minify                # production build

Next steps

Once the site runs, continue as needed:

Prerequisites

Install Hugo Extended, plus Git and Go when your method needs them.

Install OINK

Pin an OINK version with Hugo Modules, or choose the offline archive, submodule, or clone alternatives.

Create a site

From an empty directory to a first previewable bilingual page.

Basic configuration

Site identity, languages, search, repository links, and production build flags.

Start from the project site

Adapt oink.pgsty.com as a template to get a fully configured bilingual site quickly.

Container preview

Run previews and production builds in a container instead of installing Hugo locally.

Troubleshooting

Locating build, language, search, upgrade, and platform problems.