Customize a template
Create an editable template file from a built-in default, edit it, and see changes take effect live.
ZotLit ships six built-in templates that control literature note filenames, note bodies, annotations, the managed region, and citations. You can override any of them by creating an editable file in your vault.
Looking for a guided walkthrough?
The Customize your annotations tutorial walks through a full worked example with before/after results. This page covers the general procedure.
Create an editable template file
Open template settings
In Obsidian, open Settings > ZotLit > Templates. Under the Template files heading you see a row for each template type: Note filename, Literature note, Annotation, Managed region, Citation, and Alternate citation.
Create the file
On the row for the template you want to customize, click the Create editable template file button (pencil-on-file icon). ZotLit copies the built-in default into your vault and opens it in the editor.
A notice confirms the location: "Template saved to {path}."
The file is created at <template folder>/zotlit-<name>.liquid.md, where <template folder> is the path configured in Settings > ZotLit > Templates > Template folder (default: templates).
To create all six template files at once, click the Create all editable template files button at the top of the Template files section.
Edit the template
Open the template file and change its content. Templates use Liquid syntax by default. The file is standard Markdown with embedded {{ zt.field }} expressions that pull data from the Zotero item.
To discover which fields are available and copy their paths, use the Template Data Explorer.
See changes take effect
ZotLit watches the template folder and recompiles changed files immediately. No plugin reload is needed.
To apply your updated template to an existing literature note, run:
ZotLit: Update literature noteThis re-renders the managed region using the current template. To update only frontmatter fields without touching the body, run:
ZotLit: Update literature note metadataRestore the built-in default
Two options return a template to its built-in default:
- Reset to default (rotate icon on the template row): replaces the file's contents with the built-in default while keeping the file in place. A confirm modal asks: "Replace '
{name}' with the built-in default? Your changes will be lost." - Delete template file (trash icon on the template row): moves the file to Obsidian's trash. With the file gone, ZotLit falls back to the built-in default automatically. The watcher picks up the deletion immediately.
Switch to Eta (JavaScript)
After enabling the JavaScript Templates gate, each template row shows a Template language dropdown with Liquid and JavaScript (Eta) options. See Enable JavaScript templates for the opt-in procedure.
Selecting JavaScript (Eta) replaces the file. It does not convert syntax between Liquid and Eta.
See also
How templates work
The six template types, languages, filename matching, and the defaults model.
Explore template data
Browse available fields and copy paths into your template.
Configure frontmatter properties
Add custom YAML properties derived from Zotero data.
Customize your annotations
Tutorial: guided worked example with before/after results.