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:
site/
├── hugo.yaml
└── themes/
└── oink/
Configure:
theme: oink
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:
git submodule add https://github.com/pgsty/oink.git themes/oink
git -C themes/oink fetch --tags
git -C themes/oink checkout THEME_REF
git add .gitmodules themes/oink
git commit -m "Add OINK theme at THEME_REF"
Configure the nested theme path:
theme: oink
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:
git clone https://github.com/pgsty/oink.git themes/oink
git -C themes/oink checkout THEME_REF
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:
hugo mod get github.com/pgsty/oink@THEME_REF
hugo mod tidy
Import it in hugo.yaml:
module:
imports:
- path: github.com/pgsty/oink
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:
hugo server --disableFastRender
hugo --gc --minify
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 Update OINK for version changes and override review.