Fix the print title that was using the title from the last rendered chapter. Fixes #414
This commit is contained in:
parent
2f3c14d609
commit
0a4a2b66da
|
@ -207,6 +207,9 @@ impl HtmlHandlebars {
|
|||
|
||||
/// Update the context with data for this file
|
||||
fn configure_print_version(&self, data: &mut serde_json::Map<String, serde_json::Value>, print_content: &str) {
|
||||
// Make sure that the Print chapter does not display the title from
|
||||
// the last rendered chapter by removing it from its context
|
||||
data.remove("chapter_title");
|
||||
data.insert("path".to_owned(), json!("print.md"));
|
||||
data.insert("content".to_owned(), json!(print_content));
|
||||
data.insert("path_to_root".to_owned(), json!(utils::fs::path_to_root(Path::new("print.md"))));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="{{ language }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ chapter_title }} - {{ title }}</title>
|
||||
<title>{{ chapter_title }} {{#if chapter_title }}-{{/if}} {{ title }}</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<meta name="description" content="{{ description }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
Loading…
Reference in New Issue