MOTD or date based reminders in your daily note

Add reminders to your Daily Notes which are meaningful to you and change in time, no plugins needed.

Demo

image

Code

CSS snippet. For example, save as motd.css in your obsidian CSS snippets directory:

[data-motd] {
  border-left: 4px dotted currentColor;
  padding-left: 0.25em;
}

[data-motd]::before {
  content: "✨ ";
}

[data-motd="1"]::after {
  content: "Create sub-tasks for larger tasks!";
}

[data-motd="2"]::after {
  content: "Focus on one task at a time!";
}

[data-motd="3"]::after {
  content: "Don't forget to drink water! 💦";
}

[data-motd="4"]::after {
  content: "Set realistic deadlines!";
}

[data-motd="5"]::after {
  content: "Prioritize your tasks!";
}

[data-motd="6"]::after {
  content: "Reduce your cognitive load, simplify the fights! 💥";
}

[data-motd="7"]::after {
  content: "Don't forget to take breaks!";
}

Daily note template tag:

<div data-motd="{{date:E}}"></div>

How to customize

Refer to Moment.js | Docs for different date formats.

  • {{date:E}} - will give you a numeric representation of the current day of week from 1 to 7
  • {{date:M}} - will give you the current month of year from 1 to 12
  • {{date:D}} - will give you the current day of month from 1 to 31
  • {{date:W}} - will give you the current week of year from 1 to 53
  • {{date:DDD}} - will give you the current day of year from 1 to 365

The example CSS uses {{date:E}} and so expects the CSS snippet to define at least 7 messages, one for each day of the week.

1 Like