1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
struct ConfigFile {
/// Array of globs to match for passthrough-copying.
///
/// Example in the TOML config file: `passthrough_copy = ["*.css", "*.js", "assets/*"]
passthrough_copy: Vec<String>,
/// Command to run before a full rebuild.
///
/// Strings should not contain $ unless the symbol begins:
/// - $PROJECT_ROOT, which is replaced with the path to the project root.
///
/// E.g., `passthrough_copy = ["python", "$PROJECT_ROOT/prebuild.py"]`.
init: Vec<String>,
/// Command to run to post-process HTML files generated by Typst.
///
/// Must take in stdin and return via stdout.
///
/// Strings should not contain $ unless the symbol begins:
/// - $PROJECT_ROOT, which is replaced with the path to the project root.
///
/// Example in the TOML config file: `post_processing_typ = ["python", "$PROJECT_ROOT/post_processing_script.py"]`.
post_processing_typ: Vec<String>,
/// Convert paths literally instead of magically tranforming to index.html.
///
/// i.e., ./content.typ goes to ./content.html instead of defaulting to ./content/index.html.
///
/// Example in the TOML config file: `literal_paths = true`
literal_paths: bool,
/// Typst cannot yet glob-find multiple files, which is a problem if one wants to list, e.g., all blog posts on a page.
/// To work around this, we write all Typst files(?) as a JSON to the project root directory.
///
/// We also let you query for data. (You might want the dates of those blog posts to appear on your listing page).
/// This is slower than the other options because we have to call `typst query`.
///
/// Must be one of "disabled", "enabled", "include-data"
///
/// Example in the TOML config file: `file_listing = "enabled"`
file_listing: FileListing,
/// Add extra arguments to the underlying file listing `typst query` invokation.
///
/// This can be helpful for ignoring system fonts when querying,
/// which can drastically speed up Typst querying
/// (until Typst releases https://github.com/typst/typst/pull/7380).
///
/// Example in the TOML config file: `file_listing_extra_args = ["--ignore-system-fonts"]`
file_listing_extra_args: Vec<String>,
/// Add extra arguments to the underlying `typst compile` invokation.
///
/// This can be helpful for ignoring system fonts when compiling,
/// which can drastically speed up Typst querying
/// (until Typst releases https://github.com/typst/typst/pull/7380).
///
/// Example in the TOML config file: `compilation_extra_args = ["--ignore-system-fonts"]`
compilation_extra_args: Vec<String>,
/// Disable incremental compilation while using serve or watch mode.
///
/// Example in the TOML config file: `disable_incremental = true`
disable_incremental: bool,
}