@tola/module
Read resolved options and published static assets for a configured Tola module.
Import
#import "@tola/module:0.0.0": *Exports
get-module
let get-module(
name: str = "",
) = dictionary;Return the runtime handle (name, options, assets) of a configured module instance.
Each alias in tola.toml is a distinct instance even when two aliases share the same module source.
name: module alias string.options: module options dictionary after merging site overrides from[modules.<alias>.options].assets.files: Typstpathvalues for reading module asset files.assets.urls: published browser URLs (already prefixed withsite.base-pathand cache-busting?h=<hash>when enabled).
Positional parameters
namestrdefault:"": Module alias declared under[modules.<alias>]intola.toml. May be omitted only when called from inside a@tola-modules/*package, where it returns the current module instance.
Load a module's stylesheet and title option
#import "@tola/module:0.0.0": get-module
#let theme = get-module("theme")
#html.link(rel: "stylesheet", href: theme.assets.urls.at("style.css"))
= #theme.options.title