-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Detect and Fix Broken Links? #10
Comments
However, I've found a couple of packages that may tackle this issue:
Let me give these a whirl. |
I've been trying a couple of options: https://github.com/ckastbjerg/next-type-safe-routesUsing https://github.com/ckastbjerg/next-type-safe-routes was my first attempt. However, this attempt was not successful. On my first attempt to get it to work, I was met with a lot of errors. However, even with these, the routes were not being properly validated. And there was no discernable way of actually linting the links at build time/running on dev mode. In addition to this, it seemed that https://github.com/triyanox/next-routesCame across this one on Reddit and seemed promising. However, having tried to incorporate this into our So unfortunately, this was a dud :( https://github.com/contentlayerdev/contentlayer
I thought of using Note tcort/markdown-link-check#216 states that So, I set out to integrate After setting all of the necessary imports, files and configuration to the demo, when trying to run Generated 11 documents in .contentlayer
TypeError: The "code" argument must be of type number. Received an instance of Object
at process.set [as exitCode] (node:internal/bootstrap/node:123:9)
at Cli.runExit (/Users/lucho/Documents/dwyl/nextra-demo/node_modules/.pnpm/[email protected][email protected]/node_modules/clipanion/lib/advanced/Cli.js:232:26)
at run (file:///Users/lucho/Documents/dwyl/nextra-demo/node_modules/.pnpm/@[email protected][email protected]/node_modules/@contentlayer/cli/src/index.ts:39:3)
at main (/Users/lucho/Documents/dwyl/nextra-demo/node_modules/.pnpm/[email protected][email protected]/node_modules/contentlayer/bin/cli.cjs:5:3) {
code: 'ERR_INVALID_ARG_TYPE'
} The files are actually being generated. But the error cumbersomely still pops up. So I found out about the issue contentlayerdev/contentlayer#495, where the error seemed to be related with the Looking over the issues in the repo, I came across contentlayerdev/contentlayer#429 (comment). Apparently, After migrating, I'm trying to run the Going to try and move over this hurdle. |
Hmm, I almost got it working with the combination of |
@LuchoTurtle thanks very much for taking a deep dive into this. 🙏 Keen to see what you have to do to get this working. 👍 Edit: for complete clarity: keep going on this for now. |
Since moving to
Nextra
many of the internal links in our docs are broken ... 💔 😢One thing that
Docusaurus
gave us out-of-the-box was checking links. 🦕 📜We need to investigate if
Nextra
has the feature to check all links in a page and confirm they work. 🔗 👍Todo
Nextra
has a built-in way to check internal links to confirm they aren't404
. 📥If there is an easy way to check the internal links please share and implement on this
demo
with instructions. 📝 🙏Please add comments for your searches and pages you read along the way so others don't have to waste the same time. ⏳
The text was updated successfully, but these errors were encountered: