Tables
A table is an ordinary GFM pipe table. The theme’s table render hook wraps every
one in a horizontally scrollable region, and the {…} attribute line underneath
decides which kind of table it is: captioned, a compatibility matrix, a field
list, a numbered table, or a tab set. Merged cells, sorting and filtering are
out of scope; when you need them, change how the data is presented.
Shortest form
Without an attribute line it is just a table. Alignment still comes from the
delimiter row, and header cells are th scope="col".
| Component | Port | Purpose |
|---|---|---|
| PostgreSQL | 5432 | Database |
| Pgbouncer | 6432 | Connection pool |
| Patroni | 8008 | High-availability orchestration |
Wide tables scroll themselves
A table with too many columns never widens the page; it scrolls inside its own region. That region is focusable: Tab into it and the arrow keys scroll, and its accessible name is the localized “Scrollable table”.
| Cluster | Role | Version | State | Lag | Connections | Size | Backup |
|---|---|---|---|---|---|---|---|
| pg-meta | primary | 18.1 | running | — | 42 | 12 GB | 2026-08-17 |
| pg-test | replica | 18.1 | streaming | 12 ms | 8 | 12 GB | 2026-08-17 |
Captions
{caption="…"} adds a visible <caption>. It is plain text and it does not
number the table.
| Item | Value |
|---|---|
| Theme version | v0.6.0 |
| Hugo floor | 0.160.1 Extended |
| Licence | Apache-2.0 |
Compatibility matrices
{.matrix} is for “row × column = supported or not” tables: the first column
becomes a row header (th scope="row"), the header row and the first column
stay pinned while scrolling, and the remaining cells are centred unless the
delimiter row says otherwise. ✅ and ❌ are characters the author writes; the
theme does not interpret them.
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| EL 9 | ✅ | ✅ | ✅ | ✅ | ✅ |
| EL 8 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Debian 13 | ✅ | ✅ | ✅ | ❌ | ❌ |
| Ubuntu 24.04 | ✅ | ✅ | ✅ | ✅ | ❌ |
Using the whole canvas
{.full-width} lets a table exceed the reading column and take the full width
the article has. It suits tables with many short columns.
| Language | Code | Sidebar | Search | TOC | Status | |
|---|---|---|---|---|---|---|
| 简体中文 | zh |
✅ | ✅ | ✅ | ✅ | Reviewed |
| English | en |
✅ | ✅ | ✅ | ✅ | Reviewed |
Field lists
{.fields} turns a table into a definition list: the first column is the name,
the last is the description, and the columns in between are metadata. It is the
shape for configuration keys, command flags and API fields; the full syntax is
on the Fields page.
Numbered tables
In a book or a long manual, number the tables: num plus an optional #id and
caption. The table is wrapped in a <figure> labelled with a localized
“Table N.” and registered as a Book target, so xref can reference it and it
appears in the book-wide list of tables. The number is written by the author —
the theme never counts — and id defaults to tbl-<num>.
| Isolation level | Dirty read | Non-repeatable read | Phantom read |
|---|---|---|---|
| Read committed | no | yes | yes |
| Repeatable read | no | no | yes |
| Serializable | no | no | no |
See Table 9-1.
Tables as tabs
Adjacent tables carrying {tab="…"} form a tab set under the same rules as
adjacent fences: group on the first table enables hash, sync and persistence,
and every table after it needs value. The complete rules are on the
Tabs page.
| Directory | Contents |
|---|---|
content/ |
Pages |
data/ |
Landing and release data |
| Directory | Contents |
|---|---|
assets/ |
SCSS and image resources |
static/ |
Files copied verbatim |
Output
| Output | Shape |
|---|---|
| HTML | A focusable <div class="td-table-scroll"> around the <table>; matrix and full-width are modifier classes on that wrapper |
The complete table laid out to the page width; the wrapper stays but is marked td-table-scroll--static and is no longer a focusable viewport |
|
| Markdown | The source table and its attribute line, emitted as written |
| RSS | The complete static table |
Tables load no script.
Parameter reference
The attribute line on the row below the table:
.fields, ,- Render as a definition list, see Fields
style, on* and any other key fail the build.
Limits
- Mutual exclusions:
.fieldscannot combine with.matrix,.full-widthornum;numandtabare exclusive;group/valuerequiretab;metarequires.fields. - The attribute line must touch the table: leave a blank line and it becomes a
visible line of braces. Markdown formatters like to move it — wrap it in
<!-- prettier-ignore-start -->/<!-- prettier-ignore-end -->. - No merged cells, no sorting, no filtering: what a GFM pipe table can express is all there is. Split a complex table with a merged header into two tables, or turn it into a matrix.
- Block content does not fit in a cell: multi-paragraph descriptions, lists and
fences need the
fields/fieldshortcode. .matrixcentring is CSS: an explicit alignment in the delimiter row wins.
Related
- Fields — everything
{.fields}can do - Tabs — adjacent tables as a tab set
- Publishing books — numbered tables, cross references, the list of tables
- Code blocks — where attributes go on the info line instead of the next line