git.iko.soy/typeable/remark-validate-links
on main help sign in
Refactor `readme.md`
c2fd1aeTitus Wormer
readme.md+37−16
@@ -1,7 +1,7 @@
1−# remark-validate-links [![Build Status](https://img.shields.io/travis/wooorm/remark-validate-links.svg)](https://travis-ci.org/wooorm/remark-validate-links) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/remark-validate-links.svg)](https://codecov.io/github/wooorm/remark-validate-links)
1+# remark-validate-links [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
2
2
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.
5
5
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.
25
25
26## Installation
26## Installation
27
27
28−[npm](https://docs.npmjs.com/cli/install):
28+[npm][npm-install]:
29
29
30```bash
30```bash
31npm install remark-validate-links
31npm install remark-validate-links
@@ -33,9 +33,9 @@ npm install remark-validate-links
33
33
34## Command line
34## Command line
35
35
36−![Example of how remark-validate-links looks on screen](https://cdn.rawgit.com/wooorm/remark-validate-links/master/screenshot.png)
36+![Example of how remark-validate-links looks on screen][screenshot]
37
37
38−Use **remark-validate-links** together with [**remark**](https://github.com/wooorm/remark):
38+Use **remark-validate-links** together with [**remark**][remark]:
39
39
40```bash
40```bash
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
77
77
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.
82
82
83```bash
83```bash
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`.
90
90
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:
93
93
94```json
94```json
95{
95{
96 "plugins": {
96 "plugins": {
97− "slug": {
98− "library": "github"
99− },
100 "validate-links": {
97 "validate-links": {
101 "repository": "foo/bar"
98 "repository": "foo/bar"
102 }
99 }
@@ -120,13 +117,37 @@ several properties on nodes:
120
117
121## Related
118## Related
122
119
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.
125
122
126## License
123## License
127
124
128−[MIT](LICENSE) © [Titus Wormer](http://wooorm.com)
125+[MIT][license] © [Titus Wormer][author]
129
126
130<!-- Definitions -->
127<!-- Definitions -->
131
128
129+[travis-badge]: https://img.shields.io/travis/wooorm/remark-validate-links.svg
130+
131+[travis]: https://travis-ci.org/wooorm/remark-validate-links
132+
133+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/remark-validate-links.svg
134+
135+[codecov]: https://codecov.io/github/wooorm/remark-validate-links
136+
137+[npm-install]: https://docs.npmjs.com/cli/install
138+
139+[license]: LICENSE
140+
141+[author]: http://wooorm.com
142+
143+[remark]: https://github.com/wooorm/remark
144+
145+[remark-lint]: https://github.com/wooorm/remark-lint
146+
132[remark-html]: https://github.com/wooorm/remark-html
147[remark-html]: https://github.com/wooorm/remark-html
148+
149+[screenshot]: https://cdn.rawgit.com/wooorm/remark-validate-links/master/screenshot.png
150+
151+[package-repository]: https://docs.npmjs.com/files/package.json#repository
152+
153+[remarkrc]: https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md