Replies: 2 comments
-
Hi! This seems to be remarkjs/remark-validate-links#78.
That is indeed the problem: Gatsby has a particular URL transform for how it does websites. More on this can be found in the readme: https://github.com/remarkjs/remark-validate-links#when-should-i-use-this. It sounds like you are looking more for https://github.com/remarkjs/remark-lint-no-dead-urls. |
Beta Was this translation helpful? Give feedback.
-
Hi @wooorm, |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I am running the following npm script:
"test:links": remark src/pages --quiet --frail"
in a Gatsby based repo, with also:With
remark-validate-links
v12.x, links that pointed to files withinsrc/pages
could be written as absolute paths. For instance, given this folder structure:A link in
src/pages/guides/index.md
could be formed either as:[References](/references/index.md)
[References](../references/index.md)
I.e.,
src/pages
was implied. Starting from v13.x, absolute paths throw a warning. This is just a simple example, but with more complex folder structures, you're drowned in../../../..
, and as soon as I updated the package I got ~200 new warnings. Please note, Gatsby can manage both urls without a problem.I tried (unsuccessfully) to use
urlConfig
to get back to the old behavior, I'm wondering whether it's even possible.Thanks!
Davide
Beta Was this translation helpful? Give feedback.
All reactions