Creating a Static Website with Zim Wiki


Jump to menu

November 7, 2023


For a while, I've been messing around with Zim Wiki, a text editor which you can use to link together notes in a wiki-like format. Although I never really used it for heavy note-taking, I used plugins such as Journal (which creates daily notes similar to Obsidian MD's) to quickly write down ideas and dump notes and screenshots for work. However, one of Zim's more obscure features particularly piqued my interest: its static site generator.


Zim has an option to export a notebook to HTML, with the option to use HTML templates to configure the look of the webpage. With a combination of Zim's custom templating language and additional CSS, I can create simple and aesthetically pleasing static sites that look good on any device.


Why not use Jekyll, with its plethora of themes and much more flexible templating? I wanted to try something different; I've already built other sites with Jekyll before, plus I had a hard time getting the theme I wanted to work with GitHub Pages. Also, why write in annoying Markdown when you can use the superior Zim Wiki Editor?


I write posts for this blog using Zim, export to HTML using my custom template based on Eight-Five-Zero, and deploy to GitHub Pages. While Eight-Five-Zero is an excellent template, the sidebar does have issues on desktop, so I added a few tweaks to make my site look more clean.


Zim only allows you to have one template, so I had to use some hacks with conditional statements to make "unique" pages, such as the :blog and :index pages, which have a list of my posts. There are other limitations; the Zim templating language's index() function to get a list of pages returns an HTML unordered list instead of a Python list/dictionary, so I haven't figured out how to sort my posts by date, show their dates, or show post summaries yet.


Aside from fixing those issues, other plans include creating a search function and being able to filter posts with Zim tags, as shown below. If you want to try building a static site with Zim wiki, you can find my template here.


This is my first ever blog post, and I thought it was a good idea to make a little meta post about this site. Thanks for reading!


Tags: @web

Back to top