Description: Use local web resources instead of remote ones Author: Matthijs van Otterdijk Author: Ximin Luo Bug: https://github.com/azerupi/mdBook/issues/271 Comment: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase the patch on top of a newer version. . Make sure the paths here match the ones in debian/rust-doc.links --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -321,6 +321,15 @@ println!("`#{}` pointing to `{}`", fragment, pretty_path.display()); }; } + } else if fs::symlink_metadata(&path).is_ok() { + let target = fs::read_link(&path).unwrap(); + if target.starts_with("/usr/share") { + // broken symlink to /usr/share, ok for our Debian build + return; + } + *errors = true; + print!("{}:{}: broken link - ", path.display(), i + 1); + println!("{}", path.display()); } else { let pretty_path = path.strip_prefix(root).unwrap_or(&path); if !is_exception(file, pretty_path.to_str().unwrap()) { --- a/vendor/mdbook/src/theme/index.hbs +++ b/vendor/mdbook/src/theme/index.hbs @@ -34,10 +34,7 @@ {{/if}} - - {{#if copy_fonts}} - - {{/if}} + @@ -51,7 +48,7 @@ {{#if mathjax_support}} - + {{/if}} @@ -61,46 +58,6 @@ var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}"; - - - - - - - - -