Inputs
Oicana supports two types of inputs. A json input takes structured data while binary data can be passed into templates through a blob input.
Inputs are defined in the template manifest. Integrations can list all inputs of a template to, for example, validate input values or offer an editor.
The typetype property of the input definition must be jsonjson. The only other required property is keykey.
A json schema file can be used for input validation.
Early Alpha
The json schema validation is not complete yet. You can set the property and maintain the schema, but at the moment it is ignored by Oicana.
Blob inputs can be used for binary data like images. Additional metadata can be used to further specify the type of binary data in the input.
As a common use case for blob inputs, images have special support in the oicanaoicana Typst package.
Inputs can define two different fallback values, defaultdefault and developmentdevelopment.
When compiling a template in development mode, input values have the priority
- Explicit input value
developmentdevelopmentvaluedefaultdefaultvalue
If you compile in production mode, the developmentdevelopment value is ignored:
- Explicit input value
defaultdefaultvalue
While developing an Oicana template in a Typst editor, it will be compiled in development mode. It makes sense to define developmentdevelopment values for all required inputs of you template to have a functioning preview.
Considering a template with the files development-data.jsondevelopment-data.json, default-data.jsondefault-data.json, development-logo.pngdevelopment-logo.png, and default-logo.pngdefault-logo.png. It could define the following inputs:
The default.metadefault.meta objects for blob fallback values are optional.
In the preview of an editor, the content of development-data.jsondevelopment-data.json and development-logo.pngdevelopment-logo.png would be used. If compiled in production mode through an Oicana integration, the default fallbacks would be used if the input values are not set programmatically.