Browse locally
You do not need to deploy a site—or even build one yourself—to get value from
OINK. Whenever you have an OINK repository on disk (this docs site, a
teammate’s handbook, an online book, or a workspace where an AI agent writes
notes), running hugo serve turns that folder into a fast, searchable local
website in your browser.
Clone and start the server
Install Git, Go and Hugo per Prerequisites, then clone
the repository and run hugo serve (Hugo’s short alias for hugo server) in
the folder that holds hugo.yml or hugo.yaml:
The first start downloads the pinned OINK theme into your local Go module
cache. Once the terminal prints Web Server is available at http://localhost:1313/, open http://localhost:1313/ in any browser. Press
Ctrl with C in the terminal whenever you want to stop the server.
Read in the browser, not raw Markdown
Reading a documentation tree through hugo serve gives you the full reading
experience that plain Markdown viewers cannot render:
- Structured navigation: the collapsible sidebar, page outline (TOC), breadcrumbs, and previous/next links stay in sync with the folder tree.
- Instant search and shortcuts: press / or
Ctrl with K to search the whole repository locally, and press
' or click the footer
?button to view keyboard shortcuts. - Rendered components: callouts, tabs, field tables, KaTeX math, Mermaid and ECharts diagrams, and galleries render natively with no network dependencies. Maps render their place list offline too; map tiles load only when the site has configured a tile service.
- Reader comfort: switch between Paper, Slate, GitHub, Ink, News and Terminal, toggle light and dark mode, open Duo View on bilingual sites, or print clean PDFs.
If the repository includes unpublished drafts (draft: true in front matter),
start the server with hugo serve -D so those pages appear in the sidebar too.
Edit and watch changes reload live
Leave hugo serve running in one terminal while you edit Markdown files under
content/ or home-page YAML under data/. Every time you save a file—or
switch Git branches—Hugo rebuilds the affected pages in milliseconds and
refreshes your browser tab automatically.
Passing --renderToMemory (-M) is especially clean when you are reviewing a
repository in Git, because the preview never touches public/ on disk.
Follow AI agent reports in real time
When a coding agent such as Claude Code or Codex is working on a large task—for example, auditing a codebase, writing design proposals, drafting documentation, or logging experiment results—reading long Markdown tables and diagrams inside a scrolling terminal quickly becomes tiring.
Point the agent to write its reports as ordinary Markdown pages inside an OINK
site’s content/ directory, and keep hugo serve -D --renderToMemory running
in a side terminal with http://localhost:1313/ open in your browser:
- The agent writes or updates a report (such as
content/docs/reports/audit.md) with headings,{.fields}tables, callouts, or Mermaid / ECharts diagrams. - Hugo detects the file write immediately, rebuilds in memory, and reloads the browser tab while keeping your reading position.
- You read formatted sections, interactive diagrams, and cross-linked pages in
real time—and because
--renderToMemorywrites no build output to disk, the agent’s Git working tree stays clean.
This turns any OINK repository into a zero-setup local reading room for both human notes and agent-generated reports.
Common snags
| Symptom | Fix |
|---|---|
Port 1313 is already in use by another preview |
Run hugo serve -p 1314 to pick another port |
A change to hugo.yml, data/, or a layout did not appear |
Restart with hugo serve --disableFastRender, then hard-reload the browser |
A page with draft: true is missing from the sidebar |
Add -D (hugo serve -D) |
The site lives inside a docs/ subfolder of a larger repo |
Run hugo serve -s docs from the repository root, or cd docs && hugo serve |
For advanced server switches, phone/LAN preview, Docker containers, cache clearing, and production builds, see Local preview.
Related
- Get started — clone the docs site and try building with an AI agent
- From scratch — build your own standalone OINK site
- Add docs to a project — add a
docs/site to an existing repository - Local preview — full
hugo serverreference, LAN access, containers, and caches