diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 66572d04..f417a014 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -45,6 +45,12 @@ impl HtmlHandlebars { ctx.html_config.curly_quotes, Some(&path), ); + if !ctx.is_index { + // Add page break between chapters + // See https://developer.mozilla.org/en-US/docs/Web/CSS/break-before and https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before + // Add both two CSS properties because of the compatibility issue + print_content.push_str(r#"
"#); + } print_content.push_str(&fixed_content); // Update the context with data for this file