# Why a Doc Framework Became My Delivery Backbone

LLMS index: [llms.txt](/en/llms.txt)

---

I recently gave a talk at the Tsinghua Software Forum titled *[After the Mythical Man-Month: How Far Can a One-Person Database Company Go?](/ai/thu-opc-talk/)*.
The most common question was how one person manages dozens of coding agents writing code, translating books, and fixing bugs in parallel.
I shared several lessons from day-to-day practice, and the first one was **[documentation-driven development](/en/ai/sdd/)**.

Methodology is one thing; what actually holds that workflow together every day is **[OINK](https://oink.pgsty.com/)**, the Hugo documentation framework I built three months ago.

![oink18.webp](oink18.webp)

## Why Treat a Documentation Framework as a Core Product

The original motivation behind [OINK](/en/db/oink-release/) was simple. I maintain more than a dozen documentation sites, blogs, and online books. I was tired of Docsy being old, heavy, and tangled in dependencies, and I had no interest in locking plain documentation into MDX and Next.js.

Then I noticed it also solved two hard problems in AI-assisted engineering.

### Saving Attention: Review Docs, Not Code

The scarcest resource in AI engineering is not compute; it is human attention bandwidth. *Attention is all you need.*

When one person is steering dozens of agents at once, the slowest and most exhausting mistake is chasing every diff line by line, or digging through a pile of `PLAN.md`, `NOTES.md`, and `REVIEW_FINAL_v3.md` files dropped in the repository root. Human eyes can only process so much unorganized plain text in a day before trivial details drain you dry.

My solution: **turn the documentation site into the interface between me and my agents.** Architecture proposals, ADRs, security audits, and acceptance checklists no longer sit around as loose drafts; they go straight into a structured companion docs site, with navigation on the left, backlinks on the right, and tables and diagrams in the middle. I open it in a browser, scan the structure, and send anything off-track back for a rewrite. I do not read code line by line; I review designs and reports through the docs site.

Forking MinIO into [Silo](/en/db/long-live-silo/), rewriting Vagrant as [Barn](/en/db/barn-intro/), adopting several PostgreSQL extensions, translating more than thirty database books—every project got a clean companion OINK site from day one. That was when the cadence finally clicked, and output really took off.

### Earning Trust: Written for Humans, and Even More for Agents

Documentation is part of the software, and software ultimately exists for other people to use. When an open-source project's manual is a mess, I rarely believe its code is much better.

That rule still holds today, only more directly: **humans may no longer bother reading docs page by page, but agents read them for us.**

When I size up a third-party open-source project now, my first move is to have an agent read its documentation site from end to end: are the concepts clear, are the boundaries spelled out, and do the examples actually run? A clean, accurate, fast-loading docs site that is also agent-friendly (serving raw `.md` files and an `llms.txt` index out of the box) is probably the highest-leverage way an open-source author can earn trust.

## From 50 Sites of My Own to Over 100 Across the Web

When I launched OINK in August, I started by [migrating 18 of my own websites](/en/ai/oink-intro/). Three and a half months later, my fleet running on OINK has grown to **more than 50 sites**, spanning the entire Pigsty ecosystem, `pg.center`, over thirty multilingual translated books, and my personal blog `vonng.com`. Every time I cut a release, I have an agent upgrade all of those production sites in one sweep, which doubles as a broad regression test suite.

I have never promoted OINK on Hacker News, Reddit, or V2EX; the most I ever wrote was two or three posts on WeChat. Even so, external adoption grew on its own. The repository has picked up 176 GitHub stars, quietly cracking the top 150 Hugo themes worldwide, with over **3,400 clones** and more than **1,400 unique cloners** over the past two weeks.

A few days ago, I had an agent sweep GitHub, Google, and major theme directories. The [`oink.pgsty.com` showcase](https://oink.pgsty.com/case/) lists **79 live production sites**, **48 of them independent third-party community projects**. Counting sites we have not added yet, there are **over 100 known live sites** across the web.

The range of adopters is much broader than I expected. [**Apache HugeGraph**](https://hugegraph.apache.org/) migrated roughly 300 pages of bilingual Chinese/English documentation and tracks new releases closely. They just rolled out 1.5.1's Duo View, and this week they already have a PR testing 1.6's pure CSS and BM25 search. [**Red Hat AI Services (CAI)**](https://rh-aiservices-bu.github.io/cai/) built a ten-language portal and wrapped OINK into a shared enterprise module (`Shell`) and a multi-repo bookshelf (`Library`). Individual bloggers have moved over from Docusaurus 3, Blowfish, Docsy, and Jekyll; one crawled over 10,000 links after migrating with zero broken links, and the AI product management course CC4PM even dedicated Lesson 24.9 to building an OINK content site.

```gallery
![Apache HugeGraph](case-apache-hugegraph.webp) # Apache HugeGraph: ASF top-level graph database project with 300 pages of bilingual Chinese/English docs, tracking new releases closely
![Red Hat AI Services](case-redhat-cai.webp) # Red Hat AI Services (CAI): ten-language portal built by Red Hat's AI team
![Red Hat CAI Field Manual Library](case-cai-field-manual-library.webp) # Red Hat CAI Library: enterprise multi-repo manual bookshelf wrapped on top of OINK
![SSG Book open-source textbook](case-ssg-book.webp) # SSG Book: one of three open-source textbooks published with OINK by university lecturer Polla Fattah
![Cortrix AI documentation](case-cortrix.webp) # Cortrix: semantic memory system docs for AI agents; the authors opened a PR specifically to restore OINK attribution in the footer
![GPUWorks documentation](case-gpuworks.webp) # GPUWorks: GPU compute platform docs, the first multi-version OINK deployment on Read the Docs
![OPIC compute platform](case-opic.webp) # OPIC Open Intelligent Computing Platform: full migration from Docusaurus 3 to single-binary Hugo + OINK
![Programming Massively Parallel Processors, 5th Edition](case-pmpp5-zh.webp) # Programming Massively Parallel Processors (5th Ed.): 27 chapters and 230 Chinese/English anchors aligned via Duo View
![Zhang Muchuan's personal blog](case-zhangmuchuan.webp) # Zhang Muchuan's blog: custom "Paper, Ink, and Vermilion" East Asian aesthetic built with OINK design tokens
```

What surprised me even more is that the design ideas have started spilling into other ecosystems:

- **[Sumi](https://sumi.mkdocs-ng.org/zh/)**, the official theme for Python's **MkDocs NG**, credited OINK directly in its launch post for inspiring its native Markdown components, local-only fonts/search/diagrams, and zero-CDN delivery.
- In the **Astro 7** ecosystem, **[uniblog](https://github.com/AzoteGwei/uniblog)** appeared as a multilingual blog template recreating OINK's visual style and local search.
- **[OINK Terminal](https://community.obsidian.md/themes/oink-terminal)** went live on the **Obsidian** community theme directory and already has over 100 downloads.
- Within the Hugo ecosystem, a child blog theme (`ft-oink-blog-theme`) overrides just ten templates while inheriting OINK's upstream upgrade chain.

## Three Back-to-Back Releases to Close the Gaps

I had some spare time this week and shipped three minor releases in a row (**1.6.0, 1.7.0, and 1.8.0**) to close several hard gaps left over from the early versions.

### 1.6: Dropping Sass, Trimming the Core, and Fixing Chinese Search

Hugo 0.170 officially removed LibSass and the Extended edition, requiring an external CSS compiler. That rubbed me the wrong way: a documentation framework has no business forcing you to install Dart Sass just to build a site. So in 1.6 I ripped Sass out altogether and split the entire stylesheet into layered pure CSS, matching the final Sass build byte for byte. With Sass gone, I also cleared out Bootstrap JS and Lunr, cutting the per-page core script (`core.js`) from **92 KB down to under 9 KB**.

Performance improved noticeably too, once I cut out several sources of wasted bandwidth and redundant work. Heavy widgets (ECharts, Mermaid, Markmap, Asciinema, and Giscus comments) used to load as soon as you opened a page; now they **lazy-load only when you scroll near them**, keeping initial loads fast. KaTeX now bundles `woff2` fonts only, shrinking static assets on math-heavy sites from 1.1 MB to 0.3 MB. Sidebar branches outside the active path are rendered once per build instead of per page, cutting build time on a 449-page docs site from 4.3 seconds to 1.7 seconds. On narrow screens, the top bar collapses cleanly into icons and then into an overflow menu, and all 32 built-in UI locale packs got a full proofreading pass.

Search also got a complete overhaul. Previously, English relied on Lunr while Chinese fell back to crude substring matching, and on large sites the browser stalled on the first search click to build an inverted index. Release 1.6 replaces that with a **scan-based local BM25 search engine**: without bundling a Chinese word-segmentation dictionary, it uses overlapping bigrams for **accurate Chinese search without spaces**. Querying `数据库连接池超时` ("database connection pool timeout") returns direct hits. English matches on whole-word boundaries, so searching for `port` no longer pulls up `support`, and code tokens like `top_k` or `->>` match literally. Parameter-level anchors also landed, so searching for a configuration key jumps straight to its definition line rather than stopping at the parent heading. When a site's index grows past **2 MiB**, body text is automatically split out for on-demand loading without stalling initial page load.

### 1.7: New Components and Rebuilt Keyboard Shortcuts

Release 1.7 shipped six high-frequency components in one batch: **Map, Social, Update, Timeline, Video, and Audio**. I held strictly to one rule when designing all six: **never invent proprietary syntax if plain Markdown can stay readable.** Even if you walk away from OINK someday and open the source files on GitHub or in Obsidian, they should still read cleanly at a glance.

Take **Map (`map` code fence)** first. You write a short YAML block in Markdown listing place names, coordinates, captions, photos, and section anchors; add `route=true` to connect them into a path automatically. The theme hardcodes no tile service: without a configured tile provider, it ships zero JavaScript and zero external requests, degrading into a numbered location list with OpenStreetMap links. Once a tile provider is configured, it lazy-loads the bundled Leaflet 1.9.4 on demand, with support for dark-mode tiles and click-to-load consent.

Declarative plain text like this is ideal for handing off to agents in bulk. My blog's [`trip/` section](/en/trip/) had accumulated more than twenty travelogues and hundreds of photos over a decade. I had agents scan photo EXIF headers, cross-check capture metadata in my local Apple Photos library, and calibrate coordinates against public hiking tracks. Running in parallel for an hour, they equipped **23 older trip reports** with interactive photo topographic maps. Here is how *[Everest East Face: Gamma Gou Trekking](/en/trip/2018-gamagou/)* looks:

![Interactive Gamma Gou photo map generated automatically by an agent from photo metadata; clicking a numbered marker previews the photo and jumps to the matching section](map-gamagou.webp)

Next is **Social (`> [!SOCIAL]`)**. Technical writing inevitably quotes posts from X, Weibo, or Zhihu. Official embed scripts turn blank offline and drag in trackers; screenshots look blurry, turn into harsh white blocks in dark mode, and trap text inside pixels so a bilingual blog can neither search nor translate it. That is why I built the Social component.

Instead of inventing new syntax, it uses a plain Markdown **`> [!SOCIAL]` callout** with a single block-attribute line; nested quotes are just another blockquote level (`> > [!SOCIAL]`). The cards use zero JavaScript, send zero requests to external platforms, and adapt automatically to all 12 themes. Once it was in place, I had Codex scan over 4,600 images across my blog and replace 209 social screenshots (32.8 MB) with **492 offline cards across 149 posts**.

The remaining components follow the same playbook. **Update** appends `{.update date="2026-11-28" tags="Added, Changed"}` to an ordinary heading, adding a date and tag pills while preserving TOC entries, anchors, search, and `J`/`K` navigation. **Timeline** attaches `{.timeline}` to a standard Markdown definition list and renders it in pure CSS. **Video / Audio** takes a single line like `![Title](demo.mp4)`; YouTube and Bilibili links render as zero-request cards by default, with optional per-platform click-to-load embeds and a clean fallback to native browser controls when JavaScript is off.

```gallery
![SOCIAL callout source and rendered output](comp-social.webp) # Plain > [!SOCIAL] callout: readable as raw Markdown, adapts to all 12 themes, and supports nested quotes
![Offline social cards on vonng.com](vonng-social.webp) # In production on vonng.com: 492 offline social cards replacing bulky white-background screenshots
![Update changelog component](comp-update.webp) # Update entries: append {.update} to a standard heading for dated changelog pills while preserving TOC anchors
![Unified audio and video control bar](comp-media.webp) # Unified media bar in 1.8: one line of Markdown with a single-track tri-color scrub bar styled across all six style palettes
```

Keyboard shortcuts also got a ground-up redesign. In 1.7, I tore down the ad-hoc shortcuts that had accumulated over time and laid them out into a clean **3 × 10 grid (29 single-key shortcuts)**. Press apostrophe `'` or click `?` in the footer to pull up the cheatsheet:

![The 3 × 10 keyboard shortcuts overlay opened by pressing ': Navigation, Actions, and Appearance side by side, with a checkbox to disable single-key shortcuts at bottom left](shortcuts-sheet.webp)

Every frequent action sits within reach of one hand: `W`/`S`/`A`/`D` navigate the sidebar, `Q`/`E` flip between previous and next pages, `K`/`J` jump across headings, `O` expands or collapses everything at once, `-`/`=` resize the content column in 100 px steps, `B` opens side-by-side bilingual Duo View, `Z` toggles Zen mode (hiding surrounding chrome), `M` displays raw Markdown source, and `[`/`]` send the current page straight to ChatGPT or Claude for questions or a summary.

A few practical details went into the keymap. Not everyone uses a US keyboard: layouts like German QWERTZ make `/` and `\` awkward to reach, and Chinese readers often leave full-width IMEs turned on. So `/` and `\` have letter equivalents `F` and `C`, common full-width Chinese punctuation marks are mapped as well, and anyone who dislikes single-key shortcuts can toggle them off with one click via "Enable shortcuts" at the bottom left of the overlay.

I also added a **site-local browsing history overlay triggered by `H`**. Stored in browser `localStorage` and scoped by site path, it records the last 100 visited pages in reverse chronological order and deliberately excludes the current page, which means **pressing `H` followed by `Enter` jumps straight back to the previous page**.

![Local browsing history overlay opened with H: lists the last 100 visited pages on the site in reverse chronological order, with instant filtering and single-item deletion](history-overlay.webp)

Finally, 1.7.0 fixed a longstanding headache from publishing to WeChat: **formatted rich-text copy**. Copying article prose from a browser into WeChat's Official Account editor used to drag along gray callout boxes, dark-mode backgrounds, heading `#` anchors, line numbers, and copy buttons that had to be stripped out by hand. Now copying article content emits clean inline HTML using the active preset's print palette, strips spurious spaces introduced by line wraps in Chinese Markdown source, and keeps syntax highlighting and ordered-list start numbers intact. Paste it into WeChat or Zhihu and hit publish.

### 1.8: 6 Visual Styles, 12 Themes

OINK originally shipped with four visual styles (Paper, Slate, Ink, and Terminal). **1.8.0** reorganized the entire visual system and added two new styles: **GitHub** and **News**.

The appearance menu now forms a clean 2 × 3 grid: **6 styles × light/dark = 12 themes**. While reading docs, press `T` to switch style and `Y` to toggle light and dark mode:

![OINK 1.8 appearance menu: Paper, Slate, and GitHub on the top row; Ink, News, and Terminal on the bottom row. Press T to switch style and Y to toggle light/dark mode](appearance-menu.webp)

The top row (**Paper, Slate, and GitHub**) stays restrained for everyday technical docs and blogs. The bottom row leans into distinct visual character: **Ink** draws on handwritten rice-paper manuscripts, **News** channels crisp lead-type newspaper columns, and **Terminal** offers a hacker-friendly monospace console with a *Matrix*-style black-and-green dark mode.

Across all 12 themes, each light/dark pair shares the same typography and layout, but the dark palettes are never mechanical inversions; every variant is tuned on its own terms.

```gallery {.gallery-2col}
![Paper Light](theme-paper-light.webp) # Paper · Light: classic warm-white paper with blue links, pairing IBM Plex Sans with system sans-serif CJK
![Paper Dark](theme-paper-dark.webp) # Paper · Dark: warm charcoal night paper with soft blue links, keeping the exact same typography and layout
![Slate Light](theme-slate-light.webp) # Slate · Light: cool blue-gray engineering palette with the crisp, understated feel of a technical manual
![Slate Dark](theme-slate-dark.webp) # Slate · Dark: deep slate-blue surfaces with bright cyan accents, built for long reference sessions
![GitHub Light](theme-github-light.webp) # GitHub · Light: tuned on github-markdown-css to reproduce a familiar README reading experience
![GitHub Dark](theme-github-dark.webp) # GitHub · Dark: faithful to GitHub Dark default colors, down to the zebra-striped tables
![Ink Light](theme-ink-light.webp) # Ink · Light: warm rice-paper surface, Palatino Latin type, Kaiti headings, Fangsong body text, and vermilion emphasis marks
![Ink Dark](theme-ink-dark.webp) # Ink · Dark: inspired by gold-and-silver sutras on indigo paper—deep indigo-violet ground with muted silver body text and gold headings
![News Light](theme-news-light.webp) # News · Light: letterpress newspaper column style—newsprint gray, zero border-radius site-wide, and heavy double rules
![News Dark](theme-news-dark.webp) # News · Dark: darkroom aesthetic—true black ground with silver-halide text and a touch of safelight orange
![Terminal Light](theme-terminal-light.webp) # Terminal · Light: pale gray-green paper with all-monospace body copy for a crisp plain-text terminal feel
![Terminal Dark](theme-terminal-dark.webp) # Terminal · Dark: restrained Matrix phosphor screen with softly glowing green headings and faint scanlines
```

The neat part is that all 12 themes compile into one pure CSS stylesheet, **bundling no CJK fonts and making zero external font requests**. Chinese Kaiti and Fangsong are pulled directly from installed system fonts via `local()` aliases scoped to CJK Unicode ranges, so emphasized Chinese characters are no longer slanted into ugly faux italics by the browser, while Latin text keeps true italics.

## What's Next: Static, Dynamic, Single Binary, and a Native App

At this point, OINK's core feature set is largely complete. The next focus is **multi-version dynamic serving and a native reader**.

Purely static Hugo handles thousands of pages effortlessly: my eight-language `doc.pg.center` has nearly 5,000 files and builds in a few seconds. When you need to publish massive multi-version documentation, though (say, 550 versions of the PostgreSQL docs totaling over a dozen gigabytes of text), pure static generation hits a wall.

Next, I plan to build a dynamic server edition of `oink` that renders pages on demand from Git, SQLite, or PostgreSQL. Having a database underneath unlocks better cross-version full-text search along with built-in authentication, comments, traffic analytics, and access control.

I have even built a macOS app called **Crib**: it lets you pack an OINK site and its search index into a single `.oink` bundle that opens directly in a browser or inside Crib for native reading and offline full-text search.

## You Don't Actually Need to Learn OINK

Six visual styles, 29 shortcuts, and twenty-plus components might sound like a lot to learn. In practice, the opposite happened: as OINK accumulated features, the barrier to entry kept dropping. Nobody needs to memorize these details by hand anymore. To spin up a site, just replace the `<...>` placeholders below with your own details and pass this prompt to your coding agent:

```text
Build a site with Hugo and the OINK theme, following the OINK site-building skill: https://oink.pgsty.com/skill.md
Refer to the OINK documentation (https://oink.pgsty.com/docs/) and its examples, and make full use of OINK's features.
Site details: <name, directory, content and audience, topic, sections, format, style preferences, domain, hosting platform, ...>
```

Let the agent take it from there. It reads the latest [`skill.md`](https://oink.pgsty.com/skill.md), picks the closest reference from the showcase of live sites, wires up the directory tree, styling, search, and deployment pipeline, and starts a local preview for your review. That leaves only two jobs for the human: **write something worth reading in Markdown, and sign off on the result.**

OINK gives software engineering a documentation foundation with almost no learning curve, and because everything stays in plain Markdown, you are never locked into a framework. Frontend stacks churn every two or three years, but your documentation, books, and engineering records deserve to outlive all of them.

If you need a clean, low-maintenance home for a project, blog, or knowledge base, toss the prompt above to your agent and give it a try.

**Feed it Markdown. Let the pig handle the rest.**

---

- OINK website & 79 live showcase sites: <https://oink.pgsty.com/>
- OINK GitHub repository: <https://github.com/pgsty/oink>
- One-prompt site-building skill: <https://oink.pgsty.com/skill.md>

## Further Reading

- [After the Mythical Man-Month: How Far Can a One-Person Database Company Go?](/ai/thu-opc-talk/)
- [Documentation-Driven Development: The First Secret to AI Software Engineering](/en/ai/sdd/)
- [OINK: After Six Years of Wrestling with Documentation Frameworks, Codex Finally Got Me Over the Line](/en/db/oink-release/)
- [Oink: Build Modern Websites with Markdown](/en/ai/oink-intro/)
- [Everest East Face: Gamma Gou Trekking (Interactive Photo Map in Action)](/en/trip/2018-gamagou/)
- [Goodbye Vagrant, Hello Barn](/en/db/barn-intro/)
