# Get started

> Clone the OINK docs site to run a full site locally in two minutes, then build your own personal or project site with an AI agent, from scratch, or inside a project's docs/ folder.

---

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

---

The fastest way to understand OINK is to clone this documentation site and run
it on your machine. In two minutes you have a complete live site to click
through—with real Markdown source right beside it—and from there you can hand
one prompt to an AI coding agent to build your own site.

## Prerequisites {#tools}

You need Git, Go, and Hugo (tested on `0.170+`). Go is required because Hugo
fetches the theme as a Go module; building an OINK site never needs Node.js,
npm or a Sass compiler.

```console
$ hugo version
hugo v0.170.1+withdeploy darwin/arm64
```

On macOS, `brew install git go hugo` installs all three. On Linux and Windows,
follow the [Hugo installation guide](https://gohugo.io/installation/) and the
[Go downloads page](https://go.dev/dl/).

## Step 1: Clone the docs site and run it locally {#clone}

Instead of staring at an empty skeleton, clone `oink.pgsty.com` itself and
start Hugo's local server:

```bash {title="Terminal"}
git clone https://github.com/pgsty/oink.pgsty.com.git
cd oink.pgsty.com
hugo serve
```

The first run takes a moment while Hugo downloads the pinned OINK theme into
your local Go module cache; every subsequent start takes a second. Open
<http://localhost:1313/> to explore the live site:

- Click through **Docs**, **Book**, **Case** and **Blog**, and open the
  **Appearance** menu to switch between Paper, Slate, GitHub, Ink, News and
  Terminal in both light and dark mode.
- Press \/ to try local full-text search, and switch between
  English and Chinese from the top bar.
- Open any page under `content/docs/components/` in your editor, change a
  sentence, and save: the browser reloads automatically so you can see how
  Markdown maps to rendered components.

Because this repository doubles as OINK's integration test suite, treat it as a
live reference rather than a template to deploy. Once you know what you want,
create your own site in a fresh directory below.

## Step 2: Build your own site with an AI agent {#agent-skill}

Once Git, Go and Hugo work on your machine, the fastest way to build your own
site is to open a coding agent such as Claude Code or Codex in an empty folder
and give it a concrete prompt backed by the OINK site-building skill
(`oink-site`):

```bash {title="Terminal"}
mkdir my-site && cd my-site
claude   # or codex, or any coding agent that runs shell commands
```

Paste this prompt after replacing the `<angle brackets>` with your own details:

```text {title="Prompt: build a personal site with Hugo and OINK"}
Read https://oink.pgsty.com/skill.md and follow it to build my personal site
with Hugo and the OINK theme in this empty directory.

About me: <Your Name>, <one-line bio, e.g. backend engineer writing about
databases and distributed systems>.
Domain: <https://you.example.com>.
Languages: <English, or English and Simplified Chinese>.

Site structure:
- Home page assembled from OINK landing data: a concise hero introducing me,
  cards linking to my main sections, and links to GitHub / X.
- A Blog section with card-grid indexes, tags, RSS feed, and three realistic
  starter posts in my voice.
- A Notes section using the Docs shell for evergreen technical notes.
- An About page with my bio, current projects, and contact links.

Appearance and hygiene:
- Default to the Paper preset, enable dark mode, and offer Paper, Slate,
  GitHub, Ink, News and Terminal in the Appearance menu.
- Enable local search, Markdown outputs, and llms.txt; include a .gitignore
  that excludes public/, resources/, .hugo_build.lock and .hugo_cache/.
- Pin the latest published OINK release in go.mod rather than tracking main.

When the production build passes with zero unexpected warnings, run hugo serve,
check the site in a browser on desktop and mobile widths, and tell me what
placeholders I should replace next.
```

The skill file (`https://oink.pgsty.com/skill.md`, or
`https://oink.pgsty.com/skill.zh.md` for Simplified Chinese) sends the agent to
these docs for current OINK syntax, warns it away from retired Docsy or older
OINK keys, and maps each kind of site to real examples in the
[case library](/case/).

To keep the skill installed across sessions instead of referencing its URL each
time, download it once and start a new agent session:

```bash {tab="Claude Code"}
mkdir -p ~/.claude/skills/oink-site
curl -fsSL https://oink.pgsty.com/skill.md -o ~/.claude/skills/oink-site/SKILL.md
```

```bash {tab="Codex"}
mkdir -p ~/.codex/skills/oink-site
curl -fsSL https://oink.pgsty.com/skill.md -o ~/.codex/skills/oink-site/SKILL.md
```

Download the file again whenever you want to refresh it; the header notes the
OINK release it targets. For more prompt patterns—open-source project sites,
CLI manuals and books—read [Build a site from one prompt](/book/01-start/).

## Choose your next guide {#choose}

From here, follow the guide that matches where your site lives today:

- [Browse locally](/docs/start/local/) — Already have an OINK repository? Run `hugo serve`, read live docs in the browser, edit with auto-reload, and monitor reports written by coding agents.
- [From scratch](/docs/start/from-scratch/) — Assemble a minimal standalone site file by file, or switch an existing Hugo site to OINK: project layout, `hugo.yml` prerequisites, first page, and offline or submodule installs.
- [Add docs to a project](/docs/start/add-docs/) — Already have an open-source codebase? Add an isolated `docs/` Hugo sub-project with `.gitignore` hygiene and GitHub Pages or Cloudflare Pages auto-builds.
- [Upgrade](/docs/admin/upgrade/) — Upgrading an older OINK site or migrating from Docsy: version upgrades, syntax migration, and override review.
{.cards .td-cards-list}

---

Section pages:

- [Browse locally](/docs/start/local/): Clone an existing OINK repository and run hugo serve to read docs in your browser, preview edits as you type, and watch AI agents' latest reports render live.
- [From scratch](/docs/start/from-scratch/): See what a minimal standalone OINK project looks like, build one from an empty directory, add OINK to an existing Hugo site, or install it without Go modules.
- [Add docs to a project](/docs/start/add-docs/): Add a self-contained OINK documentation site inside an existing open-source repository's docs/ directory, keep build outputs out of Git, and wire GitHub Pages and Cloudflare Pages auto-builds.

---

Backlinks:

- [Introducing OINK](/blog/oink-announcement/)
- [Six years to Oink](/blog/oink-release/)
- [Start from a prompt](/book/01-start/)
- [Ship](/book/10-ship/)
- [Le Shi Handbook](/case/le-shi/)
- [Leafz](/case/leafz/)
- [Docs](/docs/)
- [Introduction](/docs/about/)
- [Highlights](/docs/about/features/)
- [Cases](/docs/about/showcase/)
- [Local preview](/docs/admin/preview/)
- [Cards](/docs/components/cards/)
- [Presentation](/docs/components/presentation/)
- [Steps](/docs/components/steps/)
- [Configuration](/docs/customize/config/)
- [Home and landing pages](/docs/customize/home/)
- [Add docs to a project](/docs/start/add-docs/)
- [From scratch](/docs/start/from-scratch/)
- [Browse locally](/docs/start/local/)
- [Writing pages](/docs/write/pages/)
