How to Build a Zettelkasten: The simple way

5 minute read

Zettelkasten is a note-taking method that has recently been rising into popularity with tools like Obsidian, RoamResearch, and even Notion.

This approach simply consists of digesting chunks of information into small pieces and contain them in a single place, linking notes back and forth according to the topics. Ideally, one will link all notes of a given keyword so that you can then go through all the notes you have on a particular topic.

While some of the above tools have great UIs and awesome features, I personally prefer keeping it simple and as extensible as possible.

In this post, I will be writing about my flow to write notes. My hope is that if someone is looking for inspiration on how to keep a Zettelkasten without needing any third-party, closed-source application, something backup-enabled for free then this post will help you get started.

Editor

The first piece of software you will need is a text editor.

My editor of choice is Vim. Regardless of my personal preference, you can choose whatever editor your prefer. That is the beauty of this approach. If you are accustomed to VSCode, this will work too. If Emacs is your jam, it will work too. Notepad, Notedpad++, whatever..

The editor is not relevant, as long as it supports Markdown. But even still, you can go without any of that if you are okay with reading raw Markdown. Your notes will be pretty printed anyway, so even that is kind of irrelevant.

Here is a shot of a note in raw format:

editor sample

Editor Sample

The highlight here is that there is a title, topic tag (in case I ever want to find all my notes on #productivity, which never happened actually…), a summary section, and a notes section.
The summary is where I write my version of the topic, the notes section is where I question myself, my understanding, or where I write any idea that came up to me while reading or watching this content. Any action item I write is eventually migrated to my to-do list.

Code repository

This approach heavily leverages features from git code repositories for visualization, backup and storage. Again, it is open for extension and not dependent on a platform, hence you can go with whichever platform you fancy about. GitHub, GitLab, BitBucket, our own git server instance, … It does not matter. They all support Markdown so you can use whatever you prefer.

code repo

Zettelkasten Repo Sample

I personally use GitLab.com because I like the platform’s looks, as well as the support they have for Markdown (specially mermaid for Markdown graphs, plots and diagrams).

This repository is also my backup, as everything I write and edit is pushed to the internet. Hence, if I ever switch environments, I can transfer my notes to the new environment by installing git, my credentials and pulling it from the web.

This approach also works offline, even though you will not be able to push changes to your backup - not until you have an internet connection anyway.

For those who are not familiar with git though, there are a gazillion guides on how to use git on the internet so that should not stop you. You do not need to master git by any means, so you just need to learn how to commit, push and pull changes (and this last one is just in case you need to pull your notes in another environment). If you are a developer though, please learn git properly :)

Miscellaneous

As mentioned above, I leverage terminal tools to do things like searching, format conversions and note creation.

Searching

My vimrc contains a set of plugins that really facilitate searching. Namely, I use silversearch-ag and ack, and thus I can do quick searches for keywords. If I want to know everything I have on #productivity, I can do a search for that keyword:

Zettel Search

Zettel Search

The best part is that those two plugins combined can be used to search for a single keyword and not a topic like I did in the example above.

Back to the picture now, the bottom part shows all notes in which the keyword is referenced, while the top shows the full file for context. I then have a map of all notes with this keyword.

ack allows me to go back and forth into each note, use previews, open splits with the notes, and so much more. I am pretty sure I would be able to set-up a constructive conclusion on a given topic with this approach.

If I am not in the editor and I need a quick search, I can do multiple things. I can try GitLab’s UI to search for my keyword, or use grep if I’m offline. grep is amazing for searching. Sometimes, it might be even relevant to use grep in vim (with the bang ! operator) to do some more complex querying.

Now, one cool feature from the tools I mentioned early on is that you can create notes on demand, as well as make use of template files. I recreated the features I wanted from those tools with shell scripts, although you can use any other language that you are used to.

Scripting

I have one script to generate a timestamped note, that I obviously called zettel, thus every time I write zettel in the terminal, it will create and open the new note for me in vim.

As you might have seen in the repository print screen, I do have a template folder. However, I have not needed it yet. In the future, I might try to make my zettel script more robust and add features like flags so I can specify if I want to use a template or not. Furthermore, this feature could allow to replace placeholders so I can pass in the note title and things get in place for me to save time. Should be relatively straightforward to do that too, so it’s just a matter of needing it or not. Again, that is the whole theme of this approach: only use features I need, with the tools I am comfortable with, while avoiding closed-source, fully-bloated software of things I don’t use, nor want to use.

Utilities

One last thing I would like to mention is pandoc. pandoc is a universal document converter and it’s useful to convert markdown files into PDFs. It can do much more, of course, but I just wanted to briefly mention this because I have used it to convert some notes into PDF files that I could then share around and in a pretty format. Do not worry, pandoc is straightforward, easy to use, and there is a huge community you can reach out to in case you ever get stuck.

If you look at my dot files, there is a compilepdf script that I use when I want to convert markdown to PDF.

This should be your go-to if you need to pretty print your note(s).

Thanks for reading, I’ll see you next time.
gsilvapt

comments powered by Disqus