Skip to content

Commit

Permalink
add docs about link checker levels
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcz committed May 10, 2022
1 parent 902d52a commit 158980c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/content/documentation/content/linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ to link to. The path to the file starts from the `content` directory.

For example, linking to a file located at `content/pages/about.md` would be `[my link](@/pages/about.md)`.
You can still link to an anchor directly; `[my link](@/pages/about.md#example)` will work as expected.

By default, broken internal links are treated as errors. To treat them as warnings instead, visit the `[link_checker]` section of `config.toml` and set `internal_level = "warn"`. Note: treating broken links as warnings allows the site to be built with broken links intact, so a link such as `[my link](@/pages/whoops.md)` will be rendered to HTML as `<a href="@/pages/whoops.md">`.
6 changes: 6 additions & 0 deletions docs/content/documentation/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ skip_anchor_prefixes = [
"https://caniuse.com/",
]

# Treat internal link problems as either "error" or "warn", default is "error"
internal_level = "error"

# Treat external link problems as either "error" or "warn", default is "error"
external_level = "error"

# Various slugification strategies, see below for details
# Defaults to everything being a slug
[slugify]
Expand Down

0 comments on commit 158980c

Please sign in to comment.