Linking daily notes to previous and next days

In his Comprehensive Obsidian Zettelkasten Workflow, Bryan Jenks talks about linking his daily notes to the previous and next days. He metions that he uses the Templater plugin to do this, but doesn’t show exactly how he set it up. Does anyone on this forum know how/do something similar?

Yes, you can download Brian’s templates by signing up here:

However, I prefer a different solution. The issue with that method is that it only links to yesterday relative to when you issue the command, not yesterday relative to that particular daily note. So you have to be very careful when you create the notes. And if like me you look at future daily notes or assign tasks to future daily notes (such as to Aug 29), the yesterday and tomorrow links in that note will be 15th and 17th of Aug not 28th & 30th of Aug.
My preferred method creates yesterday and tomorrow’s links relative to the daily note itself, not to when I type or create it. You need to download the community plugins Templater & Calendar to make it work, and I’d strongly recommend you also download Periodic Notes and disable the core plugin Templates.
Here’s the code to put in a template note:

[[<%“YYYY-MM-DD”, -1, tp.file.title, “YYYY-MM-DD”) %>|Yesterday]] <% tp.file.title %> [[|Tomorrow<%“YYYY-MM-DD”, 1, tp.file.title, “YYYY-MM-DD”) %>]]

I also like to put a link to that daily notes weekly note, monthly note and yearly note:

WEEK - [[<%“GGGG-[W]WW”, 0, tp.file.title, “YYYY-MM-DD”) %>]]

MONTH - [[<%“YYYY-MM”, 0, tp.file.title, “YYYY-MM-DD”) %>]]

YEAR - [[<%“YYYY”, 0, tp.file.title, “YYYY-MM-DD”) %>]]


Thank you, your solution is perfect. :slight_smile:

1 Like

It’s a pleasure!

With Templater, you can generate prev/next links based on the day you’re looking at. For example, if you click a day sometime next week in the calendar, then the prev/next weeks will be accurate for that day.

Prev: [[ <%"YYYY-MM-DD - ddd MMM D", -1, tp.file.title, "YYYY-MM-DD - ddd MMM D") %>]] | Next: [[<%"YYYY-MM-DD - ddd MMM D", 1, tp.file.title, "YYYY-MM-DD - ddd MMM D") %>]]

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.