Other setup options
The recommended installation uses the github.com/pgsty/oink Hugo Module. The
following options change how Hugo obtains the same theme source; they do not
change content or the Hugo-only build command.
Prerequisites
Every option requires Hugo Extended 0.160.1 or newer. Git
options require Git, and Hugo Modules require Go. None of the options requires
Node.js, npm, PostCSS, or Autoprefixer for the consuming site.
Option 1: complete release archive
The complete offline archive contains the theme, local browser runtimes, fonts, licenses, notices, vendor manifest, and checksums. It is the preferred input for air-gapped builds and the simplest way to preserve an exact distribution.
Extract the theme under the site’s themes/ directory:
Configure:
Verify the archive checksum before extracting it. Use only an archive attached to an explicit release, not a locally assembled file presented as a published distribution.
Option 2: Git submodule
A submodule records the exact OINK repository commit in the site repository:
Configure the nested theme path:
CI must initialize submodules before running Hugo. Pin THEME_REF to a release
tag or immutable commit; do not leave production on main.
Option 3: pinned Git clone
A clone works when the hosting platform requires the complete theme tree in the build input or when the site vendors a reviewed copy:
Use the same theme: oink setting. Record the resolved commit and the process
that restores the clone. If the files are committed into the site repository,
preserve OINK’s LICENSE, NOTICE, and VENDOR.json.
OINK is not distributed as an npm package. Existing Docsy npm consumers should follow the npm migration guide.
Option 4: Hugo Module
Pin the public module to a release tag or immutable commit:
Import it in hugo.yaml:
For local theme development, use an ignored Go workspace that includes the site module and a sibling OINK checkout.
Preview and verify
All source options use the same commands:
Verify that a clean production build succeeds with no node_modules directory,
that local assets resolve under the configured baseURL, and that both English
and Chinese pages and search indexes are present.
See Upgrade Oink for version changes and override review.