Skip to main content

Run the link checker

The documentation suite uses Linkspector as the link checker. Pull requests run Linkspector on the Markdown files changed in the pull request. A separate workflow checks the docs directory once a week and posts to Slack if that check fails.

Run locally​

Run Linkspector locally to view issues before pushing your changes to GitHub:

  1. Install Linkspector locally:

    npm install -g @umbrelladocs/linkspector
  2. Navigate into the documentation directory you want to check.

  3. Run Linkspector:

    linkspector check

Linkspector looks for a configuration file named .linkspector.yml in the current directory. If your site doesn't have this file, the local Linkspector check will use the default configuration, and the Linkspector GitHub action will fall back to the configuration file in Consensys-Incorporated/github-actions.

You can add or update the .linkspector.yml file in the root of your documentation site with specific configuration options. For example:

doc.din/.linkspector.yml
dirs:
- ./docs
excludedDirs:
- ./build
- ./.vercel
- ./.docusaurus
- ./node_modules
useGitIgnore: true

ignorePatterns:
- pattern: "^/img/"
- pattern: "^/static/"
- pattern: "^/llms\\.txt$"
- pattern: "^/llms-full\\.txt$"
- pattern: "^http(s)?://localhost"
- pattern: "^http(s)?://127.0.0.1"
- pattern: "^http(s)?://docs\\.eigencloud\\.xyz"

aliveStatusCodes:
- 200
- 201
- 204
- 206

Learn more about how to configure Linkspector.