---
title: SvartzPlugin
updated_at: '2026-11-20T00:40:56+01:00'
created_at: '2026-03-07T03:07:51+01:00'
symbol:
  kind: interface
  name: SvartzPlugin
  signatures:
    - interface SvartzPlugin
  members:
    - name: id
      kind: property
      signature: 'readonly id: string'
    - name: contractVersion
      kind: property
      signature: 'readonly contractVersion?: string'
    - name: disabled
      kind: property
      signature: 'readonly disabled?: boolean'
    - name: server
      kind: property
      signature: >-
        readonly server?:
        [[reference/api/core/ServerModuleSpec|ServerModuleSpec]]<unknown>
      description: >-
        Answers requests under `/_svartz/<id>/` at runtime, and renders its
        `pages` under `/-/`. Needs a server target; the id must be a URL path
        segment.
    - name: permissions
      kind: property
      signature: >-
        readonly permissions?: readonly
        [[reference/api/core/PermissionDeclaration|PermissionDeclaration]][]
      description: >-
        The permissions this plugin checks, each in its own namespace
        (`<id>:feature:action`). `auth` collects them at build time.
    - name: forVault
      kind: method
      signature: >-
        readonly forVault?(site: [[reference/api/core/SiteVaults|SiteVaults]]):
        [[reference/api/core/SvartzPlugin|SvartzPlugin]]
      description: >-
        For plugins that span vaults: runs once per vault at config resolution,
        after every vault resolves, and returns the plugin that vault runs.
        Throw to fail config resolution, naming the vault.
    - name: options
      kind: property
      signature: 'readonly options?: unknown'
      description: >-
        The plain data the plugin was made from, such as a factory's options
        merged over its defaults. A plugin whose output depends on values its
        hooks close over puts them here: a closure's captured values can't be
        read from outside, and the version cache of `@svartz/plugin-history`
        compiles versions again when this changes.
    - name: reads
      kind: property
      signature: 'readonly reads?: readonly string[]'
      description: >-
        Files the plugin's hooks read while building, such as a bibliography,
        each a path from the vault's folder or an absolute one. `options` holds
        their paths; the version cache of `@svartz/plugin-history` also reads
        their contents, and compiles versions again when one changes.
    - name: buildStart
      kind: property
      signature: 'buildStart?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: configResolved
      kind: property
      signature: 'configResolved?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: buildEnd
      kind: property
      signature: 'buildEnd?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: handleChange
      kind: property
      signature: >-
        handleChange?:
        [[reference/api/core/PluginChangeHookInput|PluginChangeHookInput]]
    - name: discoverFiles
      kind: property
      signature: 'discoverFiles?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: parseFrontmatter
      kind: property
      signature: >-
        parseFrontmatter?:
        [[reference/api/core/PluginHookInput|PluginHookInput]]
    - name: filterUnpublished
      kind: property
      signature: >-
        filterUnpublished?:
        [[reference/api/core/PluginHookInput|PluginHookInput]]
    - name: allocateRoutes
      kind: property
      signature: 'allocateRoutes?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: resolveLinks
      kind: property
      signature: 'resolveLinks?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: transformOfm
      kind: property
      signature: 'transformOfm?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: transformGfm
      kind: property
      signature: 'transformGfm?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: transformToc
      kind: property
      signature: 'transformToc?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: transformDescription
      kind: property
      signature: >-
        transformDescription?:
        [[reference/api/core/PluginHookInput|PluginHookInput]]
    - name: transformSyntax
      kind: property
      signature: 'transformSyntax?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: transformLatex
      kind: property
      signature: 'transformLatex?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: transformEmbeds
      kind: property
      signature: 'transformEmbeds?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: indexContent
      kind: property
      signature: 'indexContent?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
    - name: emitArtifacts
      kind: property
      signature: 'emitArtifacts?: [[reference/api/core/PluginHookInput|PluginHookInput]]'
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/core/src/plugin/types.ts#L117
description: ''
---

# SvartzPlugin
