use chapter title + book title as page title

This commit is contained in:
Gambhiro 2017-01-16 13:30:32 +00:00
parent ca40e71d1b
commit 4973c02554
2 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<html lang="{{ language }}"> <html lang="{{ language }}">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{{ title }}</title> <title>{{ page-title }}</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="{{ description }}"> <meta name="description" content="{{ description }}">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -63,7 +63,7 @@
{{#translation-links}}{{/translation-links}} {{#translation-links}}{{/translation-links}}
</div> </div>
<h1 class="menu-title">{{ title }}</h1> <h1 class="menu-title">{{ page-title }}</h1>
<div class="right-buttons"> <div class="right-buttons">
<i id="print-button" class="fa fa-print" title="Print this book"></i> <i id="print-button" class="fa fa-print" title="Print this book"></i>

View File

@ -355,7 +355,8 @@ fn make_data(book: &Book,
// Book data // Book data
data.insert("language".to_owned(), "en".to_json()); data.insert("language".to_owned(), "en".to_json());
data.insert("title".to_owned(), book.config.title.to_json()); data.insert("page-title".to_owned(), format!("{} - {}", chapter.title, book.config.title).to_json());
data.insert("chapter-title".to_owned(), chapter.title.to_json());
data.insert("description".to_owned(), book.config.description.to_json()); data.insert("description".to_owned(), book.config.description.to_json());
if let Some(ref x) = *livereload_script { if let Some(ref x) = *livereload_script {