mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-05-09 18:16:43 -07:00
add debug class to body when serving
This commit is contained in:
parent
25c0fe81a1
commit
b43bcb8a7e
1 changed files with 4 additions and 0 deletions
|
@ -135,6 +135,10 @@ impl<'a> SiteBuilder<'a> {
|
||||||
let mut rewriter = HtmlRewriter::new(
|
let mut rewriter = HtmlRewriter::new(
|
||||||
Settings {
|
Settings {
|
||||||
element_content_handlers: vec![
|
element_content_handlers: vec![
|
||||||
|
element!("body", |el| {
|
||||||
|
el.set_attribute("class", "debug")?;
|
||||||
|
Ok(())
|
||||||
|
}),
|
||||||
element!("head", |el| {
|
element!("head", |el| {
|
||||||
el.prepend(r#"<meta charset="utf-8">"#, ContentType::Html);
|
el.prepend(r#"<meta charset="utf-8">"#, ContentType::Html);
|
||||||
if self.serving {
|
if self.serving {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue