Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ The list of plugins:
— turn bolds, italics, and code into UTF 8 special characters
* 🟢 [`remark-validate-links`](https://github.com/remarkjs/remark-validate-links)
— check links to headings and files
* 🟢 [`remark-validate-relative-links`](https://github.com/webpro/remark-validate-relative-links)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this plugin from the readme, it looks like it does the same thing as https://github.com/remarkjs/remark-validate-links ?

ALso this doesn't appear to have types? Or be published to npm? Or have a CI/CD job testing it. All are things we look for in something to recommend to the community

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points!

So, I started out by using remark-validate-links. But wanted to include/validate only relative links. With "skipPathPatterns": ["^/"] I noticed it resolves everything to absolute paths so the result is that all links are excluded (there isn't really a way around this, right?). Also was looking for something simpler without the "did you mean.." output (auto-completion in the editor is enough for me). So it's very similar indeed but the difference is that it validates only relative links. No frills.

The plugin is published at https://www.npmjs.com/package/remark-validate-relative-links. There's some basic types, the plugin does not take options (yet?).

I'll add some tests right away.

— check links in local files and headings
* ⚠️ [`remark-variables`](https://github.com/mrzmmr/remark-variables)
— new syntax for variables
* 🟢 [`remark-vdom`](https://github.com/remarkjs/remark-vdom)
Expand Down