diff --git a/readme.md b/readme.md index 608b34b..6898801 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ -# 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) +# remark-validate-links [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] -[**remark**](https://github.com/wooorm/remark) plug-in to validate if links to -headings and files in markdown point to existing things. +[**remark**][remark] plug-in to validate if links to headings and files +in markdown point to existing things. For example, this document does not have a heading named `Hello`. So if I link to that (`[welcome](#hello)`), this plug-in will warn about it. @@ -25,7 +25,7 @@ is fine. ## Installation -[npm](https://docs.npmjs.com/cli/install): +[npm][npm-install]: ```bash npm install remark-validate-links @@ -33,9 +33,9 @@ npm install remark-validate-links ## Command line -![Example of how remark-validate-links looks on screen](https://cdn.rawgit.com/wooorm/remark-validate-links/master/screenshot.png) +![Example of how remark-validate-links looks on screen][screenshot] -Use **remark-validate-links** together with [**remark**](https://github.com/wooorm/remark): +Use **remark-validate-links** together with [**remark**][remark]: ```bash npm install --global remark remark-validate-links @@ -76,9 +76,9 @@ This plug-in is **not** available on the API of remark. ## Configuration You can pass a `repository`, containing anything `package.json`s -[`repository`](https://docs.npmjs.com/files/package.json#repository) can -handle. If this is omitted, **remark-validate-links** will try -the `package.json` in your current working directory. +[`repository`][package-repository] can handle. If this is omitted, +**remark-validate-links** will try the `package.json` in your +current working directory. ```bash remark --use 'validate-links=repository:"foo/bar"' example.md @@ -88,15 +88,12 @@ When a repository is given or detected, links to GitHub are normalized to the file-system. E.g., `https://github.com/foo/bar/blob/master/example.md` becomes `example.md`. -You can define this repository in `.remarkrc` or `package.json` [files](https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md) -too. An example `.remarkrc` file could look as follows: +You can define this repository in `.remarkrc` or `package.json` +[files][remarkrc] too. An example `.remarkrc` file could look as follows: ```json { "plugins": { - "slug": { - "library": "github" - }, "validate-links": { "repository": "foo/bar" } @@ -120,13 +117,37 @@ several properties on nodes: ## Related -* [`remark-lint`](https://github.com/wooorm/remark-lint) +* [`wooorm/remark-lint`][remark-lint] — Markdown code style linter. ## License -[MIT](LICENSE) © [Titus Wormer](http://wooorm.com) +[MIT][license] © [Titus Wormer][author] +[travis-badge]: https://img.shields.io/travis/wooorm/remark-validate-links.svg + +[travis]: https://travis-ci.org/wooorm/remark-validate-links + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/remark-validate-links.svg + +[codecov]: https://codecov.io/github/wooorm/remark-validate-links + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[remark]: https://github.com/wooorm/remark + +[remark-lint]: https://github.com/wooorm/remark-lint + [remark-html]: https://github.com/wooorm/remark-html + +[screenshot]: https://cdn.rawgit.com/wooorm/remark-validate-links/master/screenshot.png + +[package-repository]: https://docs.npmjs.com/files/package.json#repository + +[remarkrc]: https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md