Publishing a subset of Zettelkasten publicly
To publish a subset of Neuron Zettelkasten publicly,
- Mark zettels to publish by adding a
slug
metadata (specifies the URL slug) - Use
ripgrep
andrsync
to selectively copy those zettels to the public Zettelkasten - Use
git
to review the changes, and deploy.
This is how I update an increasingly larger part of my srid.ca website.
Here’s what such a script would look like:
ZK=$HOME/Documents/zk
#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