TechLifeWeb

Exploring the digital life

Templater code for daily note navigation


Published by 
 on 

I use the Templater plugin for my daily notes because I like to have it laid out in a certain structure every day. This is the code I use at the top of the template that template.

prev: [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] next: [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]

Here is the result of that code: Image showing the result of the templater code being run

YYYY-MM-DD is how I name all my daily notes. It's simple. I date every note i make and include a link back to the daily note with a simple link were I only have to know today's date. For example, today I'd just do [[2024-01-06]]

tag: Obsidian