Publishing a subset of Zettelkasten publicly

To publish a subset of Neuron Zettelkasten publicly,

  1. Mark zettels to publish by adding a slug metadata (specifies the URL slug)
  2. Use ripgrep and rsync to selectively copy those zettels to the public Zettelkasten
  3. Use git to review the changes, and deploy.

This is how I update an increasingly larger part of my website.

Here’s what such a script would look like:


#TODO: delete local files first
(cd $ZK && nix-shell -p ripgrep --run "rg -lU \"^---(\r)*\nslug: \" .") > /tmp/zkimport
rsync -zarv --files-from=/tmp/zkimport  $ZK/ ./

To consider

  • Automatically copy over linked static files