@@ -1,7 +1,7 @@
1−# remark-validate-links [](https://travis-ci.org/wooorm/remark-validate-links) [](https://codecov.io/github/wooorm/remark-validate-links)
1+# remark-validate-links [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
3−[**remark**](https://github.com/wooorm/remark) plug-in to validate if links to
3+[**remark**][remark] plug-in to validate if links to headings and files
4−headings and files in markdown point to existing things.
4+in markdown point to existing things.
6For example, this document does not have a heading named `Hello`. So if I
6For example, this document does not have a heading named `Hello`. So if I
7link to that (`[welcome](#hello)`), this plug-in will warn about it.
7link to that (`[welcome](#hello)`), this plug-in will warn about it.
@@ -25,7 +25,7 @@ is fine.
26## Installation
26## Installation
28−[npm](https://docs.npmjs.com/cli/install):
28+[npm][npm-install]:
31npm install remark-validate-links
31npm install remark-validate-links
@@ -33,9 +33,9 @@ npm install remark-validate-links
34## Command line
34## Command line
36−
36+![Example of how remark-validate-links looks on screen][screenshot]
38−Use **remark-validate-links** together with [**remark**](https://github.com/wooorm/remark):
38+Use **remark-validate-links** together with [**remark**][remark]:
41npm install --global remark remark-validate-links
41npm install --global remark remark-validate-links
@@ -76,9 +76,9 @@ This plug-in is **not** available on the API of remark.
76## Configuration
76## Configuration
78You can pass a `repository`, containing anything `package.json`s
78You can pass a `repository`, containing anything `package.json`s
79−[`repository`](https://docs.npmjs.com/files/package.json#repository) can
79+[`repository`][package-repository] can handle. If this is omitted,
80−handle. If this is omitted, **remark-validate-links** will try
80+**remark-validate-links** will try the `package.json` in your
81−the `package.json` in your current working directory.
81+current working directory.
84remark --use 'validate-links=repository:"foo/bar"' example.md
84remark --use 'validate-links=repository:"foo/bar"' example.md
@@ -88,15 +88,12 @@ When a repository is given or detected, links to GitHub are normalized
88to the file-system. E.g., `https://github.com/foo/bar/blob/master/example.md`
88to the file-system. E.g., `https://github.com/foo/bar/blob/master/example.md`
89becomes `example.md`.
89becomes `example.md`.
91−You can define this repository in `.remarkrc` or `package.json` [files](https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md)
91+You can define this repository in `.remarkrc` or `package.json`
92−too. An example `.remarkrc` file could look as follows:
92+[files][remarkrc] too. An example `.remarkrc` file could look as follows:
96 "plugins": {
96 "plugins": {
100 "validate-links": {
97 "validate-links": {
101 "repository": "foo/bar"
98 "repository": "foo/bar"
@@ -120,13 +117,37 @@ several properties on nodes:
121## Related
118## Related
123−* [`remark-lint`](https://github.com/wooorm/remark-lint)
120+* [`wooorm/remark-lint`][remark-lint]
124 — Markdown code style linter.
121 — Markdown code style linter.
126## License
123## License
128−[MIT](LICENSE) © [Titus Wormer](http://wooorm.com)
125+[MIT][license] © [Titus Wormer][author]
130<!-- Definitions -->
127<!-- Definitions -->
129+[travis-badge]: https://img.shields.io/travis/wooorm/remark-validate-links.svg
131+[travis]: https://travis-ci.org/wooorm/remark-validate-links
133+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/remark-validate-links.svg
135+[codecov]: https://codecov.io/github/wooorm/remark-validate-links
137+[npm-install]: https://docs.npmjs.com/cli/install
141+[author]: http://wooorm.com
143+[remark]: https://github.com/wooorm/remark
145+[remark-lint]: https://github.com/wooorm/remark-lint
132[remark-html]: https://github.com/wooorm/remark-html
147[remark-html]: https://github.com/wooorm/remark-html
149+[screenshot]: https://cdn.rawgit.com/wooorm/remark-validate-links/master/screenshot.png
151+[package-repository]: https://docs.npmjs.com/files/package.json#repository
153+[remarkrc]: https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md