Skip to content

KaiSpencer/gh-action-check-broken-links

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Link Checker

Maintained fork of hashicorp/gh-action-check-broken-links, updated with modern tooling.

CI Status GitHub Release

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

  • ⚠️ Currently only supports .mdx files

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: MDX Broken Link Checker
  uses: KaiSpencer/gh-action-check-broken-links@v0
  with:
    # Required: The base URL to check links against
    # For example: /pages/foo.mdx will be checked against https://mysite.com/foo
    baseUrl: 'https://mysite.com'

    # Optional: Provide a list of files to check
    files: 'pages/foo.mdx pages/bar.mdx'
    
    # Optional: Provide a directory to check for files
    # Will recurse all sub directories
    directory: 'pages'

    # Optional: Provide a list of URLs to whitelist
    # These URLs will not be checked
    whitelist: |
      https://google.com/whitelist
      https://yahoo.com/whitelist

About

A GitHub Action that checks for the presence of broken links

Resources

License

Stars

Watchers

Forks

Packages

No packages published