You’re reading the ZotLit v2 beta docs. Still on v1? Read the v1 docs

ZotLit

Enable JavaScript templates

Turn on the JavaScript Templates gate so Eta templates and JavaScript frontmatter fields run on this device.

JavaScript Templates is a per-device gate that lets Eta templates (.eta.md files) and JavaScript-language frontmatter fields execute. It is disabled by default.

Understand the implications first

Eta templates run JavaScript with the same access as ZotLit itself: they can read and modify your vault, connect to the internet, and on desktop, access your system. Read JavaScript templates for the full explanation before opting in.

Turn on

Open template settings

In Obsidian, open Settings > ZotLit > Templates. Locate the JavaScript templates group.

Click Turn on

Click the Turn on button. A confirmation modal titled Enable JavaScript templates? appears with the following warning:

Eta templates run JavaScript with the same access as ZotLit itself: they can read and modify your vault, connect to the internet, and on desktop, access your system. Only enable this if you trust every template file in your vault.

Click Enable to confirm.

The gate takes effect immediately. ZotLit recompiles the template folder in place. No plugin reload is needed.

Turn off

In the same JavaScript templates group, click Turn off. The gate disables immediately with no confirmation modal. All .eta.md templates become inert and JavaScript frontmatter fields stop evaluating until the gate is re-enabled.

Per-device scope

The setting is stored locally on the device, outside the synced plugin data. Enabling it on one device does not enable it on another. Each device where you want Eta templates to run requires its own opt-in.

See also

On this page