Code blocks and Code Groups
Add filenames, exact Copy behavior, wrapping, collapse, and shareable groups to Hugo code examples.
OINK’s components fall into two groups: the writing primitives you use every day, and the larger components you need for specific situations. Complete multi-page publishing workflows live under Scenario components.
They all follow one contract: semantic HTML, no JavaScript for the non-interactive ones, a defined presentation in print and Markdown output, and a failed build rather than silent degradation when a parameter is invalid.
| Component | Purpose | Needs JS |
|---|---|---|
| Code blocks and groups | Filenames, copy, collapse, synchronized tabs | On pages with code |
| Badge | Status labels such as Beta or Deprecated | No |
| Kbd | Keyboard shortcuts | No |
| Fields | Configuration, parameter, and response descriptions | No |
| FileTree | Directory structures | No |
| Component | Purpose | Needs JS |
|---|---|---|
| Gallery | A grid of related images | Reuses the zoom runtime |
| Image zoom | Enlarging screenshots and diagrams | Per page when enabled |
| Component | Purpose |
|---|---|
| Tabs, cards, steps, and more | Tabbed panes, cards, steps, disclosures, carousels |
| Component | Purpose | Runtime |
|---|---|---|
| Diagrams and formulae | Mermaid, KaTeX, Markmap, PlantUML | Per page |
| ECharts | Interactive data charts | Per page |
| Infographic | Process and information graphics | Per page |
| Scenario | Coordinated capabilities |
|---|---|
| Sequential reading | Pager order, head relations, local mathematics |
| Releases and downloads | Facts, checksums, rolling and pinned channels |
| Landing pages | Full-width shell, local data, 21 reusable sections |
| Book publishing | Numbered media, xrefs, indexes, whole-Book print |
These scenarios compose several primitives with navigation, data, and output rules. Their pages are the authoritative adoption guides; do not infer a scenario contract from one shortcode example alone.
{{< … >}}.filetree/folder, gallery/image, field) are valid only
inside their parent.Add filenames, exact Copy behavior, wrapping, collapse, and shareable groups to Hugo code examples.
Add compact, semantic status labels without custom colors or JavaScript.
Write keyboard shortcuts as accessible, static key sequences.
Describe configuration, parameters, properties, and response fields with responsive semantic HTML.
Present repository and directory structures as semantic, progressively disclosed lists.
Arrange related images in a responsive static grid that can reuse Image Zoom.
Let readers inspect meaningful standalone images with an optional native dialog.
Use OINK’s local-first content components safely and accessibly.
Add local diagrams, mind maps, and scientific formulae to a page.
Build responsive, local-first charts from structured JSON or YAML.
Turn concise declarative data into local SVG infographics.