serhii.net

In the middle of the desert you can say anything you want

03 Dec 2021

211203-2305 New obsidian Templates + hotkeys for Garden (IT, RL) and personal notes

I changed the templates I use to be more repetitive but hopefully with less chances for a note meant to be private to get published on my website.

Three types of notes I want to be able to create easily:

  • Diensttagebuch (public)
  • Jourrnal (public)
  • Personal (private)

I don’t want the Personal ones to end up left in any of the folders parsed by obyde even by chance, and if they do I don’t want them converted, and if they do - shown.

Now I just create a note, it gets put into /, I give it a name, and then run one of the three templates. The templates take care of moving it to the correct folder and prefic

Now I have three identical templates, they move the note to the correct place, prefix the file with the datetime if needed, and add boilerplate frontmatter.

Public diensttagebuch note (<C-t>), puts it into /garden/it/ and prefixes with datetime:

<% tp.file.move("garden/it/"+tp.date.now("YYMMDD-HHmm")+" "+tp.file.title) %>---
title: "<% tp.file.title %>"
tags:
  - "zc"
  - "zc/it"
  - "<% tp.file.cursor() %>"
fulldate: <% tp.date.now("YYYY-MM-DDTHH:MM:SSZZ") %>
date: <% tp.date.now("YYYY-MM-DD") %>
layout: post
hidden: false
draft: false
---

Public journal note (<C-S-t>) is pretty much identical:

<% tp.file.move("garden/rl/"+tp.date.now("YYMMDD-HHmm")+" "+tp.file.title) %>---
title: "<% tp.file.title %>"
tags:
  - "zc"
  - "zc/rl"
  - "<% tp.file.cursor() %>"
fulldate: <% tp.date.now("YYYY-MM-DDTHH:MM:SSZZ") %>
date: <% tp.date.now("YYYY-MM-DD") %>
layout: post
hidden: false
draft: false
---

Notes not meant to be published (<C-t>) get put into /Personal , but also:

  • Have no date in frontmatter, obyde should loudly error out if it sees them (which it should never)
  • If they magically end up published, I put literally all “don’t pulbish me” parameters in the header.
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus