Skip to content

Commit

Permalink
Merge pull request #704 from axodotdev/fix_linkcheck_unix
Browse files Browse the repository at this point in the history
fix: linkcheck plugin on *nix
  • Loading branch information
mistydemeo authored Aug 8, 2024
2 parents 0044504 + 6245e0f commit 86b8b2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/site/mdbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,10 @@ pub fn build_mdbook(
///
/// Interesting things only happen when you run `.build()`
pub fn load_mdbook(book_dir: &Utf8Path) -> Result<MDBook> {
let md = MDBook::load(book_dir).map_err(|e| OrandaError::MdBookLoad {
path: book_dir.to_string(),
// An absolute path is necessary for plugins such as linkcheck to work.
let path = book_dir.canonicalize_utf8().unwrap_or(book_dir.to_owned());
let md = MDBook::load(&path).map_err(|e| OrandaError::MdBookLoad {
path: path.to_string(),
details: e,
})?;

Expand Down

0 comments on commit 86b8b2b

Please sign in to comment.