Obsidian Daily Note Implementation v2
Here’s what my current Obsidian Daily Note looks like:
I’m pleased with this, having come from a pretty bland Daily Note setup prior to this. I’ll explain the setup:
Requirements
- Obsidian
- Daily Notes plugin
- Dataview plugin
- Tasks plugin
- Quick Add plugin (optional, I suppose)
As of July 15, 2022 this only works as expected if you edit in regular source mode, not live preview mode (the live preview won’t show the styling; see https://www.reddit.com/r/ObsidianMD/comments/vz2mw5/comment/ig9g0k9)
Template File
I set up the “Daily notes” plugin as follows:
- Date format:
YYYY-MM-DD[ Daily Note]
- The square brackets let you use arbitrary text that won’t be treated as a date
- New file location: Daily
- Template file location: System/Templates/Daily Note (shown below)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
#{{date:YYYY}}/{{date:YYYY-MM}}/{{date:YYYY-MM-DD}} # {{date:YYYY-MM-DD dddd}} ## Journal ## Tasks Due Today ```dataview TASK WHERE due = date("{{date:YYYY-MM-DD}}") ``` ## Created Today ```dataview TABLE string(split(string(file.ctime), " - ")[0]) as "Created", file.mtime as "Last Modified" WHERE contains(file.path, "{{date:YYYY-MM-DD}}") OR (file.cday = date("{{date:YYYY-MM-DD}}") AND !regexmatch("^\d{4}-\d{2}-\d{2}", file.name)) SORT file.name ASC ``` ## Last Modified Today ```dataview TABLE string(split(string(file.mtime), " - ")[0]) as "Last Modified" WHERE !contains(file.path, "{{date:YYYY-MM-DD}}") AND !contains(file.path, "{{date:YYYY-MM-DD}} Daily Note") AND file.mday = date("{{date:YYYY-MM-DD}}") SORT file.mtime DESC ``` ## Other Tasks Completed Today ```dataview TASK WHERE completion = date("{{date:YYYY-MM-DD}}") AND due != date("{{date:YYYY-MM-DD}}") ``` |
Quick Add for Journal Entries
I use a Quick Add “Journal Entry” capture that is set up like this:
- Capture to filename: Daily/{{DATE:YYYY-MM-DD}} Daily Note.md
- Insert after: # Journal (Enabled)
- Insert at end of section: Enabled
- Capture format: (Enabled; note the blank first line)
-
1**{{DATE:h:mma}}** {{VALUE}}
-
Supporting CSS
Using the Settings > Appearance > CSS snippets feature, I implemented these CSS rules:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
/* Make dataview empty/error box much shorter */ .dataview.dataview-error-box { min-height: 10px; } /* Put less emphasis on the dataview table heading */ .dataview .table-view-tr-header .table-view-th { border-bottom: 1px solid #ccc; color: rgb(128, 128, 128); font-weight: 500; font-size: unset; } /* Stylize daily note headers */ h2[data-heading="Journal"] { color: rgb(218, 51, 0); margin-top: 40px; border-top: 5px solid rgb(218, 51, 0); padding-top: 5px; } h2[data-heading="Tasks Due Today"] { color: rgb(223, 147, 34); margin-top: 50px; border-top: 5px solid rgb(223, 147, 34); padding-top: 5px; } h2[data-heading="Other Tasks Completed Today"] { color: rgb(34, 173, 223); margin-top: 50px; border-top: 5px solid rgb(34, 173, 223); padding-top: 5px; } h2[data-heading="Created Today"] { color: rgb(138, 188, 0); margin-top: 50px; border-top: 5px solid rgb(138, 188, 0); padding-top: 5px; } h2[data-heading="Last Modified Today"] { color: rgb(88, 72, 171); margin-top: 50px; border-top: 5px solid rgb(88, 72, 171); padding-top: 5px; } |
Tasks Settings
I enabled the Set done date on every completed task option.
Dataview Settings
I use the stock settings with one exception: I enable the Automatic Task Completion Tracking option so I can use the task checkboxes within the dataview output.
Usage Tips
- I like to keep the calendar plugin showing in my bottom left sidebar. I can click any date to open or create a daily note. All of the values are set according to the daily note settings defined above.
- Sometimes I manually edit the daily note to add journal items.
- Sometimes I use Quick Add (globally on my computer via Keyboard Maestro) to be able to add Journal entries from anywhere at any time.
- I set my Daily notes: Open today’s daily note hotkey to ⌘⇧D so it’s always quick to get to
- Thanks to a fellow redditor I’d like to point out that currently the “Created Today” dataview relies on my files having a date prefix; this dataview does not look at the actual creation date. I am thinking about ways to do that. See https://www.reddit.com/r/ObsidianMD/comments/vz2mw5/comment/ig68xo4/?utm_source=share&utm_medium=web2x&context=3
- With tasks you can use
[due::2022-07-14] to set the due date (same with completion date and other attributes). So
- [ ] Go grocery shopping #task [due::2022-07-14] would be a valid task with a due date. Also it’s worth noting the natural date parser plugin makes it so you can, instead of typing the date, use
@
and start typing “today” or “tomorrow” or “in 2 weeks” or whatever… and it’ll convert that to the actual date. Just disable the “Linking” feature in the settings.
2 Comments
Shoe
Thanks for sharing your daily page. do you have any examples where you filter which tasks show up based on tags. I’d like to tag some tasks showing I have to take action vs others showing that I’m waiting on someone else to take action. #task doesn’t seem to allow for that.
Thanks in advance!
Jill
This is wonderful! finally got it to work.
It would be amazing if the css worked in Live Preview. I know it takes more coding and more time…
thanks for sharing this.