Gathering detailed insights and metrics for gatsby-remark-check-links
Gathering detailed insights and metrics for gatsby-remark-check-links
Gathering detailed insights and metrics for gatsby-remark-check-links
Gathering detailed insights and metrics for gatsby-remark-check-links
🕵️♀️ Detects broken links and heading hashes in markdown
npm install gatsby-remark-check-links
Typescript
Module System
Node Version
NPM Version
TypeScript (98.6%)
JavaScript (1.4%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11 Stars
73 Commits
4 Forks
25 Branches
1 Contributors
Updated on Jan 10, 2024
Latest Version
2.1.0
Package Id
gatsby-remark-check-links@2.1.0
Size
5.44 kB
NPM Version
6.10.3
Node Version
11.10.0
Published on
Oct 02, 2019
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A Gatbsy Remark plugin that detects broken links to pages and headings among your website's markdown pages. This is useful if your page slugs or heading IDs are being automatically generated. Heading IDs might be created by gatsby-remark-autolink-headers
, for example.
It will provide output about the broken links in the terminal when your site builds and as you make changes to pages. In production, your build will break if there are any broken links.
1$ npm install gatsby-remark-check-links
Add the plugin to your gatsby-transformer-remark
options or the remarkPlugins
key in the gatsby-plugin-mdx
options, if you're using that.
1// gatsby-config.js 2module.exports = { 3 plugins: [ 4 { 5 resolve: 'gatsby-transformer-remark', 6 options: { 7 plugins: [ 8 'gatsby-remark-autolink-headers', 9 'gatsby-remark-check-links' 10 ] 11 } 12 } 13 ] 14};
If broken links are found, you will see feedback in the console. If you stop seeing console output, you might need to clear your cache. The link checker console output should look something like this:
3 broken links found on /examples/react/
- /foo/bar/
- /intro/#some-hash
- /intro/#some-other-hash
⠀
2 broken links found on /intro/
- /foo/baz/
- /examples/ract/
⠀
5 broken links found
If you need to disable link checking for certain pages, you can supply options to the plugin. There are two options: ignore
and exceptions
, and while they both expect an array of paths, they work differently.
1// gatsby-config.js 2module.exports = { 3 plugins: [ 4 { 5 resolve: 'gatsby-transformer-remark', 6 options: { 7 plugins: [ 8 'gatsby-remark-autolink-headers', 9 { 10 resolve: 'gatsby-remark-check-links', 11 options: { 12 ignore: [ 13 '/foo/bar', 14 '/generated/docs/' 15 ], 16 exceptions: [ 17 '/bar/baz/', 18 '/dynamic/headings/' 19 ] 20 } 21 } 22 ] 23 } 24 } 25 ] 26};
ignore
Paths passed to ignore
will not have their content checked for broken links. This is useful if you have auto-generated pages where you're certain the links work, but it would be a nusance to correct their formatting every time a new set of pages is generated.
exceptions
Paths passed to exceptions
will ensure that any links from other pages to these paths or hashes within them will not count as broken. This is useful if the linked page is created programatically, or if the final rendered version of a markdown page contains headings that aren't available during the MDAST-transforming stage of the build (it could be using some fancy MDX component, for example.)
verbose
Disable logs and warnings in your console by passing false
to the verbose
option, which is true
by default.
Once a markdown page has been cached by Gatsby, you won't see any output about its broken links until the file changes or your cache gets cleared. If you want to see link check output for all files every time you run npm start
, you can set up a prestart
npm script that removes your Gatsby cache directory:
1{ 2 "scripts": { 3 "prestart": "gatsby clean" 4 } 5}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/19 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
157 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More