[site]
Configure the site’s public origin, mount path, title, authors, and languages.
These fields populate site in @tola/site. When origin is set, site.url joins origin and base-path (for example "https://example.com/docs/"); otherwise site.url is none.
Pass --origin or --base-path on the command line to override those values for a single run.
Keys
origin
Public scheme, host, and optional port, such as "https://example.com". Put mount subpaths in base-path, not here. Required when generating feeds or sitemaps.
base-path
Subpath where the site is mounted under its origin, such as "/docs/". Must start and end with /.
title
Site name exposed as site.title for templates, page titles, and feeds.
authors
List of site authors, each with a required name and optional email and url, for example [{ name = "Alice", email = "alice@example.com" }].
description
Short site summary exposed as site.description for metadata and feeds.
languages
Languages supported by the site (for example ["en", "zh-Hans"]), using the same format as language. When non-empty, it must include language. Routing and language switchers are owned by your site templates.
language
Primary site language. Accepts either a BCP 47 tag (such as "zh-Hant-TW") or a table { lang = "zh", script = "Hant", region = "TW" }. Exposed as site.language with tag, lang, script, and region.
Examples
Deploy under a subpath with locale metadata
[site]
origin = "https://example.com"
base-path = "/docs/"
title = "Field Notes"
language = "en-US"
languages = ["en-US", "zh-Hans"]Apply site language settings in Typst
#import "@tola/site:0.0.0": site
#set text(
lang: site.language.lang,
script: site.language.script,
region: site.language.region,
)