Skip to content

About

An internal utility GitHub workflow that checks for broken links in our documentation, public GitHub readmes, and our website.

Resources

Contributing

Stars

0 stars

Watchers

6 watching

Forks

Latest commit

 

History

131 Commits

Folders and files

Repository files navigation

Docs link checker

Warning

Note: Despite being public, this repository isn’t part of the Fingerprint product. It's an internal tool, shared "as-is" without any support guarantees from Fingerprint. Issue reports and pull requests are welcome, but responses are best-effort.

Most link checkers only do fetch requests and look at the HTTP status.

We need more:

  • Checking if link#anchor actually exists on the page by parsing the HTML
    • Falling back to a headless browser for client-rendered pages
  • Checking Github line links like Readme#L3-L5
  • Using GitHub API to check if the actual resource (issue, PR, etc.) exists instead of accepting a login wall or rate limit page.

What this repo checks

Every day at 03:17 UTC, on every push to main, and on a manual run, check links checks the three sources below and publishes the reports.

daily 03:17 UTC, push to main, manual
  docs.fingerprint.com
  fingerprintjs READMEs
  fingerprint.com
  reports
    GitHub Pages
    Actions artifacts, 30 days
  • docs.fingerprint.com. Every page from the sitemap. Report.
  • fingerprintjs READMEs. Public repositories that are still active. Report.
  • fingerprint.com. Links to docs.fingerprint.com, dev.fingerprint.com, fingerprint.com, and github.com. Report.

GitHub Pages updates when all three reports exist. If one report is missing, the previous site stays up. The job fails only when the checker crashes or is misconfigured. Workflow setup is in CONTRIBUTING.md.

CLI

Not on npm. Needs Node.js 24+. Run it from the directory you want to check.

npx "github:fingerprintjs/docs-link-checker#main" files "**/*.md"
# Website, from its sitemap
docs-link-checker site https://docs.fingerprint.com

# Public READMEs of a GitHub org (needs GH_TOKEN)
docs-link-checker github-org fingerprintjs

# Local markdown
docs-link-checker files "docs/**/*.md" README.md

# Absolute links in source code (JSX hrefs, strings, comments)
docs-link-checker files "src/**/*.tsx"

Options, baseline files, and reports: docs/cli.md.

GitHub Action

# .github/workflows/links.yaml
name: Check links
on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  links:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: fingerprintjs/docs-link-checker@main
        with:
          files: |
            README.md
            docs/**/*.md

@main gets every change. To control updates, pin a commit SHA instead: fingerprintjs/docs-link-checker@<sha>.

Inputs and outputs: docs/action.md.

Limitations

  • Website checks only cover pages in the sitemap. Pages left out of it are not checked. For example, Mintlify drops noindex pages from sitemap.xml, so the docs.fingerprint.com check skips the v3 docs.

About

An internal utility GitHub workflow that checks for broken links in our documentation, public GitHub readmes, and our website.

Resources

Contributing

Stars

0 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages