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