LoginSignup
4
7

More than 5 years have passed since last update.

markdownファイルのリンク切れをチェックする

Posted at

ブログ記事や書籍を執筆するときにMarkdownを使うことが珍しいことではなくなりました。

チュートリアルなどを書くとき、図説をたくさん入れます。
最初はキレイに管理できるのですが、ページの構成を変更したり、後から画像を追加したりなどしていくうちに画像のリンク切れが頻発します。

そういう時に便利なツールがnpmにありました。

tcort/markdown-link-check: checks that all of the hyperlinks in a markdown text to determine if they are alive or dead

前提条件

  • コマンドラインツールがちょっと使えること
  • node.jsのインストール
  • npmのインストール

markdown-link-checkのインストール

npm install -g markdown-link-check

実行するとこんな風にインストールされます。

スクリーンショット 2018-05-09 10.26.01.png

Checkの仕方

markdown-link-check ファイル

とすればこんな風にチェックしてくれます。

スクリーンショット 2018-05-09 10.26.28.png

むっちゃ便利ー!

4
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
7