From 22ba6825db3b82e0b0f83ef6052f17289893e385 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 18 Dec 2023 12:18:41 +0100 Subject: Key/Value data from CLI (#2894) --- docs/reference/groups.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/reference/groups.yml b/docs/reference/groups.yml index 5ae564b2..16ded697 100644 --- a/docs/reference/groups.yml +++ b/docs/reference/groups.yml @@ -129,9 +129,19 @@ details: | Module for system interactions. - Currently, this module defines a single item: The `sys.version` constant - (of type [`version`]($version)), that specifies the currently active - Typst compiler version. + This module defines the following items: + + - The `sys.version` constant (of type [`version`]($version)) that specifies + the currently active Typst compiler version. + + - The `sys.inputs` [dictionary]($dictionary), which makes external inputs + available to the project. An input specified in the command line as + `--input key=value` becomes available under `sys.inputs.key` as + `{"value"}`. To include spaces in the value, it may be enclosed with + single or double quotes. + + The value is always of type [string]($str). More complex data + may be parsed manually using functions like [`json.decode`]($json.decode). - name: sym title: General -- cgit v1.2.3