👀 Overview
- ローカル、グローバル問わず404チェックをしたい。
- GUIアプリはインストールしたくない
- 解析結果のファイルフォーマットは最低でも html,csv があればよい。
🚀 Usage
🐳 Docker-compose
# Repository clone
git pull https://github.com/WEBDIMENSION/docker_image_linkchecker.git linkchecker# envファイルコピー
cd linkchecker
cp .env.example .env# Edite .env
DIR_PATH=.
PROJECT_NAME=linkchecker
TARGET_URL=<<TARGET_URL>> # <- Your site address# docker-compose 実行
docker-compose run --rm linkchecker🐳 Docker
# Image pull
docker pull ghcr.io/webdimension/linkchecker
# Exec
docker run --rm \
-v /Users/your_name/CloudStation/workspace/projects/GitHub/linkchecker/src:/workspace/src \
-v /Users/your_name/CloudStation/workspace/projects/GitHub/linkchecker/output:/workspace/output \
--env-file /Users/your_name/CloudStation/workspace/projects/GitHub/linkchecker/.env \
--workdir="/workspace/src" \
--entrypoint "./linkchecker.sh" \
--name linkchecker ghcr.io/webdimension/linkchecker:latest📝 404チェック解析結果ファイル
output/repo/ 配下にファイルが生成される
⚠ Linkchecker 注意点
Gatsby,jsなどをローカルで404チェックを行う際は develop mode では正しい結果は帰ってこない。
product mode で立ち上げれば正常動作する。
linkchecker 解析結果フォーマット
# Format html
linkchecker -o text -Fhtml/report/linkchecker.report.html http://localhost# create sitemap
linkchecker -o text -Fsitemap/report/linkchecker.report.sitemap http://localhost# Format CSV
linkchecker --no-status -v -o text -Fcsv/report/linkchecker.report.csv http://localhost# Format SQL
linkchecker -o text -Fsql/report/linkchecker.report.sql http://loalhost# Format dotL
linkchecker -o text -Fdot/report/linkchecker.report.dot http://loalhost# Format failures
linkchecker -o text -Ffailures/report/linkchecker.report.failures http://loalhost