trevorblades / gatsby-remark-check-links Goto Github PK
View Code? Open in Web Editor NEW๐ต๏ธโโ๏ธ Detects broken links and heading hashes in markdown
Home Page: https://gatsbyjs.org/packages/gatsby-remark-check-links/
License: MIT License
๐ต๏ธโโ๏ธ Detects broken links and heading hashes in markdown
Home Page: https://gatsbyjs.org/packages/gatsby-remark-check-links/
License: MIT License
This currently does not work with reference link.
[Broken link][]
[Broken link]: /foo
Plugin reports a broken link
Plugin does not report a broken link.
Create a new visitor for Definition nodes to test for those locations.
I have a markdown file link, when I build gatsby I want to link to a url but when I use github I want to link to another different prefix url because folder name is different to url name.
Example:
gatsby => ../docs/4.3/my-data/
github => ../guide/4.3/my-data/
Thanks
We have been using this plugin to check links successfully. And it's greatly appreciated. But we ran across an issue where builds work locally (even after gatsby clean
) and on branches (without cache), but then broken links break the build after the branch is merged. Any ideas on where the problem may be coming from?
Hi,
I'm building a blog in which I'm also embedding file downloads using the gatsby-remark-copy-linked-files
plugin. This plugin catches the relative links to the file [eenmanszaak-of-bv.xlsx](../../assets/eenmanszaak-of-bv.xlsx)
, copies the file to the public folder (/assets/
) and updates the link in html.
Now your plugin also catches these links and shows them as broken. I tried excluding the assets
folder but still all of them are shown as broken.
Folder structure:
|--content
| |--assets
| | |--welke-rechtsvorm.mdx
| |--eenmanszaak-of-bv.xlsx
| | |--welke-rechtsvorm.mdx
|--gatsby-config.js
gatsby-config.js
:
{
resolve: `gatsby-remark-copy-linked-files`,
options: {
destinationDir: `assets`,
ignoreFileExtensions: [`png`, `jpg`, `jpeg`, `bmp`, `tiff`],
},
},
{
resolve: 'gatsby-remark-check-links',
options: {
exceptions: [
'/assets/'
]
}
}
Console output:
warning 1 broken links found on /welke-rechtsvorm/
warning 63:114 ../../assets/eenmanszaak-of-bv.xlsx
Question:
Have I misconfigured the exceptions? Or is this a limitation of your plugin? If so can you add this functionality?
Currently this plug-in breaks the build, it would be great if the broken links are printed as a warning messages or there is a way to avoid breaking the build.
Thanks for this! Works great with gatsby-transformer-remark but not for gatsby-plugin-mdx.
It simply bails as soon as it gets to the .fields existence check (doesn't exist).
To repro:
npm init gatsby
[broken](/asdf)
options: {remarkPlugins: ['gatsby-remark-check-links']}
to your gatsby-config.js for the gatsby-plugin-mdx.I want to stop the build or develop is the error is found.
Example:
warn 2 broken links found on /4.2/
warn 727:236 ../../../docs/4.2/not-informed-data.html
warn 728:240 ../../../docs/4.2/malformed-data.html
but the build contine.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.