Oink is a local-first Hugo theme for engineering documentation. It ships its styles, fonts, search, diagrams, API documentation runtimes, and content components with the theme, so consumer sites do not need Node.js, or a CDN.
This repository contains only the distributable theme. Documentation,
examples, tests, and deployment configuration live in pgsty/oink.pgsty.com.
Install Hugo, Go, and Git, then initialize your site and add Oink:
hugo mod init github.com/example/docs
hugo mod get github.com/pgsty/oinkImport the theme in hugo.yaml:
module:
imports:
- path: github.com/pgsty/oinkBuild or preview the site:
hugo serverThe landing page is assembled from the sections array in Hugo data. A
single-language site can use data/home.yaml (or .yml); a multilingual site
can use data/home/en.yaml, data/home/zh.yaml, and matching language files:
sections:
- hero
- capabilities
- type: logo_wall
key: ecosystem
- gallery
- testimonials
- contributors
- faq
- cta
hero:
eyebrow: Local-first documentation
title: Build **clearer** docs.
desc: Start with the [OINK guide](docs/oink/) and customize from there.
ecosystem:
title: Used with the tools you already know
desc: Every title and description accepts Markdown, including links.
items:
- name: Hugo
desc: Static site generator
icon: fa-solid fa-bolt
url: https://gohugo.io/String entries use a same-named top-level data block. Object entries can select
another block with key, override the anchor with id, or be removed with
enabled: false. Section data also accepts enabled: false. The available
types are hero, metrics, capabilities, principles, cards,
logo_wall, gallery, testimonials, contributors, faq, markdown, and
cta. Missing optional URLs render as non-link content. For a site-specific
Section, set partial on an object entry; OINK passes that partial the same
page, home, data, entry, type, id, and index context as built-ins:
sections:
- type: launch
key: launch_notes
partial: home/sections/launch.htmlSee the complete landing configuration for
every section type and field shape. Existing sites without sections keep the
legacy Hero → Metrics → Capabilities → Principles → CTA order.
Oink can also be installed as a conventional Hugo theme:
git submodule add https://github.com/pgsty/oink.git themes/oinktheme: oinkOink requires Hugo 0.160.1 or newer. See oink.pgsty.com for documentation and examples.
Oink is derived from Docsy and is licensed under the Apache License 2.0. See NOTICE for upstream attribution and VENDOR.json for bundled third-party components.
The theme is inspired by Fumadocs