Skip to content

Commit

Permalink
Add Other Tools & Mega-Linter link (tcort#139)
Browse files Browse the repository at this point in the history
* Add Other Tools & Mega-Linter link
* fix code samples in readme
  • Loading branch information
nvuillam authored Nov 23, 2020
1 parent 955242f commit eb50343
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ alive (`200 OK`) or dead. `mailto:` links are validated with

To add the module to your project, run:

npm install --save-dev markdown-link-check
```shell
npm install --save-dev markdown-link-check
```

To install the command line tool globally, run:

npm install -g markdown-link-check
```shell
npm install -g markdown-link-check
```

---

Expand All @@ -24,14 +28,20 @@ Docker images are built with each release. Use the `stable` tag for the current

Add current directory with your `README.md` file as read only volume to `docker run`:

docker run -v ${PWD}:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/README.md
```shell
docker run -v ${PWD}:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/README.md
```

Alternatively, if you wish to target a specific release, images are tagged with semantic versions (i.e. `3`, `3.8`, `3.8.3`)

## Run in a GitHub action

Please head on to [github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check).

## Run in other tools

- [Mega-Linter](https://nvuillam.github.io/mega-linter/): Linters aggregator [including markdown-link-check](https://nvuillam.github.io/mega-linter/descriptors/markdown_markdown_link_check/)

## API

### markdownLinkCheck(markdown, [opts,] callback)
Expand Down Expand Up @@ -120,19 +130,25 @@ If not supplied, the tool reads from standard input.

#### Check links from a markdown file hosted on the web

markdown-link-check https://github.com/tcort/markdown-link-check/blob/master/README.md
```shell
markdown-link-check https://github.com/tcort/markdown-link-check/blob/master/README.md
```

#### Check links from a local markdown file

markdown-link-check ./README.md
```shell
markdown-link-check ./README.md
```

#### Check links from a local markdown folder (recursive)

find . -name \*.md -exec markdown-link-check {} \;
```shell
find . -name \*.md -exec markdown-link-check {} \;
```

#### Usage

```
```shell
Usage: markdown-link-check [options] [filenameOrUrl]

Options:
Expand Down Expand Up @@ -192,7 +208,9 @@ Options:

## Testing

npm test
```shell
npm test
```

## License

Expand Down

0 comments on commit eb50343

Please sign in to comment.