File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ fn update_index(
6868 Ok ( ( ) )
6969}
7070
71- fn process_book ( path : & str , books_dir : & PathBuf , shelf_url : & PathBuf ) -> Result < BookContext > {
71+ fn process_book ( path : & str , books_dir : & PathBuf , shelf_url : & str ) -> Result < BookContext > {
7272 let book_dir = path. try_resolve ( ) ?;
7373 let book_dir = std:: fs:: canonicalize ( book_dir) ?;
7474 let mut book = MDBook :: load ( book_dir) ?;
@@ -112,9 +112,8 @@ pub fn execute(_args: &ArgMatches) -> Result<()> {
112112 } else {
113113 "" . to_owned ( )
114114 } ;
115- let shelf_url = PathBuf :: from ( format ! (
116- "{shelf_url_prefix}/{shelf_book_dir}/{shelf_build_dir}/{INDEX_HTML_FILE}"
117- ) ) ;
115+ let shelf_url =
116+ format ! ( "{shelf_url_prefix}/{shelf_book_dir}/{shelf_build_dir}/{INDEX_HTML_FILE}" ) ;
118117
119118 let mut index_file_name = shelf_book. source_dir ( ) ;
120119 index_file_name. push ( INDEX_MD_FILE ) ;
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ pub struct BookConfig {
416416 pub text_direction : Option < TextDirection > ,
417417 /// Indicates if the book is part of a bookshelf
418418 /// and how to return to the index of the shelf if so
419- pub shelf_url : Option < PathBuf > ,
419+ pub shelf_url : Option < String > ,
420420}
421421
422422impl Default for BookConfig {
You can’t perform that action at this time.
0 commit comments