mirror of
https://github.com/containous/traefik.git
synced 2025-10-22 19:33:20 +03:00
Documentation Revamp
Co-authored-by: jbdoumenjou <jb.doumenjou@gmail.com>
This commit is contained in:
committed by
Traefiker Bot
parent
848e45c22c
commit
ac6b11037d
28
docs/scripts/verify.sh
Executable file
28
docs/scripts/verify.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH_TO_SITE="${1:-/app/site}"
|
||||
|
||||
set -eu
|
||||
|
||||
[ -d "${PATH_TO_SITE}" ]
|
||||
|
||||
NUMBER_OF_CPUS="$(grep -c processor /proc/cpuinfo)"
|
||||
|
||||
echo "=== Checking HTML content..."
|
||||
|
||||
# Search for all HTML files except the theme's partials
|
||||
# and pipe this to htmlproofer with parallel threads
|
||||
# (one htmlproofer per vCPU)
|
||||
find "${PATH_TO_SITE}" -type f -not -path "/app/site/theme/*" \
|
||||
-name "*.html" -print0 \
|
||||
| xargs -0 -r -P "${NUMBER_OF_CPUS}" -I '{}' \
|
||||
htmlproofer \
|
||||
--check-html \
|
||||
--check_external_hash \
|
||||
--alt_ignore="/traefik.logo.png/" \
|
||||
--http_status_ignore="0,500,501,503" \
|
||||
--url-ignore "/https://groups.google.com/a/traefik.io/forum/#!forum/security/,/localhost:/,/127.0.0.1:/,/fonts.gstatic.com/,/.minikube/,/github.com\/containous\/traefik\/*edit*/,/github.com\/containous\/traefik\/$/,/docs.traefik.io/" \
|
||||
'{}' 1>/dev/null
|
||||
## HTML-proofer options at https://github.com/gjtorikian/html-proofer#configuration
|
||||
|
||||
echo "= Documentation checked successfully."
|
Reference in New Issue
Block a user