adding zettelkasten ids and links


#meta #zettelkasten

While looking at Obsidian, I noticed that it has a button to create a note with a "Zettelkasten ID" in the filename, and started to research what "Zettelkasten" meant.

There is an entire "Zettelkasten method" for notetaking and knowledge management, which I won't try to explain because I've only just started looking at it myself and would probably get it wrong, but one of the core concepts is having a permanent unique ID for every "zettel" (item of content) which you use to refer to it. That's something that I would find valuable anyway, so I thought I'd implement it in the Gyokuto software that builds this site.

The most common form of Zettel ID I see used is apparently a number of the form YYYYMMDDHHMM i.e. year, month, day, hour, minute, which is easy to generate both in code and in your head (unlike UUIDs). Since time is only moving in one direction1 this will uniquely identify anything you create, as long as you don't create more than one per minute, in which case add the seconds or milliseconds on, whatever, it's just a number.

Implementing Zettel ID links within this site

Some systems use [[wiki link syntax]] but I decided to use straight Markdown links and just replace any href value which is all digits.

Example

I created a page with an ID of 202202271546 as a test destination. It has the following metadata header block:

---
title: Zettel ID demonstration destination page
id: 202202271546
---

I create a link to it using the Markdown code:

[a link to it](202202271546)

then I rebuild the site. The Zettelkasten formatter checks all rendered page HTML for links with numeric href values, and if it finds any, indexes all pages (once) to pull out all existing Zettel IDs (looking for parameters id, zid and zettel in the page header) and the relevant paths, and replaces the numeric link with the path if it has one.


  1. from the point of view of the human mind anyway ↩︎



Email is not publicly displayed