Building a Zettelkasten using a static website generator

Choices and inspiration

Bryan Apperson explains in this post1 how he implemented a zettelkasten using the Hugo static site generator. Bryan makes the valuable observation that whilst there are a number of dedicated proprietary software solutions available to build a zettelkasten, much of the functionality needed for a digital zettelkasten such as linking, metadata and search is already available in web browsers and hypertext. Bryan explains that he created a private git submodule repository, put that in the content/zettelkasten folder in his Hugo setup in order to generate a public blog with a private zettelkasten.

Maggie Appleton maintains a list2 of digital gardens and tools and information relevant to digital gardens. The static site generator Jekyll is mentioned as one tool which can be used to generate digital gardens.

Implementation details

This website is modelled loosely on a zettelkasten. It uses the Hakyll static site generator. Hakyll was in part inspired by Jekyll and is written in Haskell. Gwern Branwen’s wonderfully well put together site3 is built using Hakyll and other tools albeit that Haykll is not recommended explicitly unless the user is familiar already with Haskell4.

As someone new to zettelkasten and systematic note taking in general this website is something of an experiment. The intention is not to get bogged down in tooling. Additional features may be added over time and when needed. Hakyll is a perfectly adequate static site generator and has the flexibility to be updated to a more elaborate implementation later.

Using Hakyll there does not seem to be an immediately obvious solution for generating backlinks between website pages automatically. Nonetheless, it is no doubt possible in Hakyll and the most reasonable approach may be along similar lines to how tag pages can be implemented5. Alternatively a simple solution using JavaScript could probably be used. Neuron6 is an open source and Haskell-based zettelkasten tool which incorporates backlinking functionality. This thread from the Hakyll Google Group provides further information on how backlinks or “reverse citations” could be implemented.

For the time being backlinks will be inserted manually. Manually inserting backlinks may take time but it may be more effective at facilitating learning by forcing active consideration of the conceptual linkages between notes. A simple script in Python or Haskell could be implemented to check that all necessary backlinks have been added.

References and footnotes

Pandoc hence Hakyll includes support for footnotes and these seem an excellent solution to handle both footnotes and references to external sources of information such as websites or books at least initially. Inline hyperlinks are used for internal site links, effectively creating a hierarchy whereby links internal to the site are prominent within the text. External references nonetheless are available and explicit in the footnotes.


  1. https://bryanapperson.com/blog/creating-a-zettelkasten-with-hugo/↩︎

  2. https://github.com/MaggieAppleton/digital-gardeners↩︎

  3. https://www.gwern.net/index↩︎

  4. Hakyll’s main advantage for me is relatively straightforward integration with the Pandoc Markdown libraries; Hakyll is not that easy to use, and so I do not recommend use of Hakyll as a general static site generator unless one is already adept with Haskell. https://www.gwern.net/About↩︎

  5. https://javran.github.io/posts/2014-03-01-add-tags-to-your-hakyll-blog.html)↩︎

  6. https://neuron.zettel.page/↩︎