# Configuration `uteri` reads `site.conf`: plain text, one `key = value` per line. Blank lines and lines whose first non-space character is `#` are ignored. Project settings come from `./site.conf`. When it is missing, `uteri` reads user defaults from `$XDG_CONFIG_HOME/uteri/site.conf` (or `~/.config/uteri/site.conf`). Flags win over both. Relative paths resolve against the directory that holds the project `site.conf`. ## Keys | key | default | meaning | | --- | --- | --- | | `title` | `uteri` | site name, shown in the header and `` | | `lang` | `en` | `<html lang>` and generated labels | | `content` | `content` | Markdown source directory | | `routes` | `slugify` | `slugify` or `strict` path-to-route mapping | | `ignore` | empty | comma-separated file and directory names to skip | | `attachments` | `copy` | `copy` non-Markdown content files, or `off` | | `theme` | `uteri-night` | built-in theme: `uteri-night` or `uteri-day` | | `templates` | `templates` | template directory; built-in templates when missing | | `static` | `static` | files copied verbatim to the output root | | `data` | `data` | TSV data tables exposed to templates | | `out` | `site` | output directory | `theme` picks the embedded stylesheet: `uteri-night` (pink dark, default) or `uteri-day` (pink light). Both share the same simple templates. A project `style.css` overrides the theme, so delete it to switch back; a project `templates/` directory overrides individual templates. `--content DIR` overrides `content` for one `build`, `check` or `sync` run. It resolves from the working directory, so the project file does not have to change to publish another folder. `routes = slugify` (the default) turns each path segment into ASCII words and keeps case: `My Note.md` becomes `/My-Note/`. `routes = strict` requires names that are already lowercase slugs (`[a-z0-9-]`); anything else is an error. See [CONTENT.md](CONTENT.md). `ignore` takes exact names, not globs, and applies at any depth. Dot-prefixed files and directories are always skipped. Unknown keys, duplicate keys and empty values are errors that name the file and line. ## Collections A collection generates a listing page from the public pages under `path`. `path` is relative to the content directory; `.` means all content. ``` [[collection]] name = notes title = Notes path = notes route = /notes/ template = list.html order = path paginate = 10 ``` - `title` is optional; the default is the capitalized `name`. - `template` defaults to `page.html`; use `list.html` for a listing. - `order` is `path` (default), `title`, `date-desc` or `date-asc` - `paginate` is optional; it splits the listing into pages of that many items. - Nested collections may list the same page twice. A generated route that equals a page route is an error. Dates compare as text and undated pages sort last. ## Pagination Setting `paginate = N` on a collection pre-renders the listing in chunks of `N` items. Page 1 keeps the collection route (`/notes/`) and later pages live at `/notes/page/2/`, `/notes/page/3/`, and so on. The current page's rows are in `items`; `count` stays the total. A listing with one page or fewer renders once and exposes no `paginator` values, so pagination is off by default and existing templates keep working. The paginated routes join the link graph, so a wikilink can target `/notes/page/2/`. A page file that already owns one of those routes is a build error. Tag pages are not paginated yet. See [TEMPLATES.md](TEMPLATES.md) for the `paginator` values and the `{{#if}}` block the default listing uses. ## Tags Tag pages are generated automatically when public pages carry `tags`. The defaults are: ``` [tags] route = tags template = tag.html index_template = tags.html ``` `route` becomes `/tags/`; each tag page is `/tags/<slug>/`. Tag labels group case-insensitively. Slugs are lowercase ASCII letters, digits and hyphens; two labels that collapse to the same slug are an error. Built-in tag templates apply when `templates/` is missing. ## Hooks The `[hook]` section configures external commands: ``` [hook] pre_build = ./hooks/prepare.sh context = ./hooks/words.sh ``` The value is split on whitespace into argv. `pre_build` runs once before content is scanned, in `build`, `check` and `sync`; it may prepare or convert a content tree and print its directory. `context` runs once per page and merges its `key<TAB>value` output into that page's template values. See [HOOKS.md](HOOKS.md). ## site.standard ATProto publishing is optional and off by default. Add a `[standard_site]` section with `enabled = true` and your own `pds`, `repo` and `publication` values, or run `uteri enable atproto`. See [ATPROTO.md](ATPROTO.md). `build` and `check` stay offline; only `uteri sync` uses the network.