Skip to content

Zettelkasten-Method/zettelkasten.de

Repository files navigation

Zettelkasten Website

Development

Prerequisites

Install the Ruby dependencies to build the site:

# Make sure you have a recent Ruby Bundler
$ gem update bundler
# Install dependencies from Gemfile.lock
$ bundle install 

Preview

To get a live preview of your changes, compile and serve via:

$ bundle exec nanoc live
Listening for lib/ changes…
View the site at http://127.0.0.1:3000/
[2024-06-19 12:29:36] INFO  WEBrick 1.8.1
[2024-06-19 12:29:36] INFO  ruby 3.2.0 (2022-12-25) [arm64-darwin22]
[2024-06-19 12:29:36] INFO  WEBrick::HTTPServer#start: pid=38268 port=3000
Compiling site…

The locally served site is reachable from http://127.0.0.1:3000/ then.

To speed-up compilation, use nanoc's "focus" feature. The following will only recompile CSS files, images, and the landing page, reducing re-compilation times from 20s to <1s:

$ bundle exec nanoc live --focus "/css/*" --focus "/img/*" --focus "/index.html"

Note that the paths aren't file path, but nanoc Identifiers and Routes.