Rach Smith's Notes & Nuggets

Conditionally adding content to my Obsidian daily note with the Templater plugin

note : journaling / obsidian Added January 9, 2024

I wanted to add some work startup/shutdown checklists to my daily note in Obsidian, but I didn't want them going in on the days I don't work. It turns out this is possible with the Templater Plugin.

Templater essentially gives you the ability to run some JavaScript when a note is created via a template. This means you can conditionally change the content of your note depending on variables such as the current date or time.

In my daily note template, I check for the day name, and then add the checklists if it is one of my work days. It looks like this:

# Sunday


## 📕 Log
- 




## 📝 Notes created today
```dataview 
LIST FROM "notes" or "projects"
WHERE file.cday = this.file.day
```

Comments

Comments are closed. You can still reply by email.

  • Jake Weidokal

    Very neat! I'd love to see more about how you manage tasks in Obsidian! I've been using it for tasks for half a year now and really enjoying it. I'd like to share my setup soon.

  • xix

    thank you for your sollution about Astro and obsidian