| name | logseq-templates |
| description | Create and use Logseq templates with dynamic date variables. Use when the user wants to create reusable page or block templates, set up journal templates, or use template variables for meetings, projects, daily reviews, and other recurring structures. |
Logseq Templates Skill
Templates in Logseq let you insert reusable block structures. You define a template by adding the template:: property to a block. Then insert it with /template in Logseq's editor. When writing files directly, write out the desired structure manually.
Defining a Template
Add template:: template-name as a property to any block. That block and all its children become the template.
- Meeting Template
template:: meeting
template-including-parent:: false
- date:: [[<% today %>]]
- attendees::
- ## Agenda
-
- ## Notes
-
- ## Action Items
- TODO
The template-including-parent:: false property tells Logseq to insert only the children, not the parent block itself. This is almost always what you want.
Inserting a Template
In Logseq's UI, type /template in any block and search for the template name. This inserts a copy of the template's child blocks at that location, resolving any dynamic variables at insertion time.
When writing files directly (outside Logseq's UI), you cannot invoke /template. Instead, write out the desired block structure manually.
If you need to show a template's content on a page without inserting it, you can embed the template page:
- {{embed [[template page name]]}}
Note: This embeds the entire page (including template definition blocks and properties), not a clean inserted copy.
Dynamic Variables
Logseq supports these variables inside templates:
| Variable | Output |
|---|
<% today %> | Today's date, e.g. Jan 15th, 2024 |
<% yesterday %> | Yesterday's date |
<% tomorrow %> | Tomorrow's date |
<% time %> | Current time, e.g. 14:30 |
<% current page %> | The name of the current page |
<% last Monday %> | Most recent Monday |
<% last Friday %> | Most recent Friday |
<% next Monday %> | Coming Monday |
<% next Friday %> | Coming Friday |
Natural language date expressions work too: <% last week %>, <% next month %>.
Common Template Patterns
Daily Journal Template
Set this as the journal template in Logseq settings so it inserts automatically:
- Daily Template
template:: daily
template-including-parent:: false
- ## Morning
- Intention for today:
- Top 3 priorities:
- TODO
- TODO
- TODO
- ## Notes
-
- ## Evening Review
- What went well?
- What to improve?
- Gratitude:
- [[Daily Log]] [[<% today %>]]
Meeting Notes Template
- Meeting Notes
template:: meeting-notes
template-including-parent:: false
- date:: [[<% today %>]]
time:: <% time %>
attendees::
topic::
- ## Context
-
- ## Discussion
-
- ## Decisions
-
- ## Action Items
- TODO
owner::
due::
Book Review Template
- Book Review
template:: book-review
template-including-parent:: false
- author::
genre::
rating::
status:: reading
date-started:: [[<% today %>]]
date-finished::
- ## Summary
-
- ## Key Ideas
-
- ## Quotes
- #+BEGIN_QUOTE
#+END_QUOTE
- ## My Thoughts
-
Project Template
- Project Page
template:: project
template-including-parent:: false
- status:: active
started:: [[<% today %>]]
owner::
tags:: project
- ## Goal
-
- ## Tasks
- TODO
- ## Notes
-
- ## Resources
-
Weekly Review Template
- Weekly Review
template:: weekly-review
template-including-parent:: false
- week-of:: [[<% last Monday %>]]
- ## Last Week
- What did I accomplish?
- What did not happen?
- What did I learn?
- ## This Week
- Main focus:
- TODO
- TODO
- TODO
- ## Habits Check
- Exercise:
- Reading:
- Sleep avg:
Zettelkasten Note Template
- Zettel
template:: zettel
template-including-parent:: false
- created:: [[<% today %>]]
type:: permanent
tags::
- ## Idea
-
- ## Supporting Evidence
-
- ## Links
- Related:
- Opposes:
- Supports:
Storing Templates
The best practice is to store all templates on a dedicated page called templates or [[logseq/templates]]. This keeps them organized and easy to find.
- # My Templates
- ## Daily
- Daily Template
template:: daily
template-including-parent:: false
- ...
- ## Meetings
- Meeting Template
template:: meeting
template-including-parent:: false
- ...
Setting a Journal Template
To make a template insert automatically in the daily journal, go to Settings > Editor > Default journal template and type the template name.
Tips
- Keep template names short and memorable:
meeting, book, project, daily
- Use
template-including-parent:: false on almost every template unless you specifically want the label block to appear
- Store templates on a page excluded from graph view with
exclude-from-graph-view:: true
- Dynamic date variables resolve at insert time, not at definition time