Merge branch 'main' of https://github.com/NLUUG/website
This commit is contained in:
commit
4473c78c09
25
scripts/check-all-links.sh
Executable file
25
scripts/check-all-links.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
if [ -f ./check-all-links.tmp ]; then rm ./check-all-links.tmp; fi
|
||||
|
||||
if [ -d ./public ]; then
|
||||
grep -ri --only-matching --no-filename "https://[a-zA-Z0-9]*\.\([a-z0-9\.\_/~-]\)*" ./public | grep "^http" | sed 's/\\n.*//g' | sort --unique > check-all-links.tmp
|
||||
for URL in $(cat ./check-all-links.tmp); do
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "${URL}")
|
||||
if [ ! "${HTTP_CODE}" = "200" ]; then
|
||||
echo "[WARNING] ${URL} (HTTP: ${HTTP_CODE})"
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
|
||||
else
|
||||
echo "Dit script dient gedraaid te worden in de hoofddirectory van de website."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f ./check-all-links.tmp ]; then rm ./check-all-links.tmp; fi
|
||||
|
||||
exit 0
|
||||
# EOF
|
7
scripts/check-canary.sh
Executable file
7
scripts/check-canary.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
grep -r '🐦' ./public
|
||||
|
||||
grep -ri 'placeholder' ./public
|
14
scripts/check-spelling.sh
Executable file
14
scripts/check-spelling.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
if [ -d ./public ]; then
|
||||
find ./public -name "*.html" -exec sed -e "s/<[^>]*>/ /g" {} + > plaintext.txt
|
||||
if [ -f plaintext.txt ]; then
|
||||
aspell --lang=nl check plaintext.txt
|
||||
fi
|
||||
else
|
||||
echo "Run from root directory of website project. Something like ./scripts/$0"
|
||||
fi
|
||||
|
||||
# EOF
|
|
@ -40,7 +40,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<small>Voor meer informatie {{ with .Site.GetPage "/website/" }}<a href="{{ .Permalink }}">{{ .Title | lower }}</a>{{ end }}, zie de {{ with .Site.GetPage "/website/sitemap" }}<a href="{{ .Permalink }}">{{ .Title | lower }}</a>{{ end }}, {{ with .Site.GetPage "/website/laatste-wijzigingen.rst" }}<a href="{{ .Permalink }}">{{ .Title | lower }}</a>{{ end }} en de {{ with .Site.GetPage "/website/stats-for-nerds" }}<a href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}</small>
|
||||
<small>Voor meer informatie {{ with .Site.GetPage "/website" }}<a href="{{ .Permalink }}">{{ .Title | lower }}</a>{{ end }}, zie de {{ with .Site.GetPage "/website/sitemap" }}<a href="{{ .Permalink }}">{{ .Title | lower }}</a>{{ end }}, {{ with .Site.GetPage "/website/laatste-wijzigingen" }}<a href="{{ .Permalink }}">{{ .Title | lower }}</a>{{ end }} en de {{ with .Site.GetPage "/website/stats-for-nerds" }}<a href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}</small>
|
||||
|
||||
{{ if .Site.IsServer }}
|
||||
<div style="background-color: yellow; border: 2px solid black; padding: 10px; margin-top: 20px;">
|
||||
|
|
Reference in a new issue