As a follow up of hard_link_static = true
which is a huge improvement for my setup. Thank you.
It allows me to publish a whole site without copying any content:
- Assemble the static content with symbolic links to selected directories in you project.
- Reconstruct the tree with hard links to files as leaves in
static
.
For the latter I use the attached script.
Here my suggestion: include the scripts functionality in Zola.
#!/bin/sh
# FROM_DIR must be in the same directory where `config.toml` is.
FROM_DIR="blog3/static-symlinks"
cd "$FROM_DIR"
# create directories
find -L -type d -not -name . -exec mkdir -p "../static/{}" \;
# populate them with hard links
find -L -type f -not -name . -exec ln -L "{}" "../static/{}" \;