From ad0377ab84e02c19eda9ed48c8ed1eac603d30a0 Mon Sep 17 00:00:00 2001 From: randogoth Date: Sat, 7 Feb 2026 20:58:27 +0200 Subject: [PATCH] Build pelican sites without publishconf --- modules/services/static-sites/default.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/modules/services/static-sites/default.nix b/modules/services/static-sites/default.nix index 18f4fd1..e30adc4 100644 --- a/modules/services/static-sites/default.nix +++ b/modules/services/static-sites/default.nix @@ -22,17 +22,11 @@ let runHook preBuild cd ${workdir} ${copyPlugins} - conf="" - if [ -f publishconf.py ]; then - conf="publishconf.py" - elif [ -f pelicanconf.py ]; then - conf="pelicanconf.py" - fi - if [ -n "$conf" ]; then - ${pythonEnv}/bin/pelican content -o "$out" -s "$conf" - else - ${pythonEnv}/bin/pelican content -o "$out" + if [ -d content ]; then + # Drop draft content before building (Pelican draft detection can be inconsistent). + grep -RIl '^status:[[:space:]]*draft' content | xargs -r rm -f fi + ${pythonEnv}/bin/pelican content -o "$out" runHook postBuild ''; installPhase = "true";