Skip to content
Svartz v2.6.0

Reference

746 exported symbols.

Classes

c CommitsUnavailableGitHub can't be asked right now: the shared pause holds, this reader's requests are spent, or GitHub failed.
c ConfigDecodeFailed
c ConfigImportFailed
c ConfigNotFound
c PluginAggregateError
c PluginHookError
c PluginValidationError
c ProtectedSessionKeep decrypted group data and non-exportable keys only for this page session.
c ProtectionAuthenticationError
c ProtectionFormatError
c ReferencePageError
c ThemeSelectionError
c ThemeValidationError
c VaultBuildRootConflict
c VaultBuildRootResolutionFailed
c VaultIdConflict
c VaultIdNotFound
c VaultMountConflict
c VaultPathInvalid
c VaultPluginInvalidA plugin's `forVault` refused the site, such as an `auth` whose `callbackVault` names no vault with auth.

Interfaces

i AccountA person on the site: one account, however many providers they sign in with.
i AccountStandingAn account as a page about it shows it: who it is, its user page and its reputation.
i AgreementSomeone who agreed with a comment with **+1**.
i AnchorHow a passage is found again: its quote, the text around it, and where it last was.
i AnnotationsOptionsThe `annotations` plugin's options.
i AnnotationsServerOptionsWhat the server module receives: the options with every default filled in.
i ApiDocsThemeConfigThe vault's `theme` settings for API docs.
i ApiParameter
i ApiResponse
i Artifact
i AssetRecord
i AttachOptions
i AuditEntryOne change, as the log keeps it.
i AuditLogPage
i AuditQueryWhich entries `readAuditLog` answers.
i AuditRecordAn entry as `readAuditLog` answers it. Every string is as its writer stored it: escape it to show it.
i AuthOptionsThe `auth` plugin's options.
i AuthServerDataWhat the plugin's build hook records for the server module.
i AuthServerOptionsWhat the server module receives: the options, plus where sign-in runs when another vault runs it.
i BlogThemeConfigThe vault's `theme` settings for the blog: minimal's, plus header links.
i Breadcrumb
i BrowserOptionsWhat the browser script receives: where history pages are, and which pages have one.
i BrowserOptionsSettings the browser script receives.
i BrowserResourceBrowser import contributed by an active content plugin. Script modules export `mount(pathname)` and return an optional disposer.
i BrowserScriptContextWhere the site is served, for scripts that build URLs, such as a server plugin's `<base>/_svartz/<id>/`.
i BrowserScriptLoader
i BrowserScriptModuleLifecycle contract for a script contributed by a content plugin.
i BuildDataWhat the build tells the server about the vault.
i BuildDataWhat the build records for the server: never sent to the browser.
i ChangeEvent
i CitationOptions
i CodeTabOne tab of a `CodePanel`.
i CommentsSettingsGiscus settings a theme passes to `Comments`.
i CommitA commit on the content branch.
i CommitReaderReads one request's worth of commits. Make one per request with `commitReader`.
i CommitSourceWhat reading a vault's commits takes: JSON, for the reader's server data. Holds no secret, only where they are.
i CompiledNoteVersionWhat `compileNoteVersion` answers.
i CompilerContributionsCompiler steps and browser imports collected afresh for each pipeline run.
i CompositionA composed site's themes: the first styles the site; all of them render pages.
i ContentComponentPropsProps passed to a content override after Markdown plugins finish parsing.
i ContentViewHTML shown through a page's content components, from `BrowserScriptContext.mountContent`.
i DashboardContributionWhat a plugin adds to the dashboard: a heading for its panels, and the panels.
i DashboardPanelA tool or settings screen a plugin adds to the site's dashboard, at `/-/dashboard/<plugin id>/<panel id>/`. The dashboard shows it only to viewers who hold `permission` on the vault, and checks that again on every render.
i DashboardSectionOne plugin's panels, as `ServerContext.dashboard` lists them.
i DefaultThemeOverrideHintsDefault Tailwind theme override keys for better tab completion / IntelliSense when customizing theme. Schema validation accepts any Tailwind theme keys; this type hints the common ones. Theme packages (e.g. @svartz/theme-minimal) can export their own override type for even better hints. To narrow the `theme` property, add a JSDoc
i DestinationResponse`GET <endpoint>/destination/?folder=<folder>&title=<title>` answers this for a new page.
i DocsThemeConfigThe vault's `theme` settings for package docs. `routes.folders: "api"` reads well for module pages.
i DocSymbolThe `symbol` frontmatter schema: one exported symbol per note, written by hand or generated from types. Signatures, types, `extends`, `implements`, and defaults may use `[[Name]]` or `[[path/to/Name|Name]]` to link to other symbols.
i EditRequest`POST <endpoint>/edit/` takes this JSON body.
i EnvReferenceNames a server environment variable in place of an inlined secret.
i ErrorResponseEvery failure answers with this JSON body; `message` is written for the reader.
i ExplorerItemHow a page lists in the explorer when a theme renders it specially: a fixed-width badge beside a monospace label.
i ExplorerNode
i FolderIndexEntry
i FolderLayout
i FolderSection
i FramePropsA frame lays out the regions; minimal's is three columns.
i GraphqlOperation
i GraphTargetRich graph node for UI consumers (projection of Index).
i HookExecutionResult
i HostDiscoveryVaultPublished vault data used by an opt-in host feed or sitemap.
i HostFeedOptions
i HostNoteOptionsA note in a host app's vault, which locates its annotations without spelling out the route or key.
i HostStyleManifestGenerated runtime entry points and the CSS manifest for one host vault.
i IdentityWho is signed in. Nothing else about the account is kept, and provider tokens never outlive the callback.
i IdentityGrantA grant a plugin's config gives an identity, such as a moderator it lists, to move onto that identity's account.
i IndexCanonical index artifact produced by `core:index`. Single source of truth for search, backlinks, and graph projections.
i IndexEntry
i IndexLink
i InfoboxThe `infobox` frontmatter schema. Plugins that generate wiki pages emit this shape.
i InfoboxSection
i JsonRpcErrorA JSON-RPC error: the server rejected the request, so there is no tool result.
i LinkSegment
i LinksResponse`GET <endpoint>/links/` answers this: the published notes, never password-protected or hidden ones, and the attachments the site publishes.
i LinkTargetA published note a wikilink can name. The Split preview resolves links to it by `slug`, `path` and `aliases`, as the build does, and links them to `href`.
i LogoSettingsThe site's mark beside its title. `dark` replaces `src` in dark mode; `alt` is empty because the title names the site.
i McpDocsThemeConfigThe vault's `theme` settings for MCP docs.
i McpToolAn MCP tool page, from `operation` metadata with `protocol: mcp`.
i McpToolAnnotationsBehaviour hints a server declares for a tool. They describe the tool; a client can't rely on them for safety, since any server can claim them.
i McpToolExampleOne `tools/call` example: the arguments, and the result or JSON-RPC error that came back.
i McpToolResultA `tools/call` result. `isError` marks a tool that ran and failed; the call itself succeeded.
i MinimalRouteConfigRoute prefix configuration: keys become URL path segments.
i MinimalThemeConfigThe vault's `theme` settings for minimal.
i ModerationOptionsThe `moderation` plugin's options.
i ModerationServerOptionsWhat the server module receives: the options with every default filled in.
i MountOptionsWhat the plugin's browser resource receives from the build.
i NewPageRequest`POST <endpoint>/new/` takes this JSON body. The server derives the file path from `folder` and `title`.
i NormalizedSvartzPlugin
i OxHugoOptions
i PageChoiceThe theme that renders a page, and the renderer and data when one of its renderers claimed the page. Plain notes in the primary theme have no choice.
i PageContextPer-request facilities handed to a plugin's page renderer.
i PageRendererRenders one kind of page, chosen from the page's frontmatter: an endpoint from `operation`, a symbol from `symbol`, a wiki article from `infobox`.
i PermissionDeclarationA permission a plugin checks with `can()` from `@svartz/auth/server`. `defaults` are the site-wide grants to the built-in actors (`guest` is everyone, `signed-in` everyone with an account) until a stored grant says otherwise.
i PluginContext
i PluginPageA plugin page's content. The theme shell renders `html` as the page body, under its header and beside its explorer.
i PostMetaPost frontmatter. Everything is optional:
i PresentationOptions
i PreviewNoteA published note a preview's links can name.
i PreviewOptions
i ProcessedFileA file passing through the plugin pipeline.
i ProtectedEnvelope
i ProtectedGroupPayloadBrowser session state for independently unlocked password groups.
i ProviderOptionsOne provider's OAuth app. The secret is named by environment variable, never inlined.
i PublicProfileA person's public profile, as their handle reaches it.
i RateLimitOptions
i RawLinkA link extracted from markdown before resolution. Mirrors vault's LinkMatch — kept Effect-free for plugin authors.
i ReactionOne of the site's drawn reactions.
i ReadingStopA stop in reading order: a folder's page, or a note.
i ReferenceAuthHow a page authenticates: `auth: bearer`, or `auth: { scheme, description, scopes }`.
i ReferenceBadgeA fixed-width kind badge: an HTTP method, a GraphQL kind, `TOOL`, `SCHEMA`.
i ReferenceContextWhat every renderer component receives besides its page data.
i ReferenceExamplesProps
i ReferenceNavItemHow a page lists in the sidebar and on listing pages.
i ReferencePageProps
i ReferencePageRendererA page renderer that wraps a reference renderer; its shape is theme-minimal's `PageRenderer`.
i ReferenceRendererRenders one kind of reference page. A page picks its renderer with explicit metadata: `operation.protocol: <id>`, or a `model` block for the `schema` renderer. Pages with neither are guides.
i ReferenceRouteConfigRoute prefixes. The pipeline reads the same keys.
i ReferenceShellThe part of theme-minimal's shell state reference pages read.
i ReferenceShellProps
i ReferenceSourceWhere a page's subject is defined: a source file or line.
i ReferenceThemeConfigThe vault's `theme` settings every reference theme reads. Renderers read their own keys too.
i ReferenceThemeIdentityWho a reference theme is.
i RegionProps
i RendererProps
i ReportedCommentA comment as a report about it shows it to moderators, hidden or not.
i ReportRequest`POST <endpoint>/reports/` takes this JSON body and answers 201 with `{ report: { id } }`.
i ResolvedBuildConfig
i ResolvedCallout
i ResolvedConfigCanonical single-vault build config consumed by the runner and @svartz/vite.
i ResolvedConfigSetInternal multi-vault resolved config set used by config resolution helpers. Defaults are merged into each vault, while build defaults remain available here.
i ResolvedDiscoveryConfig
i ResolvedFrontmatterConfig
i ResolvedSiteConfig
i ResolvedThemeConfig
i ResolvedVaultDefaults
i RestOperation
i RestoreOne page's content to commit back.
i RestorerCommits for one request. Make one per request with `restorer`.
i ReversalTaking back what an `edit` or `page` event earned, when the content it scored for is undone.
i RoamOptions
i RouteHolderThe page holding a route: its slug, which permissions are checked on, and its URL below the deployment base, `null` when hidden.
i RouteIndex
i RunnerResult
i RuntimeRouteInput
i RuntimeRouteMatch
i SavedEditsThe edits a vault's site saved among those asked about, each with the id of the account that saved it, or `null`.
i SchemaNodeThe JSON Schema subset reference pages render. `$ref` names a schema page (`$ref: Pet`); `#/components/schemas/Pet` and `#/$defs/Pet` also name `Pet`.
i SchemaProperty
i SearchDocument
i SearchDocumentA published note as the artifact producer stores it for search.
i SearchHit
i ServerContextPer-request facilities handed to a server plugin's handler.
i ServerHandleEventThe parts of SvelteKit's `RequestEvent` the router reads.
i ServerHandleRuntimeRuntime inputs SvelteKit supplies to the generated registry.
i ServerModuleWhat a server factory builds when it renders pages or panels: its request handler, its page renderer and its panels.
i ServerModuleSpecA plugin's server module and the JSON options its factory receives.
i ServerRegistryWhat a build knows about its server plugins; `virtual:svartz/server` exports one per vault.
i ServerRouteOne active server plugin in a generated registry.
i ServerVaultSettingsPublic settings of the vault a server plugin belongs to.
i SettingsLink
i ShellStateEverything minimal works out once per page and hands to every region, so a theme that swaps a region keeps minimal's behaviour.
i SignInConfigWhat the dialog needs from the vault's `auth` config.
i SignInProvider
i SiteVaultsEvery vault in the config, and the one a `SvartzPlugin.forVault` call resolves the plugin for.
i SocialImageMetadataPublic metadata a theme may place on a generated social preview.
i SocketMessageOne kind of WebSocket message, by who sends it: the client (`send`) or the server (`receive`).
i SourceResponse`GET <endpoint>/source/?page=<href>` answers this.
i StandingWhere an account stands: its score, and the next threshold whose role it doesn't hold, if any.
i SubmissionsOptions
i SuspendedAccountA suspended account, as a list of them shows it.
i SuspensionWhy an account is suspended, and until when; read by the account itself and by moderators.
i SuspensionSubjectAn account as a moderator about to act on it sees it.
i SvartzPlugin
i SvartzServerServes a vault's server plugins: SvelteKit's `handle`, and the `load` of the route that renders plugin pages.
i SvartzTheme
i SvartzViteContext
i SvartzVitePluginOptions
i SymbolMember
i SymbolParameter
i TagIndexEntry
i TargetConfig
i TextSegment
i ThemeArtifactRequirementsDeclares which pipeline artifacts the theme needs. `search` and `toc` are derived from the canonical `index` — not independent.
i ThemeBuildExtensionThe Node-safe part of an extension, for the build: no components.
i ThemeChromeMinimal's optional furniture.
i ThemeComponentRegistryNamed component entries the theme provides for the runner/shell. All entries are optional; custom components extend via the index signature.
i ThemeExtensionWhat a theme adds to theme-minimal. Everything is optional: minimal itself is the empty extension. In a composition the first extension's frame, regions, list pages, and chrome style the site; every extension's renderers render pages.
i ThemeIdentityWho a composed theme is. Defaults to the first extension's identity.
i ThemeLayoutMapMaps named layout slots to component loaders. Required: `defaultPage` and `notePage`. Custom slots are extensible via the index signature.
i ThemePagePropsProps every theme layout and page component receives from the Svartz runtime (`SvartzVaultPage`). Layouts also get `children`; pages also get `contentComponents`. Prefer `vault`: its URLs include the deployment base.
i ThemePluginPresetPlugins the theme ships with. Merged into the pipeline using standard plugin merge semantics: replace by id if existing, append if new.
i ThemeRenderCapabilitiesDeclarative flags indicating what the theme can render.
i ThemeRouteDefinition
i ThemeRouteMatchThe route the runtime matched for this page.
i ThemeSettingsSettings every first-party theme reads from the vault's `theme` config.
i ThresholdA threshold: reaching `score` gives the account `role`.
i TocEntry
i TurnstileOptionsThe submission guard. Every submission passes a rate limit, keyed by the signed-in identity or else the client's IP, and is refused when it has neither. When sign-in is required, anonymous submissions are refused; otherwise, when Turnstile is configured, they must also carry a token Cloudflare verifies. Runs before any GitHub call.
i UiFolderEntry
i UiIndexEntry
i UiTagEntry
i UserPageLocationWhere user pages live: a folder of one vault. Without a `vault`, no page is a user page.
i VaultNoteView
i VaultRecordsWhere a vault's sync keeps its records: the D1 binding, the repository, and the vault's folder in it.
i VaultViewPublished, vault-scoped data for SvelteKit loaders and theme components.
i WebSocketOperationA WebSocket endpoint: the upgrade request's parameters and responses, then the messages over the open socket.

Types

t AnalyticsConfigPublic analytics settings shipped to the browser only when selected by a consumer.
t AnalyticsConfig
t AnnotationA comment or reaction on a passage, as `GET <mount>/_svartz/annotations/?page=` lists it.
t ApiOperationThe `operation` frontmatter schema, one endpoint or GraphQL field per note. An OpenAPI or GraphQL SDL plugin emits this shape.
t ArtifactBag
t BadgeHueA signal hue from the design tokens (`--sv-hue-<name>`), or `neutral`.
t CalloutType
t ColorMode
t ConfigError
t ContentComponentOverrides
t ContentComponents
t ContentComponentSlot
t ContentSlotWhich content slot (callout, code block, image, link, embed) renders each element of a note's HTML tree, the props that slot's component receives, and the attributes that survive sanitizing. The build compiles notes with it (`compileContent`), and `@svartz/ui` renders a preview in the browser with it, so both treat a tree the same way.
t CorePluginId
t CredentialsExactly one kind of GitHub credentials: a token, or a GitHub App.
t CustomDomainRoute
t DateSource
t DestinationWhere a save goes for the reader asking: `commit` straight to the branch, so it goes live with the next deploy, or `pull-request`, for review. `null` when they can't save there as they are now, such as a guest who must sign in.
t DevBindingsWhat `svartz dev` stores in `DEV_BINDINGS`: resolves the bindings, vars and `.dev.vars` of the app's Wrangler config.
t DiscoveryConfig
t EditResponse
t FileAtThe content at a commit, or why there is none to show.
t FrontmatterFields
t Graph
t HistoryOptionsHow a vault's history is read.
t HookOptions
t LiftResultWhat `liftSuspension` did.
t LinkKind
t LinkResolutionStrategy
t LinkResolutionStrategy
t ListPageNameThe list pages a theme can provide; each receives the usual page props.
t MaybePromise
t McpContentBlockOne MCP content block, as the server sends it: `text`, `image`, `audio`, `resource_link`, or `resource`.
t ModeWhich saves may commit. `permission` commits for whoever holds `submissions:commits:write` on the page and opens a pull request for the rest; `commit` refuses the rest instead; `pull-request` never commits.
t PageRendererRenders a GET of one of the plugin's pages; `undefined` answers 404. Pages render on every request and are never prerendered or cached. Forms on them post to the plugin's `/_svartz/<id>/` routes, which redirect back.
t PageResultWhat a page renderer answers: the page, or a same-site path to send the reader to instead.
t PermissionActionWhat a permission lets someone do.
t PermissionSlug`namespace:feature:action`, where the namespace is the declaring plugin's id: `annotations:comments:delete`.
t PermissionTargetWhat a check is about: the whole site (`{}`), a vault, or a page of one, by its slug.
t PluginChangeHook
t PluginChangeHookInput
t PluginError
t PluginFactory
t PluginHook
t PluginHookInput
t ProviderIdThe sign-in providers `@svartz/auth` supports. Adding one extends `ProviderId`, adds its entry here and its mark in `marks.ts`.
t RecipientWho an entry credits: an account by its id, or the account a provider account (`github:583231`) is linked to.
t ReferenceHueA signal hue from the design tokens (`--sv-hue-<name>`), or `neutral` for kinds that aren't calls.
t RegionName
t ReputationEventAn event that earns points, as a plugin posts it. `ref` names the event, unique within its kind and prefixed with the posting plugin's id (`submissions:…`): posting the same event again changes nothing.
t ResolvedConfigCanonical single-vault resolved build config re-exported from @svartz/core.
t ResolvedSvartzConfigCompatibility alias for code that still refers to the multi-vault bundle.
t ResolvedSvartzVirtualModuleId
t ResolvedVaultConfigCompatibility alias for code that still refers to a resolved vault.
t RestoredWhat `Restorer.restore` did: committed, or why not. `unchanged` when the branch already held the content, `changed` when its file isn't the one the caller read, `protected` when a rule for the branch refuses the commit, `busy` when the branch moved on meanwhile. Only `commit` moved the branch.
t RouteClaimsThe routes the last build allocated, which a note's frontmatter can claim: JSON, for server data.
t RunnerPlugin
t SearchOptions
t ServerHandlerAnswers a request under the plugin's prefix. `undefined` answers 404.
t ServerModuleFactoryA server module's default export: builds the handler once from the plugin's options and the build data its hooks set in `getCompilerContributions(ctx).serverData` (`undefined` when they set none). A plugin with `pages` answers `{ handle, page }`.
t ServerOptionsThe plugin's server options, as written into the server bundle.
t SignedOutReasonWhy `readSignIn` found no account.
t SignInThe signed-in account, or `null` and the reason there is none; for a suspended account, why and until when.
t SiteActions
t SiteConfig
t SlideAction
t StageName
t SuspendResultWhat `suspend` did: suspended the account, or nothing, because no account has the handle, it's an admin, or it's the actor's.
t SvartzConfig
t SvartzDefaults
t SvartzVirtualModuleId
t SymbolKind
t TailwindThemeConfig
t TargetConfig
t TargetKind
t ThemeComponentLoaderReference to a Svelte component — sync or lazy.
t ThemeError
t ThemeFactory
t ThemeImportWhat `virtual:svartz/theme` imports: one theme module, or several and the `composeThemes` entry that composes them.
t ThemeModule
t ThemeRequiredFeature
t ThemeSourcesLocal theme ids mapped to their source manifests (`src/lib/index.ts`), so dev loads unbuilt themes. The CLI passes it as JSON in `SVARTZ_THEME_SOURCES`.
t ThemeTokensThe vault's `theme.tokens`: any design token by name, with or without the `--sv-` prefix (`accent`, `paper`, `radius-m`, `--sv-font-sans`). Config wins over the theme's own tokens, which win over the Svartz defaults.
t ThemeTokenValueA token value for both colour schemes, or one per scheme.
t VaultConfig
t VaultOptions
t VaultThemeConfig
t WranglerAssets
t WranglerBuild
t WranglerConfig
t WranglerConfigFields
t WranglerEnvRecord
t WranglerLimits
t WranglerObservability
t WranglerPlacement
t WranglerRoute
t WranglerTriggers
t ZoneIdRoute
t ZoneNameRoute

Functions

f activeContentSlotThe slot that renders `element` inside a tree, where `insideCode` says an ancestor is a code block's figure: the figure's own `<pre>` belongs to it, not to a slot of its own.
f allocateRoutesPluginAssign final page slugs after publication, before links consume them.
f alternateNames
f alternateRoutesThe routes a note's alternate names ask to redirect from, below the vault's mount: `aliases: [Old Name]` asks for `old-name`. `allocateRedirects` grants those still free.
f analyticsContribute one browser tracker only when a vault selects an analytics provider.
f annotationsThe `annotations` plugin: its routes on the server, and in the browser a script that attaches to every note body a theme marks with `data-svartz-note`, as theme-minimal and every theme extending it do.
f assertNoNotesUnderPagesA page name owns `<mount>/-/<name>/` and everything below it, so a published note there would be shadowed at runtime: fail the build naming it. Notes elsewhere under `<mount>/-/` stay notes. `routes` are the vault's published routes, mount path included.
f assertRequiredStages
f assertServerPluginsA server plugin needs a server target (or a host app whose adapter isn't `adapter-static`), a path-segment id, an importable module and JSON options. `hostAdapter` is the host's `kit.adapter.name`.
f assetHrefThe 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 attachShow the annotations stored for `page` beside `content`, the note's body element. Returns `detach`, which removes every marker, card, highlight and list it added. Comments whose passage is no longer in the note are listed after it.
f auditAppend `entry` to the audit log. Pass the change itself as `changes`, statements prepared on the same `SVARTZ_DB` binding: they and the entry run as one transaction, so neither lands without the other. For a change kept elsewhere, call this first and make the change only once it resolves. Throws when the site binds no `SVARTZ_DB`, or the write fails.
f auditIfChangedThe statement that appends `entry` only when the statement just before it in the batch changed a row, for a change whose own guard may leave it undone. Its results hold the entry's id when it appended one, and nothing otherwise, so the batch's last result says whether the change happened.
f authThe `auth` plugin: sign-in routes on the server and the sign-in dialog in the browser.
f authLabel`Bearer token`, `None`, or the scheme as written.
f buildBreadcrumbsHome, 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 buildExplorerTreeThe 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 canWhether `account` (`null` for a guest) may do `permission` on `target`: the site (`{}`), a vault (`{ vault }`), or a page of one (`{ vault, page }`, by the page's slug). Grants on the page, its folders, its vault and the site apply, the most specific first; see `resolve` in `permissions.ts` for the order.
f canEach`can` for each of `targets`, in order, in the D1 calls one check makes: for a list that asks about many pages at once, such as a queue of comments on different pages.
f changedFilesThe vault files each of `commits` (SHAs) changed, as vault paths, for those the mirror of the vault `records` describes holds with their files. In one query; none when the binding is missing.
f choosePageThe theme and renderer for a page. The page's own `theme:` wins, then the nearest folder note's (`folderNotes`, nearest first), then whichever renderer detects the page from its frontmatter. A page none of that picks is a plain note in the primary theme, and gets `undefined`.
f citationsResolve bibliography paths from the vault, independent of the host process cwd.
f classifyLinkClassify a link in rendered note content. Internal links get previews and the internal style; files, heading anchors, and footnote links stay quiet.
f clearPublicAssetsForget every recorded file. The CLI calls this before each build, so one vault's files never ship in the next's.
f commitAttributionThe account a commit is authored as, with its linked GitHub account as co-author, and the App's bot that commits it.
f commitReaderReads commits for one vault. The answer makes a `CommitReader` per request; installation tokens and file contents are kept across requests in this worker. Pass `token` to share one `sourceToken` with a writer.
f commitSourceWhat reading the vault's commits takes, or `undefined` when no submissions plugin keeps its mirror. Call it from `emitArtifacts` with `enforce: "post"`: the vault's folder in the repository is what the submissions plugin's own `emitArtifacts` read from git.
f compileNoteVersionCompiles `markdown`, a version of the published note `note` that sat at `path` in the vault, as the build compiles the note: run `ctx.plugins`' `parseFrontmatter` stage on it alone, then their link, OFM and embed stages on it among the notes and attachments the build publishes, embedding them from the build's own sources, then compile it with the build's compiler steps and any its own content alone needs. The version takes the note's place and route, and links resolve as they do from the note now.
f compileProtectedNoteSourceCompile a protected note in memory for the separate encrypted bundle.
f composeThemesA runtime manifest that composes themes on minimal's shell. The first theme styles the site; each page renders with the theme that claims it.
f composeThemesThe build manifest for themes composed on minimal: minimal's routes with each theme's build plugins.
f compositionOfThe composition a runtime manifest carries; minimal alone for any other manifest.
f containsCodeWhether `element`'s descendants are inside a code block, given whether `element` is.
f contentPropsThe props `slot`'s component gets for `element`, besides its children.
f contentSlotThe slot that renders `element`, or `undefined` for plain markup.
f count`1 note`, `3 notes`.
f createArtifactsVirtualModuleSource
f createCorePluginsCreate the canonical ordered set of core plugins. Returned array matches the pipeline execution order.
f createHostIndexSource`virtual:svartz/index`: each vault's published index and site metadata, in config order. It imports no page runtime or theme, not even dynamically, so a host that only reads the index never compiles Svartz's page runtime.
f createHostRegistrySource`virtual:svartz/host`: the host eagerly reads route metadata and loads runtime code only for the selected mount. It also exports SvelteKit's `base` and `assets`, which SvelteKit 3's `$app/paths` no longer does.
f createHostServerSource`virtual:svartz/server` in a host app: `svartzHandle` runs every host vault's generated handle in turn, and `svartzPage` asks each vault for the plugin page at a URL.
f createProtectionSaltGenerate a fresh salt once per password group and build.
f createSearchBuild 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 createServerBuild a vault's `SvartzServer`. Each factory runs once: on its plugin's first request or page, or for an `eager` plugin before the handle answers its first request of any kind.
f createServerHandleThe SvelteKit `handle` of `createServer`, for apps that render no plugin pages.
f createServerRegistrySourceThe vault's server-only module: its active server plugins as a registry; `svartzHandle`, the SvelteKit `handle` that routes `/_svartz/<id>/` to them; and `svartzPage`, which renders their pages under `/-/` for the plugin page route's `load`. `virtual:svartz/server` is this module in the standalone shell; host apps get one that chains every vault's. Its env imports keep it out of client bundles. `serverData` is what each plugin's hooks recorded for its server module this build, keyed by plugin id.
f createSvartzViteContext
f createThemeVirtualModuleSourceGenerates the `virtual:svartz/theme` module source.
f createVaultChangeEvent
f createVaultEntryViewApply the deployment base to one published entry, including a newly unlocked hidden note.
f createVaultViewCompose SvelteKit's deployment base with the index's vault-mounted URLs once.
f currentColorModeThe mode the page currently renders in.
f decodeRoutePathDecode a percent-encoded URL pathname once; preserve slashes and return undefined for malformed escapes.
f defaultNode-safe manifest used by the build pipeline.
f defaultNode-safe manifest used by the build pipeline.
f defaultNode-safe manifest used by the build pipeline.
f defaultNode-safe manifest used by the build pipeline.
f defaultNode-safe manifest used by the build pipeline.
f defaultNode-safe manifest used by the build pipeline.
f defineConfig
f definePageRendererKeeps a renderer's data type flowing from `detect` to its components.
f definePluginWrap a plugin factory with runtime validation and hook normalization. The returned factory produces normalized plugins ready for the runner.
f defineRendererKeeps a renderer's data type flowing from `read` to `nav`, `page`, and `examples`.
f defineThemeDefine a theme with runtime validation. Accepts either a static theme object or a factory function. Returns a callable factory that validates the manifest on each invocation.
f deriveProtectionKeyDerive a non-exportable session key from a password and the group's public salt.
f discoverFilescore:discover-files — traverse vault directory, read file contents, assign slugs.
f emitArtifacts
f emitDiscovery
f emitImages
f exampleFromSchemaA representative value: the schema's example, then its default, its first enum value, then a placeholder by type.
f excerptAbout `words` words of `content`, centred on the first matched term.
f executeHandleChange
f executeStage
f extractFrontmatterMarkdown parsing utilities — ported from @svartz/vault parse.ts. Kept Effect-free for plugin authors.
f fetchPreviewCloned 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 filterUnpublished
f findCommentComment `id` of `vault`, hidden or not, from the annotations stored in the D1 binding named `database`: what the moderation plugin shows beside a report about it. `undefined` when there's no such comment, or no such binding.
f findComments`findComment` for each of `ids` in one query, by id, for a list of reports: ids with no such comment are absent, and so is every id when there's no such binding.
f findProfileThe public profile of the account that holds or held `handle`, under its current handle; `undefined` when no account ever held it or the site binds no `SVARTZ_DB`. A result whose `handle` differs from the one asked for means the asked one is old: redirect to the current one. Old handles never pass to another account.
f findProfileByIdentityThe public profile of the account provider account `identity` (such as `github:583231`) is linked to, for a plugin that stored who wrote something by their sign-in; `undefined` when no account has it or the site binds no `SVARTZ_DB`.
f findProfilesThe public profiles of the accounts with ids `ids`, by id, for plugins that stored an account id, such as a commit's `Svartz-Account` trailer. Ids no account has are absent, and so is every id when the site binds no `SVARTZ_DB`.
f findProfilesByHandle`findProfile` for each of `handles` in one D1 call, by the handle asked for; handles no account ever held are absent, and so is every one when the site binds no `SVARTZ_DB`.
f findProfilesByIdentity`findProfileByIdentity` for each of `identities` in one D1 call, by identity; identities no account has are absent.
f findStandingThe account that holds or held `handle`, under its current handle, with its user page and reputation; `undefined` when no account ever held it or the site binds no `SVARTZ_DB`.
f findSuspensionThe account that holds or held `handle`, for a moderator about to suspend it or lift its suspension; `undefined` when no account ever held it or the site binds no `SVARTZ_DB`.
f folderBreadcrumbsHome, then each folder down to `folder` (a folder page's trail).
f folderContentsEvery 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 folderLayoutWhere 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 folderThemeThe theme that lists a folder's page: the folder note's `theme:`, then its ancestors' (`folderNotes`, nearest first), then the primary theme.
f formatDateFormat a note date as `Sep 4, 2026`. Dates are calendar days, so format in UTC.
f formatReputation`score` as the badge shows it: whole points, grouped (`1,234`), and shortened past ten thousand (`12.3K`).
f getCompilerContributions
f getGeneratedArtifactsRoot
f getGeneratedHostIndexPath
f getGeneratedHostRegistryPath
f getGeneratedHostServerPath
f getGeneratedHostStylesPathUse a fixed-length lowercase digest so every valid ID fits a filesystem filename.
f getGeneratedIndexModulePath
f getGeneratedPageModulePath
f getGeneratedPagesRoot
f getGeneratedRuntimeArtifactsModulePath
f getGeneratedRuntimeServerModulePath
f getGeneratedRuntimeThemeModulePath
f getGeneratedSearchModulePath
f getPackageVersionGet the `version` from a package.json. Accepts either: - A module URL (e.g. `import.meta.url`): finds the package.json for that module's package by walking up from the file. - A path to package.json (e.g. `resolve(__dirname, "../package.json")`): reads that file directly.
f getThemePresetPlugins
f getVault
f getVaultBuildRoot
f groupAtBreaksSplit nodes into slides at each break. The breaks go, and so do slides with only blank nodes.
f hardLineBreaksTurn prose newlines into `<br>` only when this plugin is configured.
f highlightSplit text into matched and plain runs, so results render highlights without HTML.
f historyPage history. By default, page history and Recent changes as plugin pages, and a History action on every published Markdown page. With `source: "git"`, prerendered previous versions of the notes that ask for them, on any target.
f hostStylesPluginCapture CSS from SvelteKit's client build without importing every vault runtime eagerly.
f indexContentcore:index — single canonical index artifact producer.
f isNote
f isoDateISO date for `<time datetime>`.
f isPluginEnabled
f isRecord
f isSvelteKit3Whether the app in `root` installs SvelteKit 3 or later. Its options can't tell: SvelteKit 2.62 and later also take them in `sveltekit({ … })`. An app without a resolvable SvelteKit counts as SvelteKit 2, whose behaviour Svartz assumed before SvelteKit 3.
f isUnsafeElementWhether `element` is dropped, children and all.
f isVaultSubmissionWhether pull request `number` is a submission the site saved for the vault `records` describes: what that vault's `POST close/` accepts. `false` when the binding is missing. The moderation plugin asks before it offers Close.
f keepsAttachmentWhether the build may publish the attachment at `path` inside the vault: discovery reads its folder and the exclude patterns let it through. The build publishes it only once a published note references it.
f liftSuspensionEnd the suspension in force on the account that holds or held `handle` now, ahead of its time. `"not-suspended"`, recording nothing, when none is in force, as when it ended or another moderator lifted it first. Throws without `SVARTZ_DB`.
f linkedIdentitiesEvery provider account linked to `account`, the first linked first, each with the profile it last signed in with. Empty when the site binds no `SVARTZ_DB`. `env` is the handler's `context.env`.
f listSuspensionsEvery suspension in force, the most recent first; `[]` without `SVARTZ_DB`.
f listVaults
f loadConfig
f loadConfigEffectLoad, import, and parse a svartz config file. Returns the parsed SvartzConfig and the directory containing the config file.
f loadThemeModuleThe vault's build manifest. A `theme.base` list composes every listed theme's `extensions` with theme-minimal's `composeThemes`; a theme with a selected source loads unbuilt.
f loadVirtualModule
f markdownCopyForThe emitted Markdown copy of the page at a request `pathname`, if it has one. Map keys are decoded and end in a slash; request paths arrive percent-encoded, and without the slash under `trailingSlash: 'never'`.
f matchThemeRoute
f materializeThemeLoad every theme component before server rendering or hydration begins.
f mergePluginsLayered merge of plugin lists.
f mergeProtectedIndexMerge only unlocked, listed group discovery into a browser-local vault index.
f migrateGrantsGive each identity's account its grant, once ever: the first call that finds the identity linked to an account stores the grant, unless that account already holds one for the same permission and object, and records that it did. Later calls change nothing, so a grant an admin changed or removed since stays that way. Answers, per grant, whether it is in place: `false` for an identity with no account yet, which a later call can still move once they sign in, and for every grant when the site binds no `SVARTZ_DB`.
f mirrorsCommitsWhether one of a vault's `plugins` is a submissions plugin keeping the GitHub mirror. For a plugin's `forVault`.
f moderationThe `moderation` plugin: its routes and Reports panel on the server, and the Report action in the browser.
f mount
f mountBrowser resource entry, which Svartz calls after every navigation: attach to the note body marked with `data-svartz-note="<slug>"`, keyed by that slug. On a host page that is the `SvartzNoteContent` body the mount is for, so each of several notes gets its own; on a theme page, the document's. A page without one gets nothing.
f mountBrowser script entry: remember the vault's config, open the dialog from `data-svartz-sign-in` elements, and link a signed-in reader to their account and the dashboard. The build doesn't know a host app's `paths.base`, so the routes get the deployment base here, from `context`.
f mountBrowser script entry: answer `data-svartz-report` buttons, and add **Report** to a note's page actions. The build doesn't know a host app's `paths.base`, so the routes get the deployment base here, from `context`.
f mountAdds Edit to the page actions of every editable note, New page to the site actions of every page, Create your page to the account page of a reader without a user page, and Edit page to a submission in My submissions while it takes follow-up edits. The editor itself loads on first use, or at once when the reader comes back from signing in with a draft for this page. On a submission, it also keeps an unsent reply while its form posts.
f mountListen for the start key on every page; a navigation closes any open presentation.
f mountBrowser resource entry point. No tracker loads without resolved consumer config.
f mount
f mountBrowserScriptsMount active scripts and return one disposer for the current route.
f newestFirst
f normalizePathname
f normalizePluginNormalize a plugin: validate shape + convert function shorthand hooks to object form. Throws PluginValidationError on invalid plugins. Warnings emitted via console.warn for unknown keys and disabled-with-hooks.
f noteDateThe 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 notesTaggedNotes tagged `tag` or a nested tag under it (`tag/…`).
f noteStylesheetsStylesheet 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 openFolderIdsFolder ids to open so `folder` shows in the explorer: it and every folder above it.
f openProtectedPayloadAuthenticate before returning bytes. Wrong passwords and altered bytes reject.
f openSignInOpen the sign-in dialog. Each provider starts sign-in and comes back to `returnTo`, by default this page. Throws until the `auth` plugin's script has mounted, which happens on every page of a vault that enables it.
f oxHugoFlavoredMarkdownNormalize ox-hugo syntax before the required frontmatter and link parser.
f pageAtThe index's route for `path`, which a URL may percent-encode: `/caf%C3%A9/` is `/café/`, `/a%26b/` is `/a&b/`.
f pageCrumbsBreadcrumbs 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 parseConfig
f parseConfigEffectParse (validate) a raw JS object against the config schema, then check that the major version matches the config format this package reads.
f parseFrontmattercore:parse-frontmatter — extract frontmatter and raw links from each file.
f parseSearchQuery`#guides setup` searches notes tagged `guides` for "setup".
f pathRouteThe route a note's filename asks for: `people/Ada Lovelace.md` → `people/ada-lovelace`, `Guides/Guides.md` → `guides`.
f postReputationRecord `event` in the ledger, weighed with the site's weights, and give its account any role a threshold now grants. Posting an event again, as a repeated webhook delivery or a poll that reads it again would, scores nothing more, and gives any role the first post failed to give. An event whose recipient has no account changes nothing.
f presentationLet readers present any note: `plugins: [presentation()]` in `svartz.config.ts`. The browser script and stylesheet work with every theme.
f publicAssetsPluginEmit the recorded files in the client build, unless the Svartz plugin there already did.
f publishedAttachmentsThe vault attachments the site publishes, each at `<mount>/<path>`: the files public notes reference, as `core:filter-unpublished` settles them. Attachments only protected notes reference stay in their encrypted payload.
f publishesNoteWhether the build publishes a note at `path` inside the vault with `frontmatter`: discovery reads its folder, and the vault's include and exclude patterns let it through and it isn't a draft, unless a publication date publishes it anyway, and it isn't private. A published note may still be password-protected. Page history judges a note's earlier versions with it, at the paths they had then.
f readAccountThe account behind `request`, or `null` when nobody is signed in, the session was deleted or expired, the account is suspended, or the site binds no `SVARTZ_DB`. `readSignIn` says which.
f readAuditLogThe audit log, newest first, a page at a time, in one query: every plugin's entries, filtered by who made them and what they changed. Throws when the site binds no `SVARTZ_DB`. The log is append-only, so nothing here changes it.
f readAuth
f readIdentityWho sent `request`: the provider account they signed in with, or `null` when nobody is signed in or their account is suspended. `env` is the handler's `context.env`. Without a usable `PRIVATE_SVARTZ_SESSION_SECRET` nobody can be signed in, so this answers `null`; the auth routes report the missing secret with a 503. Plugins that need a person rather than a provider account use `readAccount`.
f readingTime`N min read`, rounded up, at least one minute.
f readLinksA `{ Label: 'url' }` map from user config as ordered links; non-string URLs are dropped.
f readMcpToolAn MCP tool from a page's `operation` metadata. Throws with the reason when the metadata isn't a tool.
f readModelA schema page: `model: { name: Pet, schema: {…} }`.
f readReferencePageThe 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 readSchemaA 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 readSignInThe account behind `request`, or `null` and why: signed out, no accounts database bound, or the account suspended, with the suspension's reason and end. `env` is the handler's `context.env`. A cookie from before accounts becomes an account and a session on its first read here.
f readSourcesThe page's `source`: a URL, `{ label, href }`, or a list of either.
f referenceContextWhat a reference renderer's components receive, worked out from the shell: every schema page by name, for `$ref`s.
f referenceExtensionA 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 referenceRendererA 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 rendererIdOfThe 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 renderHostRssRender a summary RSS feed for an explicit set of host vaults.
f renderHostSitemapRender a sitemap for selected mounts on the same public host.
f renderPreviewThe note's HTML, rendered from `markdown` (frontmatter and all) as the site would render its body. A URL naming one of `options.attachments`, by the build's rules, links to where the build publishes it: `<base><mount>/<vault path>`. Any other relative URL resolves from the note's page, as on the site.
f renderRevision`markdown` rendered as the note at `options.path`, ready to put in a page.
f reputationBadgeAn account's reputation as a badge to follow its name, as `reputationBadgeHtml` renders it on the server.
f reputationBadgeHtmlThe badge as HTML, to follow an account's name after a space: `<span class="sv-reputation-badge" …>1,234</span>`. A screen reader reads the score whole, and so does its tooltip.
f reputationBadgePartsThe badge's parts: what only assistive technology reads, and what everyone sees. A score shown whole reads as "Reputation 1,234"; a shortened one is read in full, "Reputation 12,500", while `12.5K` is shown.
f reputationLabelWhat the badge says to assistive technology and in its tooltip: the score in full, named.
f requestedSlugThe route a note asks for before `allocateRoutes` settles clashes: its frontmatter `slug`, else its filename's.
f resolveCalloutResolve 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 resolveConfig
f resolveConfigEffect
f resolveLinks
f resolveProtectedBridgeImportsSubstitute only generated bridge specifiers before importing decrypted JS.
f resolveRuntimePluginsMerge runtime plugins in specificity order. `config.plugins` is already the defaults→vault merge from @svartz/config. `hostAdapter` is the host app's `kit.adapter.name` when the vault targets `host`.
f resolveThemeExport
f resolveThemeModuleIdsThe theme modules a vault lists, in order.
f resolveThemePackageRootFind a package root from the host app for Vite, CLI, and Tailwind consumers.
f resolveThemeRouteToArtifactKey
f resolveThemeRuntimeImportWhat `virtual:svartz/theme` imports for this vault. A theme with a selected source imports its `runtime.ts`, or its package id, which Vite aliases to the source.
f resolveVirtualModuleId
f restorerRestores a vault's pages. Only a GitHub App commits as an account, so with a token `commits` is false and every restore throws. `token` shares a `sourceToken` with the vault's commit reader.
f reverseReputationTake back what each `edit` or `page` event `ref` earned its `account`, as one `reversal` entry per event under the same ref, all in one transaction however many there are, then give any role a threshold grants. An event is taken back once: reversing it again changes nothing. An event not posted yet still gets its entry, at 0 points, and scores nothing when it is posted; one that was posted and earned `account` nothing (it scored 0, or credited someone else) gets none. A reversal lowers a score but never takes away a role the account holds.
f roamFlavoredMarkdownAdd Roam prose syntax after the normal GFM parser.
f routeClaimsOfThe routes the vault's pages hold, hidden and protected ones included, which a page's frontmatter can claim: what `@svartz/plugin-submissions/restore` checks a restored revision against. From `emitArtifacts` with `enforce: "post"`, as `commitSource`; `undefined` without the submissions plugin.
f routeHref
f runEffect
f runLifecycleHooks
f runsCodeWhether a browser would run `url` as a script or open it as an HTML document. Before it reads a URL's scheme, a browser drops the tabs and newlines anywhere in it and the spaces and control characters in front of it.
f runStages
f safeAttributes`element`'s HTML attributes without event handlers, `srcdoc`, or script and HTML-document URLs.
f savedEditsWhich of `commits` (SHAs) and `pulls` (numbers) the site saved for the vault `records` describes, and the account behind each: whoever made the commit, or opened the pull request with its first save. `null` for a save by someone without an account. In one query; none are saved when the binding is missing.
f schemaLabelHow a schema reads in one line: `string (uuid)`, `Pet[]`, `"a" | "b"`, `map of string`.
f sealProtectedPayloadSeal one group-owned payload. The ID is authenticated, so route swaps fail.
f setColorModePin a mode on <html>, remember it, and tell listeners (comments, graphs).
f sharedAttachmentNamesFile names of published attachments that another attachment in the vault shares. The build resolves those by path only, so a resolver that sees only `publishedAttachments` needs them to resolve the same; their names are already public, and the other files' paths stay in the build.
f slideActionWhat a key does. Keys with Ctrl, Cmd, or Alt stay with the browser.
f slugToHref
f sortPluginsForStageSort normalized plugins for a specific stage by enforce tier. Within each tier, config array order is preserved (stable sort). Only returns plugins that have a hook for the given stage.
f sourceLabelA 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 sourceTokenThe token `source`'s credentials authenticate with: the configured one, or the App's installation token, kept.
f submissionsLet readers edit any published Markdown note, or add one in a published folder, as a pull request on `repo`.
f suspendSuspend the account that holds or held `handle` until `until`, or for good without it, with `reason`, which the account reads. It replaces any suspension in force. `actor` is the signed-in moderator, from `readAccount`; check their permission first. Refused without writing anything for an admin and for the actor's own account. Throws without `SVARTZ_DB`.
f svartz
f svartzSocialImageThe 1200×630 social preview shared by first-party themes.
f svartzSyntaxThe syntax plugin for a first-party theme's `pluginPreset`.
f svelteKitBasePathSvelteKit's `paths.base` alone, from the same definitions as `svelteKitPaths`.
f svelteKitPathsRead SvelteKit's paths from the definitions it puts in Vite's resolved config, the same in SvelteKit 2 and 3.
f tagHrefForThe URL of a tag's page, including the mount path, for tags the index knows or not.
f themeVite-bundled runtime manifest.
f themeVite-bundled runtime manifest.
f themeVite-bundled runtime manifest.
f themeVite-bundled runtime manifest.
f themeVite-bundled runtime manifest.
f themeVite-bundled runtime manifest. Lazy entries load before SSR and hydration.
f themeSettingsRead the vault's `theme` settings. They come from user config, so every field is checked; anything malformed is ignored rather than rendered.
f themeSourceAliasesVite aliases that point each workspace theme at its source, by exact id. A string alias also captures subpaths, so `@svartz/theme-minimal` would rewrite another listed theme's `@svartz/theme-minimal/runtime` import.
f themeTokenCssThe 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 topLevelSectionsNotes 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 transformDescription
f transformEmbeds
f transformGfmRegister GFM parsing only while this plugin is active.
f transformLatexRender public math with KaTeX and declare its stylesheet.
f transformOfm
f transformSyntaxAdd syntax highlighting for public notes with code.
f transformToccore:transform-toc — Table of Contents extraction.
f userPageLocationWhere user pages live, such as `{ vault: "notes", folder: "users" }`.
f userPageOfThe URL, below the deployment base, of the user page at `handle`; `undefined` while there is none, for a hidden one, and until the vault that holds user pages has started.
f validatePluginShapeValidate a plugin against the Effect Schema. On failure, inspects the raw input to throw PluginValidationError with message parity to the legacy manual validation path.
f validateTheme
f wasPublicWhether the build would have published a note with `markdown`'s frontmatter, unprotected: not a draft, not private, in no password group. A revision it would have hidden stays hidden, though the page is public now. Frontmatter the build couldn't read counts as hidden.
f wikilinkResolverThe note a wikilink target names from anywhere in the vault, as `core:resolve-links` resolves it, or null. A target that `closest` would settle by the linking note's folder names no note here.
f wikilinkSegmentsFrontmatter 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.
f withMarkdownNegotiationRun the shared Svartz handle ahead of the standalone adapters' static-file handlers.
f withSvartzHostPreserve virtual modules and let Svelte compile packaged components in host apps.

Variables

v ACCOUNTS_DATABASE_ENVThe D1 binding accounts live in. A fixed name, like `PRIVATE_SVARTZ_SESSION_SECRET`, because every server plugin reads accounts with only `(request, env)` in hand.
v ACTIVE_HIGHLIGHT
v ADMIN_ROLEThe role bootstrap admins hold.
v ALLOCATE_ROUTES_ID
v ANALYTICS_ID
v AnalyticsConfigSchema
v ANNOTATIONS_PLUGIN_IDThe plugin id, and so the path segment its routes answer under: `<mount>/_svartz/annotations/`.
v apiRenderersREST endpoints, WebSockets, GraphQL operations, and shared schemas.
v AUTH_PLUGIN_IDThe plugin id, and so the path segment its routes answer under: `<mount>/_svartz/auth/`.
v AuthSummary
v Backlinks
v Badge
v Breadcrumbs
v BreakAfterSlashes
v BuildOptionsSchema
v Callout
v CALLOUT_TYPESObsidian's built-in callout types. Each owns an icon and a signal hue.
v CodeBlock
v CodePanel
v COLOR_MODE_KEYlocalStorage key for the reader's explicit choice. Absent means "follow the OS".
v COLOR_MODE_SCRIPTInline `<head>` script. Pins the stored mode on <html> before first paint so dark readers never see a light flash. Without a stored mode the OS decides through `color-scheme: light dark`.
v COLOR_MODE_SCRIPT_HASHCSP source for `COLOR_MODE_SCRIPT`. A host with a Content Security Policy adds it to `script-src` so the script can run; `color-mode.test.ts` keeps it in sync.
v COLOR_MODE_TAG`COLOR_MODE_SCRIPT` as a `<script>` element. It lives here rather than in `ColorModeToggle.svelte` because Vite's dependency scanner reads any `<script>` text in a `.svelte` file as the component's script and fails.
v ColorModeToggle
v Comments
v CONTRACT_VERSIONCurrent contract version. Themes must declare a contractVersion and plugins may; `defineTheme` and plugin normalization fail one whose semver major differs from this constant.
v CORE_PLUGIN_IDS@svartz/plugins — core pipeline plugins for the Svartz build system.
v CustomDomainRouteSchemaRoute = string | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute
v default
v defaultThe `auth` server module: `server: { module, options, pages: ["account", "dashboard", "groups"] }` with `AuthOptions`.
v defaultThe `annotations` server module: `server: { module, options }` with `AnnotationsServerOptions`.
v default
v defaultThe `moderation` server module: `server: { module, options }` with `ModerationServerOptions` and the build's `BuildData`.
v default
v DEFAULT_REPORTS_PER_HOURReports each signed-in reader may send per hour unless `limits.reportsPerHour` says otherwise.
v DEFAULT_WRITES_PER_HOURWrites each signed-in reader may make per hour unless `limits.writesPerHour` says otherwise.
v DescText
v DEV_BINDINGS`globalThis` slot through which `svartz dev` hands server plugins local Cloudflare bindings. The dev server (Node) sets it to a function resolving the bindings; the router (SSR, same process) reads it per request in dev.
v DISCOVER_FILES_ID
v DiscoveryConfigSchema
v Embed
v EMIT_ARTIFACTS_ID
v EMIT_DISCOVERY_ID
v EMIT_IMAGES_ID
v EndpointBar
v explorerOpenIdsPersisted set of open folder IDs in the explorer.
v extensionsThe Node-safe extension the build composes.
v extensionsREST, GraphQL, and schema pages on theme-minimal, with the reference frame. Compose them with other themes' extensions.
v extensionsThe wiki's Node-safe extension. It adds no build plugins of its own.
v extensionsThe wiki on theme-minimal's shell: its header, rail, article head and foot, article renderer, and list pages.
v extensionsThe blog's build extension: minimal's build plugins cover it.
v extensionsThe blog on minimal's shell: a top header instead of the explorer, posts in one reading column with related posts below, and post grids for the list pages.
v extensionsThe docs theme's build extension: it renders no graph or backlinks.
v extensions
v extensionsThe Node-safe extension the build composes.
v extensionsMCP tool and schema pages on theme-minimal, with the reference frame. Compose them with other themes' extensions.
v extensionsMinimal's own extension: the base every theme extends.
v extensionsMinimal's own build extension.
v FileTrie
v FILTER_UNPUBLISHED_ID
v FnSchemaEffect Schema definitions for SvartzPlugin shape validation. Canonical source of truth for the plugin contract structure. Author-facing types remain plain TS — these schemas are internal.
v FrontmatterFieldsSchema
v GiscusConfigSchema
v GITHUB_PAGE_SIZECommits per page of GitHub's list, its most.
v GraphPanel
v graphqlRenderer`operation.protocol: graphql`: one query, mutation, or subscription field per page.
v HIGHLIGHTHighlight names, for `::highlight(…)` in a host's own CSS.
v HISTORY_ICONAdds History to the page actions of every page with a history, beside Copy page and Edit; on a user page, the account's contributions below the note; and on `/-/account/`, a link to the reader's contributions.
v HOOK_PARALLEL_DEFAULTS
v HookInputSchema
v HookObjectSchema
v HookOptionsSchema
v INDEX_CONTENT_ID
v IndexConfigSchemaWhat the published index carries beyond its defaults.
v KNOWN_PLUGIN_KEYS
v LIFT_ACTION
v Link
v LinkPreviews
v LinkResolutionStrategySchema
v MAX_FILE_BYTESFile content larger than this isn't read; a note the editor accepts is far smaller.
v MAX_GITHUB_READSGitHub requests one reader may make: what the costliest page, a diff of two revisions the mirror doesn't hold, needs. That is the default branch's name, when neither config nor the mirror knows it, then for each revision the check that the branch holds it, the commit, and the page's file at it.
v MAX_HISTORY_PAGEThe last page of a file's history readers may page back to, counting from 1: its latest 1,000 changes. Older ones are on GitHub.
v MAX_REASON_LENGTHThe longest reason a revert takes, which its commit message carries.
v mcpRenderersMCP tools and shared schemas.
v mcpToolRenderer`operation.protocol: mcp`: one MCP tool per page.
v minimalExtensionMinimal itself: the extension every composition falls back to.
v MODERATION_PLUGIN_IDThe plugin's id, and so its URL segment: `<base><mount>/_svartz/moderation/`.
v NoteHeader
v PAGE_ROUTE_SEGMENTPath segment under which plugin pages render in the theme shell: `<base><mount>/-/<page>/`.
v PageActions
v PARSE_FRONTMATTER_ID
v PasswordGroupsSchema
v PluginEntrySchemaShallow plugin placeholder; plugin interface/standard TBD.
v PluginSchema
v PREVIEW_ATTRIBUTEPage previews for link hovers and search. A theme marks the part of its page worth previewing with `data-sv-preview`; previews fetch the target URL and clone those nodes. Works for static output and SvelteKit hosts alike.
v REASON_MAX_LENGTHCharacters in a report's reason, counted in UTF-16 code units as `maxlength` counts them.
v RECENT_PAGE_SIZECommits per page of `CommitReader.recent`.
v RecentNotes
v ReferenceBody
v referenceChromeReference sites keep the page and its examples: no graph, backlinks, dates, or reader mode; a filter above the explorer.
v ReferenceExamples
v ReferenceFrame
v ReferenceSection
v ReferenceTopBar
v REPUTATION_BADGE_CLASSThe badge's class: `.sv-reputation-badge`.
v RESOLVE_LINKS_ID
v restRenderer`operation.protocol: rest` (the default): one HTTP endpoint per page.
v SCHEMA_RENDERERThe renderer id that handles `model` pages.
v schemaRendererRenders `model` pages: one shared schema per page, which operations and tools name with `$ref`. Every preset includes it; listing it twice is fine.
v SchemaTree
v SEARCH_INDEX_OPTIONSShared MiniSearch schema for artifact generation and browser search.
v SearchBox
v SearchDialog
v SECRET_ENV_NAME_PATTERNServer-only environment variable names. Client-public `PUBLIC_` and `VITE_` names are refused.
v SemverSchema
v SERVER_PLUGIN_ID_PATTERNPlugin ids that serve requests, and the page names plugins claim, double as one URL path segment.
v SERVER_ROUTE_SEGMENTPath segment under which every server plugin answers: `<base><mount>/_svartz/<plugin-id>/`.
v SiteActions
v SiteConfigSchema
v SiteLogo
v SourceLinks
v STAGE_NAMES
v SUSPEND_ACTIONThe audit log's actions for a suspension and for lifting one early.
v SVARTZ_MARK_SVGThe Svartz mark: an ink block with a vermilion proof mark. The default favicon.
v SvartzConfigSchema
v svartzContentComponentsThe shared OFM content slots, ready to spread into a theme's `components`. Pair with `prose.css` on the element that wraps the note body.
v SvartzDefaultsSchemaDefaults are vault options at top level (no nested .vault).
v SvartzNoteContentRenders one published note's body inside a host-owned page. The route's universal `load` must have awaited `prepareHostVault(pathname)` first. `stylesheets` comes from `await noteStylesheets(pathname)` in the route's server `load` (`+page.server.ts`); the helper prepares the vault itself, and only serialized server data keeps the SSR links because a universal `load` reruns in the browser where the registry is empty. For a pathname that is not a published note (or a vault that was not prepared) it renders nothing.
v SvartzPluginPage
v TableOfContents
v TailwindThemeConfigPropertyRecordSchemaGeneric theme property: map of name to value (or nested). All theme keys use this shape; extend per-key when needed (e.g. theme-minimal).
v TailwindThemeConfigSchema
v TARGET_KINDSWhat a report can be about, and how each is named: a page by its slug, a commit by its full SHA, a submission by its pull request number, an annotation by its id, and an account by its handle.
v TargetConfigSchema
v THEME_FEATURE_STAGESExplicit feature requirements are distinct from rendering capabilities.
v TRANSFORM_DESCRIPTION_ID
v TRANSFORM_EMBEDS_ID
v TRANSFORM_GFM_ID
v TRANSFORM_LATEX_ID
v TRANSFORM_OFM_ID
v TRANSFORM_SYNTAX_ID
v TRANSFORM_TOC_ID
v VaultConfigSchemaVault config: required id, path, target + optional vault options (same shape as defaults; merged with defaults).
v VaultOptionsSchemaShared vault options; defaults and VaultConfig both use this shape.
v VaultThemeConfigSchemaShared keys are checked here. Anything else is the theme's own setting (routes, footer, infobox defaults…) and passes through for the theme to validate.
v VERSIONS_FIELDThe frontmatter field a note sets to `true` to publish its previous versions.
v VOID_TAGS
v websocketRenderer`operation.protocol: websocket`: one WebSocket endpoint per page, listed after the path's HTTP methods.
v WranglerAssetsSchemaAssets config; main/assets can be auto-populated at build from vault outDir.
v WranglerBuildSchemaCustom build (inheritable).
v WranglerConfigFieldsSchemaWrangler config fields shared by root and env.<name>. Covers inheritable and non-inheritable keys from the config; no nested env. A `cloudflare-workers` target is its Worker's Wrangler config, so keys this doesn't list (newer bindings such as `images`) pass through untyped and Wrangler validates them.
v WranglerConfigSchemaFull top-level wrangler config. Users can set env (e.g. dev, prod) per vault; each env key holds a partial config (inheritable keys only) merged with the top-level by wrangler.
v WranglerEnvRecordSchema
v WranglerLimitsSchemaLimits (inheritable).
v WranglerObservabilitySchema
v WranglerPlacementSchemaPlacement (inheritable).
v WranglerRouteSchema
v WranglerTriggersSchemaTriggers / cron (inheritable).
v ZoneIdRouteSchema
v ZoneNameRouteSchema