/gh-action-check-broken-links

A GitHub Action that checks for the presence of broken links

Primary LanguageTypeScriptMozilla Public License 2.0MPL-2.0

HashiCorp's Link Checker

C/I Status

A GitHub Action that reports all broken links found within a set of provided .mdx files

  • ⚠️ Currently only supports .mdx files
  • ⚠️ Assumes a Next.js project structure (i.e. links resolve from the /pages directory)

Features

Parses .mdx files, locating all links. Reports back any failed requests including those that contain a fragment identifier (i.e. https://example.com/page#identifier) but whose resulting markup does not.

Example Usage

- name: HashiCorp's Link Checker
  uses: hashicorp/gh-action-check-broken-links@v1
  with:
    baseUrl: 'https://hashicorp.com'
    files: 'pages/foo.mdx pages/bar.mdx'
    whitelist: |
      https://google.com/whitelist
      https://yahoo.com/whitelist