We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
記事内の URL を正規表現かなにかでマッチさせて、その URL のヘッダ情報のみを取得し、404 Not Found を検出する。
404 Not Found
ヘッダ情報のみを取得する理由は、単純に本文は要らないのと、本文も取得しようとするとリクエストに時間がかかるから。
スクリプトは bin ディレクトリでも作ってそこに置いておくのが良いだろう。
bin
ざっくりとした仕様は以下の通り。コマンド名は適当。
# 無引数の場合は全記事の内の全 URL をチェックする $ bin/check-broken-link # パスを引数として指定したらその記事内の URL のみをチェックする $ bin/check-broken-link articles/foo-bar-baz # 全 URL と HTTP ステータスコードを表示する # 200 OK などの URL も含めて、すべて表示する # これは記事内の URL を正規表現等で正しく抽出できるかの、いわばデバッグ用のオプション $ bin/check-broken-link --verbose
The text was updated successfully, but these errors were encountered:
No branches or pull requests
記事内の URL を正規表現かなにかでマッチさせて、その URL のヘッダ情報のみを取得し、
404 Not Found
を検出する。ヘッダ情報のみを取得する理由は、単純に本文は要らないのと、本文も取得しようとするとリクエストに時間がかかるから。
スクリプトは
bin
ディレクトリでも作ってそこに置いておくのが良いだろう。ざっくりとした仕様は以下の通り。コマンド名は適当。
The text was updated successfully, but these errors were encountered: