Migrate from v1
Rename your Eta templates, enable the JavaScript gate, and overwrite v1 notes to complete the v1-to-v2 upgrade.
Available sinceZotLit 2.0.0
ZotLit v2 replaces v1 in place. Settings migrate automatically on first load, but if you customized your Eta templates, they are not loaded until you rename them, update the data vocabulary, and enable the JavaScript Templates gate. Notes you created with v1 still appear in the index. Overwrite them when you want incremental body updates.
What needs your attention
- Required to restore note generation: Rename template files to the v2 pattern, replace
it.*withzt.*, and enable the JavaScript Templates gate. Without these steps, v2 falls back to built-in defaults that do not reflect your customizations. - Automatic (no action): Settings, including folder paths and custom frontmatter fields. Migrated on first load.
- Optional: Run ZotLit: Overwrite literature note on v1 notes to add the managed region for incremental body updates.
Install v2
Install the v2 plugin
ZotLit v2 uses the same plugin id as v1 (zotlit). When you install v2, Obsidian replaces v1 directly. There is no separate plugin entry and no manual uninstall step. The plugin is desktop-only.
Confirm in Obsidian
After the upgrade, open Settings → ZotLit. The settings pane loads with your migrated configuration. If you see your literature-note folder path and template folder path, the migration succeeded.
After the upgrade, v1 is gone. If you need to consult the original documentation while you transition, the ZotLit v1 docs remain available.
Settings (automatic)
On first load after upgrading, ZotLit detects your v1 settings and migrates them automatically. No action is required for settings. The migration runs once and persists the result; write failures are logged but never block the plugin from loading.
What carries over:
- Your literature-note folder and template folder paths.
- Custom frontmatter fields, kept as JavaScript-language fields. Fields you never customized (still using v1 defaults) convert to Liquid.
- Embedded template sources (such as the filename template body) are not migrated because v2 uses a different data vocabulary (
zt.*instead of v1'sit.*). V2 reads templates from vault files instead.
JavaScript-language fields need the gate
Custom frontmatter fields migrated as JavaScript require the JavaScript Templates gate to evaluate. Until you enable it, those fields are skipped during note updates with a notice listing the skipped fields. See Enable JavaScript templates for the opt-in steps.
Migrate templates
V2 template files use the naming pattern zotlit-<name>.(liquid|eta).md. V1 files used the zt- prefix (for example, zt-note.eta.md) and do not match the v2 pattern. Until you rename them, v2 does not load your custom templates and falls back to the built-in defaults.
V1 templates were written in Eta (JavaScript). In v2, Eta templates require the JavaScript Templates gate: a per-device opt-in stored outside synced settings, disabled by default. Until the gate is on:
- Eta template files (
.eta.md) that match the v2 naming pattern are inert. A notice names the file and explains that JavaScript templates are disabled. - JavaScript-language frontmatter fields are also inert. A notice lists the skipped fields when you update a note.
If you customized your Eta templates, these three steps are required to restore note generation:
- Rename your template files to the v2 pattern (
zt-tozotlit-,annotstocontent). - Replace
it.*withzt.*throughout your templates. - Enable the JavaScript Templates gate on each device where you use ZotLit.
Follow Migrate v1 Eta templates for the full procedure, including field-by-field mappings and an optional Liquid conversion path.
Never customized your templates?
If you used only the v1 defaults, no action is needed. V2 ships updated defaults in Liquid that work without the JavaScript Templates gate.
Annotations in imported notes
When you import a Zotero note into your vault, v2 converts the annotation content already in the note directly. Highlights and underlines become inline marks with a zotero:// backlink, image excerpts become embeds, and your typed comments are kept as written. If you edited an annotation paragraph inside Zotero before importing, those edits are preserved. V1 re-rendered every annotation through the annotation template instead, which discarded in-place edits.
To restore v1-style rendering, open Settings → ZotLit → Note import and enable Render annotations from template. The toggle is off by default. When on, annotation paragraphs are re-rendered through your annotation template with data pulled fresh from Zotero.
Edits in Zotero are discarded when this setting is on
This is the same behavior v1 had: annotations are re-rendered from Zotero's stored data, so any edits you made to annotation paragraphs inside the Zotero note are not preserved. Paragraphs you restructured or added prose to fall back to the direct conversion.
Refresh v1 notes
V2 recognizes your existing literature notes by their zotero-key frontmatter value. They appear in the note index, and ZotLit: Update literature note metadata refreshes their frontmatter. However, v1 notes lack a managed region (the %%zt-managed%% markers that v2 uses to separate generated content from your writing), so incremental body updates cannot target them.
Adding the managed region is optional. You do not need to do it immediately or for every note. When you are ready:
Open a v1 literature note
Open any note that was created by ZotLit v1.
Run the overwrite command
Open the command palette and run:
ZotLit: Overwrite literature noteA confirmation modal appears. Select Overwrite to proceed. ZotLit regenerates the entire note body from the current note template. Managed frontmatter keys are refreshed; other frontmatter keys you added are kept.
Verify the managed region
After overwriting, the note contains %%zt-managed%% markers. It now responds to ZotLit: Update literature note for incremental updates going forward.
Why overwrite instead of update?
The managed region is what lets ZotLit replace generated content while preserving your writing. V1 notes lack these markers, so there is no boundary for an incremental update to target. See Literature notes and the managed region for more detail.
Retired features
Two v1 workflows are not carried forward into v2.
Annotation merging. V1 could merge annotations from multiple PDF attachments or deduplicate them across updates. V2 does not include this workflow. Annotations are rendered per-attachment as they appear in Zotero.
Topic-based imports. V1 let you subscribe a note to a Zotero tag (#zt-topic/<name>) so that new items with that tag were automatically imported as literature notes. V2 does not include this workflow.
See also
Migrate v1 Eta templates
Rename, update the data vocabulary, and enable the JavaScript gate.
Enable JavaScript templates
Turn on the gate so Eta templates run on this device.
Literature notes and the managed region
How ZotLit separates your writing from generated content.
Keep notes up to date
Update a single note or a batch when Zotero data changes.