Resolve "/slug" to "/slug/index.md" or "/slug.md" #842
-
Hi there, I’m trying to use lychee to check links in the Markdown source of a documentation website. We use a static site generator that builds HTML pages based on that:
Links to other documentation pages look like this: [Getting Started](/docs/getting-started)
[Installation](/docs/getting-started/installation) Lychee fill detect the links in the example above as broken (even though they are actually working in the generated site). I think this behavior is actually quite common for many SSG/documentation tools, but it may be out of scope for Lychee to support this. But maybe there’s a more generic configuration option I’m missing that could be used to support this use case? A workaround I have considered is running lychee with the generated HTML output rather than the Markdown source, but I’d prefer not to do that if possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Another workaround that would work well in our case is to link to the actual Markdown files in the source and post-process the links in our build step -- we have to do some link transformations anyways. This works out of the box with lychee… [Getting Started](/docs/getting-started/index.md)
[Installation](/docs/getting-started/installation.md) |
Beta Was this translation helpful? Give feedback.
-
Oh, that was quick. Glad you found a workaround! I was about to point out that we got an Coming back to the actual problem, another way would be to use
We don't support capture groups yet, but we could add that if it helps. This would remap (rewrite) |
Beta Was this translation helpful? Give feedback.
Another workaround that would work well in our case is to link to the actual Markdown files in the source and post-process the links in our build step -- we have to do some link transformations anyways. This works out of the box with lychee…