linkChecker section to configure automated link checking for your portal.
Add it to the top level of the
siteConfig.yaml file and specify supported configuration options inside it.
Depending on the configuration, the link checker can:
- validate internal references (links to pages in your portal),
- check whether external links are valid and using HTTPS,
- check if image links are correct and warn about missing images,
- ignore specific links and skip entire directories during the check,
- skip broken canonical links,
- check favicons, meta refresh tags, and more.
When configured, the link checker runs after the portal build. Depending on the severity setting, it can either allow (
severity: warning) or prevent (
severity: error) the build from being deployed. By default, the severity is set to
warning, which means you will get warnings about detected issues in the link checker output, but you'll still be able to deploy the portal.
For Developer portal projects hosted in Redocly Workflows, you can access the output in the Broken link checker tab on the Build page for the selected portal build.
The Checks step in the status indicator refers to the link checker. If any issues are detected, it displays the status as failed, and either prevents or allows portal publishing based on severity configuration.
When the link checker is not configured for your portal (the
linkChecker section is not present in
siteConfig.yaml), the Checks step is skipped in the portal build entirely. In this case, the Broken link checker tab is visible, but doesn't contain any output.
If your Developer portal project was created from a GitHub source, you will see link checker status as one of the checks on your pull requests.
For Developer portal projects hosted on premise, you can install the optional
@redocly/htmltest package with the following command:
By default, the link checker output is saved into the
All supported configuration options can be used in Workflows and on-premise.
||Enables the link checker and controls its sensitivity. Supported values are:
||Specifies the behavior of the link checker, and enables or disables various link checking functionalities. Refer to the full list of supported options in
By default, the Developer portal uses the following settings from the internal
htmltest configuration file:
DirectoryPath: "public" IgnoreDirectoryMissingTrailingSlash: true IgnoreAltMissing: true
You can override these settings in the
linkChecker > options section of your
meta: title: Example Developer Portal description: Learn how to work with Example APIs linkChecker: severity: error options: DirectoryPath: "public" EnforceHTTPS: true CheckExternal: false IgnoreURLs: - "example.com"