@@ -478,7 +478,7 @@ impl Renderer for HtmlHandlebars {
478
478
debug ! ( "Register handlebars helpers" ) ;
479
479
self . register_hbs_helpers ( & mut handlebars, & html_config) ;
480
480
481
- let mut data = make_data ( & ctx. root , & book, & ctx. config , & html_config) ?;
481
+ let mut data = make_data ( & ctx. root , & book, & ctx. config , & html_config, & theme ) ?;
482
482
483
483
// Print version
484
484
let mut print_content = String :: new ( ) ;
@@ -551,6 +551,7 @@ fn make_data(
551
551
book : & Book ,
552
552
config : & Config ,
553
553
html_config : & HtmlConfig ,
554
+ theme : & Theme ,
554
555
) -> Result < serde_json:: Map < String , serde_json:: Value > > {
555
556
trace ! ( "make_data" ) ;
556
557
@@ -567,6 +568,12 @@ fn make_data(
567
568
"description" . to_owned ( ) ,
568
569
json ! ( config. book. description. clone( ) . unwrap_or_default( ) ) ,
569
570
) ;
571
+ if theme. favicon_png . is_some ( ) {
572
+ data. insert ( "favicon_png" . to_owned ( ) , json ! ( "favicon.png" ) ) ;
573
+ }
574
+ if theme. favicon_svg . is_some ( ) {
575
+ data. insert ( "favicon_svg" . to_owned ( ) , json ! ( "favicon.svg" ) ) ;
576
+ }
570
577
if let Some ( ref livereload) = html_config. livereload_url {
571
578
data. insert ( "livereload" . to_owned ( ) , json ! ( livereload) ) ;
572
579
}
0 commit comments