Zettelkasten and semantic web

January 23, 2021

I have been playing with Zettlekasten lately. It's a nice tool when used as intended. Basically it's a markdown editor that helps to implement knowledge and ideas organizational practices used by very productive scientist (Niklas Luhmann). It focuses on simplicity, and the main feature is setting links between notes using [[page or search query]] syntax.

There are other more formal ideas about describing the knowledge, such as semantic web, especially Topic Maps. It's a complicated spec. It is a standard that describes how different concepts can relate to each other. Basically, it is done with creating links to different concepts and describing a type of each link.

Can we merge those ideas together? Let's try.


In Zettlekasten editor, page links are defined as [[another_file_name]], unfortunately there is no way to define a custom title and usually file names include IDs e.g. ([[202101232056]] or [[202101232056 file name]]), so the normal practice is to include title before or after the link:

Born in [[rome]]

Instead, let's extended the syntax:

(Born in)[[rome]] or [[rome]](Born in)

and allow to define a association/relationship type in {}

(Born in){born_in}[[rome]]

title can be skipped

{born_in}[[rome]] or [[rome]]{born_in}

Link types

born_in is association type, defined in a special yml file, this file can be edited by hand. Editing this file is more involved and most users can just download file with types for the kind of knowledge they are working with.

Topic (note) types

Topic types is idea from topic maps, which defines what types of relationships are applicable to the current note

The type can be embedded in a note markdown as attribute:

topic_type: person
date: 2020-01-01
main content here ...


Markdown can be extended to include elements of semantic web to get the best of both worlds. In next post I will describe more specific example.