Skip to content

Instantly share code, notes, and snippets.

@bennewton999
Last active June 11, 2024 22:02
Show Gist options
  • Save bennewton999/62b4a034445a24532591bc4c55a52cf5 to your computer and use it in GitHub Desktop.
Save bennewton999/62b4a034445a24532591bc4c55a52cf5 to your computer and use it in GitHub Desktop.
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
## Tasks
#### Over Due
```tasks
not done
due before <% tp.date.now("YYYY-MM-DD") %>
```
#### Due Today
```tasks
not done
due on <% tp.date.now("YYYY-MM-DD") %>
```
#### New Today
- [ ]
## Meeting Log
### 0000:
## Daily Log
### [[Project 1]]
### [[Project 2]]
### [[Project 3]]
## Daily Check List
### Start of Day
- [ ] Check Email
- [ ] Check Teams
- [ ] Check showing online
- [ ] Check Calendar - Time Block
### End of Day
- [ ] Show Offline
- [ ] Clean Unused Headings in Daily Log
- [ ] Check tomorrow's calendar
## Other Tasks
#### No Due Date
```tasks
not done
no due date
```
#### Done Today
```tasks
done on <% tp.date.now("YYYY-MM-DD") %>
```
@volvetcode
Copy link

how to deal with tasks from daily template in no due?

@michael-gaudet
Copy link

michael-gaudet commented Nov 19, 2022

Thanks @itsmyfirstname i had the same problem, that fixed it perfectly.

The only issue I have with this now is when Obsidian creates the daily note, these template fields all show up as the literal string “NaN”. But if I create a note and add the template, it works as expected.

Not sure if this is an obsidian Mobile thing or what. I’ll have to try with a desktop client.

AB02C98D-0182-4E5A-8FC9-E66185EED69E

@fishnibble
Copy link

Thanks @itsmyfirstname i had the same problem, that fixed it perfectly.

The only issue I have with this now is when Obsidian creates the daily note, these template fields all show up as the literal string “NaN”. But if I create a note and add the template, it works as expected.

Not sure if this is an obsidian Mobile thing or what. I’ll have to try with a desktop client.

AB02C98D-0182-4E5A-8FC9-E66185EED69E

I was able to fix this by

  • Making a folder for templates
  • setting templates path in templater
  • Setting daily temple to nothing
  • Making new daily temple with ctr + p + open daily note
  • alt + e select the template

I did however have to add this dataview to make sure it did not pick up tasks i added into the template (using dataview.js)

dv.taskList(dv.pages() .file.where(f => f.name != "Daily Note") .tasks.where(t => !t.completed)) 

@replete
Copy link

replete commented Jan 15, 2023

Thanks for sharing this.

In case it helps anyone, I wrote a CSS snippet to slight reduce the frontmatter visible priority. There isn't a selector to target the whole frontmatter (no containing div) but its better than nothing:

.cm-s-obsidian span.cm-def{
    font-size:25%;
}
.cm-s-obsidian .cm-hmd-frontmatter {
    font-size:75%;
}
.cm-s-obsidian span.cm-meta {
  color: var(--text-faint);
  opacity:0.5
}

@eulralx
Copy link

eulralx commented Nov 27, 2023

Hi, good morning, at first thanks so much for sharing your template. I use it since a lot of time. In the last weeks I've not worked a lot with Obsidian. Today I would start use it again and the following Tasks collections doesn't work anymore:

  • Over due
  • Due today
  • Done today

I'm not sure what changed or what I've to do, to fix it.

Can you help me or give me a hint what I have to do to be able to use the task collections again?

Bildschirmfoto 2023-11-27 um 07 51 26
Bildschirmfoto 2023-11-27 um 07 51 12
Bildschirmfoto 2023-11-27 um 07 50 59
Bildschirmfoto 2023-11-27 um 07 50 50
Bildschirmfoto 2023-11-27 um 07 50 29
Bildschirmfoto 2023-11-27 um 07 50 21

@bennewton999
Copy link
Author

Sorry - this is something I am no longer using or keeping up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment