Skip to content

Check for broken links #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pintergreg opened this issue Nov 13, 2024 · 1 comment
Open

Check for broken links #39

pintergreg opened this issue Nov 13, 2024 · 1 comment

Comments

@pintergreg
Copy link
Owner

pintergreg commented Nov 13, 2024

https://github.com/Michael-F-Bryan/mdbook-linkcheck

@pintergreg
Copy link
Owner Author

pintergreg commented Nov 13, 2024

possible config, expecting the the CI script donwloads and extracts the binary as in the case of mdbook itself

[output.linkcheck]
command = "./mdbook-linkcheck"
# Should we check links on the internet? Enabling this option adds a
# non-negligible performance impact
follow-web-links = true

# Are we allowed to link to files outside of the book's root directory? This
# may help prevent linking to sensitive files (e.g. "../../../../etc/shadow")
traverse-parent-directories = false

# If necessary, you can exclude one or more links from being checked with a
# list of regular expressions. The regex will be applied to the link href (i.e.
# the `./index.html` in `[some page](./index.html)`) so it can be used to
# ignore both web and filesystem links.
#
# Hint: you can use TOML's raw strings (single quote) to avoid needing to
# escape things twice.
exclude = [ 'google\.com' ]

# The User-Agent to use when sending web requests
user-agent = "mdbook-linkcheck-0.4.0"

cache-timeout = 604800 # seconds; week

# How should warnings be treated?
#
# - "warn" will emit warning messages
# - "error" treats all warnings as errors, failing the linkcheck
# - "ignore" will ignore warnings, suppressing diagnostic messages and allowing
#   the linkcheck to continuing
warning-policy = "warn"
wget -qO mdbook-linkcheck.zip https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip
unzip mdbook-linkcheck.zip
chmod +x mdbook-linkcheck

issues

  • only the CI script copies the presentations to the book folder, so every link from HOME.md appears as an issue
  • no junix xml (or any other structured) output

pintergreg added a commit that referenced this issue Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant