Skip to content

Commit

Permalink
Follow shelf build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Coi-l committed Mar 26, 2024
1 parent d2ca6e3 commit 24c3c8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmd/shelf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ pub fn execute(_args: &ArgMatches) -> Result<()> {
let _ = std::fs::remove_dir_all(REPOS_DIR);
let shelf_book = MDBook::init(SHELF_DIR).create_gitignore(false).build()?;
let shelf_source = shelf_book.source_dir();
let shelf_url = PathBuf::from(format!("../../{SHELF_DIR}/book/{INDEX_HTML_FILE}"));
let shelf_build_dir = shelf_book.config.build.build_dir.to_str().unwrap_or("book");
let shelf_url = PathBuf::from(format!(
"../../{SHELF_DIR}/{shelf_build_dir}/{INDEX_HTML_FILE}"
));

let mut index_file_name = shelf_book.source_dir();
index_file_name.push(INDEX_MD_FILE);
Expand Down

0 comments on commit 24c3c8a

Please sign in to comment.