mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-29 22:16:13 +02:00
Add initial a11y config for docs site (#1067)
This commit is contained in:
parent
b0b98d85fe
commit
57de3b7d81
5 changed files with 311 additions and 236 deletions
19
.circleci/pa11y.sh
Executable file
19
.circleci/pa11y.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/bash
|
||||
set +e
|
||||
|
||||
reports_dir="reports/pa11y"
|
||||
site_url="http://127.0.0.1:8000"
|
||||
exit_code=0
|
||||
|
||||
mkdocs build
|
||||
mkdir -p "$reports_dir"
|
||||
|
||||
printf -- 'scanning: /\n'
|
||||
./node_modules/.bin/pa11y "$site_url" --reporter junit > "$reports_dir/root.xml" || exit_code=2
|
||||
|
||||
for file in $(xq '.urlset.url[].loc' site/sitemap.xml -r | sed -r 's!https://jrnl.sh/(.*?)/$!\1!'); do
|
||||
printf -- 'scanning: /%s\n' "$file"
|
||||
./node_modules/.bin/pa11y "$site_url/$file" --reporter junit > "$reports_dir/$file.xml" || exit_code=2
|
||||
done
|
||||
|
||||
exit $exit_code
|
Loading…
Add table
Add a link
Reference in a new issue