[build]

Configure the Typst entry file, content directory, publish directory, and hook concurrency.

The entry file compiles one Typst Bundle: it selects sources, renders each page with #document(...), and maps them to output paths under publish-dir.

Tola excludes the entry file from content discovery; keep shared templates and helper modules outside content-dir. All outputs—documents, [assets], and [[hooks.generate-outputs]]—are validated together before replacing publish-dir. If compilation, validation, or a pre-publish hook fails or is cancelled, the previously published directory stays intact.

Subtables

SectionSummary
[build.minify]Control HTML, CSS, and JavaScript minification for compiled pages and static assets.
[build.references]Choose whether broken internal links, missing assets, and unknown fragments fail the build or warn.

Keys

par-hooks

default: true values: true | false

Allow hooks that share the same stage, site or module instance, and order to run concurrently. Set to false to execute one hook at a time while preserving batch order.

hook-jobs

default: "auto"

Maximum number of hooks running concurrently across all modules and stages in one session. Accepts "auto" (sampled host parallelism at startup) or a positive integer. Does not restrict threads spawned internally by a script.

entry

default: "site.typ"

Root Typst file relative to the site root, or { module = "alias" } to use an entry declared by a configured module.

content-dir

default: "content"

Directory scanned by all-sources(), relative to the site root. Must stay outside .tola.

publish-dir

default: "public"

Destination directory written by tola build, relative to the site root. Choose an empty directory or the previous publish directory—a successful build replaces its entire contents.

Examples

Default build layout

toml
[build]
entry = "site.typ"
content-dir = "content"
publish-dir = "public"

Publish every discovered source

typst
#import "@tola/address:0.0.0": join-route, output-of
#import "@tola/source:0.0.0": all-sources

#for source in all-sources() {
  document(output-of(join-route(source.route-segments)), format: "html")[
    #include source.file
  ]
}

Search this site

Use the arrow keys to move through results.

Type to search.