From bf930dd84ba8f9013fa83752d130e2fc833462c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Thu, 26 Feb 2026 14:12:17 +0100 Subject: [PATCH] fix: hash plugins config to trigger page rebuilds (#387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timothée Mazzucotelli --- crates/zensical/src/config/project.rs | 2 ++ python/zensical/config.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/crates/zensical/src/config/project.rs b/crates/zensical/src/config/project.rs index 2a59dfe..1cd7eb5 100644 --- a/crates/zensical/src/config/project.rs +++ b/crates/zensical/src/config/project.rs @@ -91,6 +91,8 @@ pub struct Project { pub nav: Vec, /// Template hash. pub template_hash: u64, + /// Plugins hash. + pub plugins_hash: u64, /// Source files. pub source_files: Vec<(PathBuf, u64)>, } diff --git a/python/zensical/config.py b/python/zensical/config.py index a534529..83dbb5f 100644 --- a/python/zensical/config.py +++ b/python/zensical/config.py @@ -455,6 +455,14 @@ def _apply_defaults(config: dict, path: str) -> dict: # Hash all templates, so we rebuild if something changes config["template_hash"] = _hash(_list_templates(config)) + + # Hash the entire plugins configuration. + # This is a special case for plugins because we currently only source + # the plugin configuration that we support in Rust, + # which means config on other plugins doesn't contribute to the hash, + # in turn not triggering full rebuilds. + config["plugins_hash"] = _hash(config["plugins"]) + return config