# OINK Hands-On

> Get a working OINK site from one prompt, then learn its features one layer at a time, from a single page to a published bilingual site.

---

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

---

The fastest way to an OINK site is to describe it. Part I hands a coding agent
the OINK skill, a published site to follow and the facts about your project,
and gets you a working site in one session. Part II then takes the same kind of
site apart one layer at a time, so you know what the agent built and can
change any of it yourself.

## How to read this book {#reading-path}


- **Part I · Quick start** (Chapters 1–2) — Build a blog, a project site, a CLI manual or a book from one prompt, preview it, review it and keep improving it with follow-up prompts. [1. Start from a prompt](/book/01-start/) · [2. Take over the site](/book/02-take-over/)
- **Part II · Step by step** (Chapters 3–10) — Write and structure content, use every kind of component, publish posts and books, shape the home page and the look, help readers find their way in several languages, and deploy and upgrade the site. [3. Pages](/book/03-pages/) · [4. Components](/book/04-components/) · [5. Diagrams and media](/book/05-media/) · [6. Blog](/book/06-blog/) · [7. Book](/book/07-book/) · [8. Home and appearance](/book/08-design/) · [9. Navigation, search and languages](/book/09-navigation/) · [10. Ship](/book/10-ship/)


If you only want a site, Chapter 1 may be all you need. Part II works on one
sample project, the documentation site for Acme DB, an open-source time-series
database, built from the [OINK Starter](https://github.com/pgsty/oink-starter).
Each chapter adds one layer to it and ends with a prompt that asks your agent
to do the same on your own site.

This book is itself an OINK Book. Its chapters are numbered, its figures,
tables and examples carry numbers that the indexes below collect, the whole
book prints as one document at [`/_print/book/`](/_print/book/), and every
page has a Markdown copy at its address plus `index.md`. Chapter 7 shows how
each of these is written.

## Contents {#contents}

- [1 Start from a prompt](/book/01-start/)
  - [Before you start](/book/01-start/#before)
  - [A personal blog like vonng\.com](/book/01-start/#blog)
  - [An open\-source project site like silo\.pgsty\.com](/book/01-start/#project)
  - [A command\-line tool site like pig\.pgsty\.com](/book/01-start/#cli)
  - [A book like ddia\.vonng\.com](/book/01-start/#book)
  - [Write your own prompt](/book/01-start/#your-prompt)
    - [More model sites](/book/01-start/#more-models)
  - [What the agent hands back](/book/01-start/#handoff)
- [2 Take over the site](/book/02-take-over/)
  - [Run it yourself](/book/02-take-over/#preview)
  - [Know the five places](/book/02-take-over/#anatomy)
  - [Review what you got](/book/02-take-over/#review)
  - [Improve it with follow\-up prompts](/book/02-take-over/#follow-up)
  - [Save a baseline](/book/02-take-over/#baseline)
  - [Where Part II goes](/book/02-take-over/#part-two)
- [3 Pages](/book/03-pages/)
  - [Set up the sample site](/book/03-pages/#setup)
  - [Write the page](/book/03-pages/#first-page)
  - [Headings that last](/book/03-pages/#headings)
  - [Let the tree be the navigation](/book/03-pages/#tree)
  - [Add the Chinese peer](/book/03-pages/#translation)
  - [Check your work](/book/03-pages/#checkpoint)
  - [Ask your agent](/book/03-pages/#agent)
- [4 Components](/book/04-components/)
  - [The pattern](/book/04-components/#pattern)
  - [A condition readers cannot miss](/book/04-components/#callout)
  - [A procedure in steps](/book/04-components/#steps)
  - [Choices as tabs](/book/04-components/#tabs)
  - [Code readers copy](/book/04-components/#code)
  - [Settings as a field list](/book/04-components/#fields)
  - [A directory layout](/book/04-components/#filetree)
  - [Where to go next as cards](/book/04-components/#cards)
  - [When Markdown runs out](/book/04-components/#shortcodes)
  - [See how it degrades](/book/04-components/#fallback)
  - [Check your work](/book/04-components/#checkpoint)
  - [Ask your agent](/book/04-components/#agent)
- [5 Diagrams and media](/book/05-media/)
  - [A diagram from text](/book/05-media/#mermaid)
  - [A chart from data](/book/05-media/#echarts)
  - [A formula](/book/05-media/#math)
  - [Screenshots with captions](/book/05-media/#images)
  - [A terminal recording](/book/05-media/#asciinema)
  - [Milestones on a timeline](/book/05-media/#timeline)
  - [Video\, audio and more](/book/05-media/#more)
  - [What loads\, and from where](/book/05-media/#local-first)
  - [Check your work](/book/05-media/#checkpoint)
  - [Ask your agent](/book/05-media/#agent)
- [6 Blog](/book/06-blog/)
  - [Write a post](/book/06-blog/#post)
  - [Authors and series](/book/06-blog/#authors)
  - [Choose the index](/book/06-blog/#index)
  - [An article that opens on an image](/book/06-blog/#immersive)
  - [Announce a release](/book/06-blog/#releases)
  - [Feeds and sharing](/book/06-blog/#feeds)
  - [Check your work](/book/06-blog/#checkpoint)
  - [Ask your agent](/book/06-blog/#agent)
- [7 Books](/book/07-book/)
  - [The book root](/book/07-book/#root)
  - [Chapters](/book/07-book/#chapters)
  - [Number what readers cite](/book/07-book/#numbering)
    - [A table](/book/07-book/#numbered-table)
    - [An equation](/book/07-book/#numbered-equation)
    - [A code example](/book/07-book/#numbered-example)
    - [A figure](/book/07-book/#numbered-figure)
  - [Cross\-reference with xref](/book/07-book/#xref)
  - [Generated indexes](/book/07-book/#indexes)
  - [Print the whole book](/book/07-book/#print)
  - [Check your work](/book/07-book/#checkpoint)
  - [Ask your agent](/book/07-book/#agent)
- [8 Home and appearance](/book/08-design/)
  - [The home page is data](/book/08-design/#home)
  - [Name\, logo and favicon](/book/08-design/#identity)
  - [An accent color\, per section](/book/08-design/#theme-color)
  - [A preset\, and the reader’s choice](/book/08-design/#presets)
  - [Fonts and your own CSS](/book/08-design/#css)
  - [Check your work](/book/08-design/#checkpoint)
  - [Ask your agent](/book/08-design/#agent)
- [9 Navigation\, search and languages](/book/09-navigation/)
  - [Menu entries](/book/09-navigation/#menu)
  - [Local search](/book/09-navigation/#search)
  - [The command palette and the keyboard](/book/09-navigation/#palette)
  - [Backlinks](/book/09-navigation/#backlinks)
  - [Settle the languages](/book/09-navigation/#languages)
  - [Read two languages side by side](/book/09-navigation/#duo)
  - [Check your work](/book/09-navigation/#checkpoint)
  - [Ask your agent](/book/09-navigation/#agent)
- [10 Ship](/book/10-ship/)
  - [Publish more than HTML](/book/10-ship/#outputs)
  - [Build for production](/book/10-ship/#build)
  - [Deploy](/book/10-ship/#deploy)
  - [Comments and analytics](/book/10-ship/#integrations)
  - [Upgrade OINK](/book/10-ship/#upgrade)
  - [Know which stage you are at](/book/10-ship/#stages)
  - [Check your work](/book/10-ship/#checkpoint)
  - [Ask your agent](/book/10-ship/#agent)
  - [Where to go next](/book/10-ship/#next)
- [A Appendix\: Patterns](/book/appendix-patterns/)
  - [Docs group](/book/appendix-patterns/#docs-group)
  - [Docs page](/book/appendix-patterns/#docs-page)
  - [Blog root](/book/appendix-patterns/#blog-root)
  - [Immersive column](/book/appendix-patterns/#immersive)
  - [Blog post](/book/appendix-patterns/#post)
  - [Author profile](/book/appendix-patterns/#author)
  - [Book root](/book/appendix-patterns/#book-root)
  - [Book chapter](/book/appendix-patterns/#chapter)
  - [Where each key takes effect](/book/appendix-patterns/#key-map)

## Figures {#figures}

- [Figure 6-1](/book/06-blog/#fig-vonng-home) — vonng\.com\: an author hero over a landscape\, then six columns\, each with its own feed\.
- [Figure 7-1](/book/07-book/#fig-7-1) — ddia\.vonng\.com\: contents\, the first chapter and the whole book in print\, one click each\.

## Tables {#tables}

- [Table 1-1](/book/01-start/#tbl-model-sites) — More production OINK sites to model a new site on\, by kind of site\.
- [Table 2-1](/book/02-take-over/#tbl-first-review) — A first review of an agent\-built site\, in about twenty minutes\.
- [Table 4-1](/book/04-components/#tbl-component-choice) — Choosing a component by what the reader is doing\.
- [Table 6-1](/book/06-blog/#tbl-blog-index) — The four blog index layouts\.
- [Table 7-1](/book/07-book/#tbl-7-1) — Server sizes by sustained ingest rate\.
- [Table 8-1](/book/08-design/#tbl-presets) — The six visual presets\.
- [Table 9-1](/book/09-navigation/#tbl-common-keys) — The keyboard shortcuts readers use most\.
- [Table 10-1](/book/10-ship/#tbl-outputs) — What the build can publish besides HTML\.
- [Table 10-2](/book/10-ship/#tbl-delivery-stages) — Four stages from preview to a live site\, and what each one leaves open\.
- [Table A-1](/book/appendix-patterns/#tbl-key-map) — The front matter keys used in this book\, and where each takes effect\.

## Equations {#equations}

- [Equation 7-1](/book/07-book/#eq-7-1) — Disk use over a retention period\.

## Examples {#examples}

- [Example 1-1](/book/01-start/#eg-prompt-blog) — A personal blog modeled on vonng\.com\.
- [Example 1-2](/book/01-start/#eg-prompt-project) — An open\-source project site modeled on silo\.pgsty\.com\.
- [Example 1-3](/book/01-start/#eg-prompt-cli) — A command\-line tool site modeled on pig\.pgsty\.com\.
- [Example 1-4](/book/01-start/#eg-prompt-book) — A book modeled on ddia\.vonng\.com\.
- [Example 1-5](/book/01-start/#eg-prompt-shape) — The shape of a site\-building prompt\.
- [Example 2-1](/book/02-take-over/#eg-follow-ups) — Follow\-up prompts\, each one reviewable change\.
- [Example 3-1](/book/03-pages/#eg-quick-start) — A complete documentation page\: three front matter keys\, a lead\, three sections\.
- [Example 3-2](/book/03-pages/#eg-agent-pages) — Prompt\: add a page to your own site\.
- [Example 4-1](/book/04-components/#eg-agent-components) — Prompt\: restructure a page with components\.
- [Example 5-1](/book/05-media/#eg-agent-media) — Prompt\: illustrate a page from text\.
- [Example 6-1](/book/06-blog/#eg-blog-post) — A blog post with authors\, a series and tags\.
- [Example 6-2](/book/06-blog/#eg-agent-blog) — Prompt\: set up the blog the way vonng\.com does\.
- [Example 7-1](/book/07-book/#eg-7-1) — acme\.toml for a server ingesting up to a million points per second\.
- [Example 7-2](/book/07-book/#eg-agent-book) — Prompt\: turn a manuscript folder into a book\.
- [Example 8-1](/book/08-design/#eg-home-data) — A five\-section home page for Acme DB\.
- [Example 8-2](/book/08-design/#eg-agent-design) — Prompt\: rebuild the home page and the look\.
- [Example 9-1](/book/09-navigation/#eg-agent-navigation) — Prompt\: tune navigation\, search and languages\.
- [Example 10-1](/book/10-ship/#eg-agent-ship) — Prompt\: prepare a release of the site\.

---

Section pages:

- [Build a site from one prompt](/book/01-start/): Give a coding agent the OINK skill, a production OINK site to model on and the facts about your project, and review a working site the same session.
- [Take over the site](/book/02-take-over/): Run the preview yourself, learn which file controls what, review the agent's work against one checklist, and keep improving the site with small follow-up prompts.
- [Write a page and give it a place](/book/03-pages/): Set up the sample site, write a page with three front matter keys and stable headings, and let the content tree place it in the sidebar, the pager and a second language.
- [Structure a page with Markdown components](/book/04-components/): Turn the Quick start into a page readers can follow with callouts, steps, tabs, titled code, field lists, file trees and cards, all written as Markdown that still reads well on GitHub.
- [Draw, chart and show](/book/05-media/): Add an architecture diagram, a benchmark chart, a formula, captioned screenshots, a terminal recording and a release timeline to the Acme DB docs, each kept as text or a file beside the page.
- [Publish posts and release notes](/book/06-blog/): Write dated posts with authors, series and featured images, choose how the index looks, open articles on a full-width image the way vonng.com does, and announce each release.
- [Write a book with numbers and references](/book/07-book/): Turn a directory into a book with numbered chapters, figures, tables, equations and examples, link them with xref, generate the indexes and print the whole book as one document.
- [Shape the home page and the look](/book/08-design/): Compose the home page from data sections, give the site its name, logo and accent color, pick a visual preset, and let readers choose their own look and dark mode.
- [Help readers find their way, in their language](/book/09-navigation/): Add menu entries, tune local search, give the command palette your own commands, learn the keyboard, show backlinks, and settle the site's languages and the duo view.
- [Publish, deploy and keep up to date](/book/10-ship/): Choose what the site publishes for printers, feed readers and AI assistants, run the production build, deploy with the Starter's workflow, and upgrade OINK without surprises.
- [Front matter patterns](/book/appendix-patterns/): Copy-and-adapt front matter for Docs groups and pages, blog roots, immersive columns, posts, author profiles, book roots and chapters, as used in this book.

---

Backlinks:

- [Books](/book/07-book/)
- [Docs](/docs/)
- [Books](/docs/write/book/)
