| f assetHref | The published URL of an attachment named in a note's frontmatter (`cover: hero.jpg`, `image: portrait.svg`); external URLs pass through. Undefined when the vault didn't publish it. Resolves like the pipeline, which publishes attachments named by top-level `image`, `cover`, and `socialImage`: relative to the note's file, then from the vault root, then by a basename only one attachment has. |
| f authLabel | `Bearer token`, `None`, or the scheme as written. |
| f buildBreadcrumbs | Home, each folder the note sits in, then the note. A folder note ends its own folder's trail instead of repeating it. A slug no folder record places falls back to its own segments. |
| f buildExplorerTree | The vault as a tree: folders first, then notes. Each group sorts by `order` frontmatter, then by a theme's explorer row (`itemOf`), then in natural order by title; a folder takes its folder note's `order`. The home note is left out (the site title links home). A folder links its folder note (`guides/index.md`) when one exists, otherwise its generated folder page. |
| f classifyLink | Classify a link in rendered note content. Internal links get previews and the internal style; files, heading anchors, and footnote links stay quiet. |
| f count | `1 note`, `3 notes`. |
| f createSearch | Build a query function over the vault's search index. `documents` carries final URLs; the stored index may predate the deployment base, so hrefs come from it. |
| f currentColorMode | The mode the page currently renders in. |
| f defineRenderer | Keeps a renderer's data type flowing from `read` to `nav`, `page`, and `examples`. |
| f exampleFromSchema | A representative value: the schema's example, then its default, its first enum value, then a placeholder by type. |
| f excerpt | About `words` words of `content`, centred on the first matched term. |
| f fetchPreview | Cloned preview nodes for `href`. IDs get a prefix so previews never collide with the host page's headings; `scrollTarget` finds the linked heading inside them. |
| f folderBreadcrumbs | Home, then each folder down to `folder` (a folder page's trail). |
| f folderContents | Every note under a folder, nested ones included, plus its direct subfolders. The folder's own note (`log/index.md`) is its page, not an item. |
| f folderLayout | Where each note's file sits, read from the index's folder records. Slugs can't tell: when two files want one URL, one gets a suffix (`guides/index.md` may publish as `guides-2`), and a root `guides.md` may hold the folder's slug. |
| f formatDate | Format a note date as `Sep 4, 2026`. Dates are calendar days, so format in UTC. |
| f highlight | Split text into matched and plain runs, so results render highlights without HTML. |
| f isoDate | ISO date for `<time datetime>`. |
| f isRecord | |
| f newestFirst | |
| f noteDate | The date a list shows for a note: last modified, else published, else created. An unparseable date is skipped, so one bad value can't hide the note's date. |
| f notesTagged | Notes tagged `tag` or a nested tag under it (`tag/…`). |
| f noteStylesheets | Stylesheet URLs for a host note route. Call it in the route's server `load` (`+page.server.ts`): it prepares the vault itself, and `hostStylesheets` is empty in the browser, so serialized server data must carry the SSR list. |
| f openFolderIds | Folder ids to open so `folder` shows in the explorer: it and every folder above it. |
| f pageCrumbs | Breadcrumbs for any page, ending with the page itself (Quartz's `showCurrentPage`). List pages walk through their index route; home and missing pages have none. Themes with other list routes pass their own `titles`. |
| f parseSearchQuery | `#guides setup` searches notes tagged `guides` for "setup". |
| f readAuth | |
| f readingTime | `N min read`, rounded up, at least one minute. |
| f readLinks | A `{ Label: 'url' }` map from user config as ordered links; non-string URLs are dropped. |
| f readModel | A schema page: `model: { name: Pet, schema: {…} }`. |
| f readReferencePage | The page's data as `renderer` reads it from the page's frontmatter. Throws a `ReferencePageError` with the reason when the metadata isn't a valid page; the shell adds the page's path. |
| f readSchema | A frontmatter schema, normalized. `null` never stands alone in a union: a `null` type or alternative marks the schema `nullable`, and a union left with one alternative becomes that alternative. `type: [string, number]` reads as `anyOf` its types. |
| f readSources | The page's `source`: a URL, `{ label, href }`, or a list of either. |
| f referenceContext | What a reference renderer's components receive, worked out from the shell: every schema page by name, for `$ref`s. |
| f referenceExtension | A reference theme as a theme-minimal extension: the reference frame and top bar, these renderers, and reference chrome. Guides get minimal's page head and contents; pages a renderer claims get its page and examples. |
| f referenceRenderer | A reference renderer as a theme-minimal page renderer: it claims the pages whose `operation.protocol` (or `model`) names it, renders through `ReferenceBody` and `ReferenceExamples`, and lists with its badge. The same renderer always adapts to the same object, so a renderer two themes share (the schema renderer) stays one claim. |
| f rendererIdOf | The renderer id a page's metadata names, or `undefined` for a guide. An `operation` without a protocol is REST, as in the API theme's first release. |
| f resolveCallout | Resolve an author-written callout type (`[!faq]`, `[!my-idea]`) to its canonical type, styling, and title. Unknown types render as notes but keep their own title. |
| f schemaLabel | How a schema reads in one line: `string (uuid)`, `Pet[]`, `"a" | "b"`, `map of string`. |
| f setColorMode | Pin a mode on <html>, remember it, and tell listeners (comments, graphs). |
| f slugToHref | |
| f sourceLabel | A short label for a source URL. A GitHub or GitLab file link reads as its path and line (`src/mcp/tools.ts:23`); any other URL keeps its host and path. |
| f svartzSocialImage | The 1200×630 social preview shared by first-party themes. |
| f svartzSyntax | The syntax plugin for a first-party theme's `pluginPreset`. |
| f tagHrefFor | The URL of a tag's page, including the mount path, for tags the index knows or not. |
| f themeSettings | Read the vault's `theme` settings. They come from user config, so every field is checked; anything malformed is ignored rather than rendered. |
| f themeTokenCss | The CSS for `theme.tokens`, or nothing when there are none. The selector is `html:root` so it outranks the `:root` rules in the Svartz defaults and in every theme. Names and values that could escape the rule are dropped. |
| f titleFromSlugSegment | |
| f topLevelSections | Notes grouped by top-level folder, in first-seen order, without the home note. A folder note (`guides/index.md`) links its section instead of listing in it; a folder with only its note is an empty section. |
| f wikilinkSegments | Frontmatter isn't run through the Markdown pipeline, so values like `Home: "[[Vessa]], Lower Wards"` keep raw `[[links]]`. Split such a value into text and linked segments, resolving targets against published notes by title, file name, or slug. Unresolved links become plain text. |