Template Syntax
LifeOS currently has two template syntaxes. Choose the one that matches your version:
- LifeOS Pro / Aino LifeOS: use the built-in syntax, such as
{{snapshot:Project}},{{date}}, and{{tags}}. This syntax does not require Templater. - Community / open-source LifeOS: only supports the legacy Templater syntax, such as
<% LifeOS.Project.snapshot() %>. If you use the open-source version, do not replace those templates with the new syntax.
Basic Variables
These variables work in periodic note templates and theme note templates:
Weekday Date Variables
In weekly note templates, use {{monday:FORMAT}} through {{sunday:FORMAT}} to reference each day in the current week. Chinese locales default to Monday-start weeks; other locales default to Sunday-start weeks. A custom week-start setting takes precedence.
For example, if your daily note filename is YYYY-MM-DD:
If your daily note filename is YYYYMMDD dddd, you can write:
Snapshot Variables
LifeOS Pro snapshot variables use this syntax:
They generate a numbered list of theme index files under the matching folder. For example, {{snapshot:Project}} scans the project folder, finds each project's index file, and generates:
If you use the *.README.md index mode, LifeOS Pro follows your current setting when resolving index files.
Conditional Blocks
You can render different content for weekdays and weekends:
weekday means Monday through Friday. Saturday and Sunday use the {{else}} branch. If there is no {{else}}, weekends render empty content.
Periodic Note Example
Theme Note Example
When creating a theme note, {{tags}} is replaced with the current theme tag. When writing it as an inline tag, add # yourself:
Community / Open-Source Compatibility
Community / open-source LifeOS relies on Templater and only supports the legacy syntax:
Theme tags still use Templater frontmatter variables:
If you maintain an open-source vault or an older example vault, keep using this legacy syntax and make sure Templater has Trigger Templater on new file creation enabled.
Migration Safety Rules
When using the "Review & Safely Migrate" feature to convert old templates to the new syntax:
- Automatic migration only applies to templates without residual scripts. If your template only contains recognized legacy patterns such as
tp.date.now,tp.frontmatter.tags,tp.file.title, orsnapshot(), the migration will complete automatically. - Templates containing custom JavaScript scripts will NOT be modified automatically. If your template includes custom Templater scripts such as
<%* let ... %>,<% if ... %>, ortp.user.*, the system will not write to the file, preventing damage to your custom logic. - Re-check any time from the Settings page. Open Settings → Periodic Notes or Theme Notes tab, click the "!" button, and select "Review & Safely Migrate" to re-scan the latest template state.
- Manual migration suggestions: If your template uses
.weekday()logic, you can replace it with{{if weekday}}...{{else}}...{{endif}}. If your template depends on other Templater plugins or complex scripts, consider keeping Templater or manually rewriting those scripts into LifeOS native syntax before migrating.