From e3a9a21c0284fa98a11f1d1d55f59eb4f4f6151c Mon Sep 17 00:00:00 2001 From: Michael Clayton Date: Tue, 10 May 2022 16:55:13 -0400 Subject: [PATCH] add docs about link checker levels --- docs/content/documentation/content/linking.md | 2 ++ docs/content/documentation/getting-started/configuration.md | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docs/content/documentation/content/linking.md b/docs/content/documentation/content/linking.md index a48857e0c8..03c84c8b80 100644 --- a/docs/content/documentation/content/linking.md +++ b/docs/content/documentation/content/linking.md @@ -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 ``. diff --git a/docs/content/documentation/getting-started/configuration.md b/docs/content/documentation/getting-started/configuration.md index 1ecc07c257..4ddaac2822 100644 --- a/docs/content/documentation/getting-started/configuration.md +++ b/docs/content/documentation/getting-started/configuration.md @@ -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]