add debug class to body when serving, not just in debug mode

This commit is contained in:
zyl 2024-11-08 23:24:24 -08:00
parent e339bb20ea
commit 4cb4e036b6
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs

View file

@ -165,9 +165,10 @@ impl SiteBuilder {
let mut rewriter = HtmlRewriter::new(
Settings {
element_content_handlers: vec![
#[cfg(debug_assertions)]
element!("body", |el| {
el.set_attribute("class", "debug")?;
if self.serving {
el.set_attribute("class", "debug")?;
}
Ok(())
}),
element!("head", |el| {