Skip to content

Commit

Permalink
Update htmlproofer.sh script to not bark at warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Nov 17, 2024
1 parent f55f97c commit 86030f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions htmlproofer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rm -rf build
# Build API docs
mkdir -p build/html
pushd build/html
git clone https://github.com/ros-planning/moveit2 -b $MOVEIT_BRANCH --depth 1
git clone https://github.com/moveit/moveit2 -b $MOVEIT_BRANCH --depth 1
pushd moveit2
sed -i "s/HTML_EXTRA_STYLESHEET =.*/HTML_EXTRA_STYLESHEET = ..\/..\/..\/theme.css/g" Doxyfile
DOXYGEN_OUTPUT_DIRECTORY="../api" doxygen
Expand All @@ -30,19 +30,21 @@ rm -rf moveit2
popd

# Test build with non-ROS wrapped Sphinx command to allow warnings and errors to be caught
sphinx-build -W -b html . build/html
# TODO: Re-add the -W flag so that all warnings are treated as errors.
sphinx-build -b html . build/html

# Replace Edit on Github links with local file paths
grep -rl 'https:\/\/github.com\/ros-planning\/moveit2_tutorials\/blob\/main\/' ./build/ | \
xargs sed -i "s|https://github.com/ros-planning/moveit2_tutorials/blob/main/|file://$PWD|g"
grep -rl 'https:\/\/github.com\/moveit\/moveit2_tutorials\/blob\/main\/' ./build/ | \
xargs sed -i "s|https://github.com/moveit/moveit2_tutorials/blob/main/|file://$PWD|g"

# Replace internal links with local file paths
grep -rl 'https:\/\/moveit.picknik.ai\/humble\/' ./build/ | \
xargs sed -i "s|https://moveit.picknik.ai/humble/|file://$PWD|g"

# Run HTML tests on generated build output to check for 404 errors, etc
# 429 or 403 - happens when GitHub rate-limits requests
htmlproofer ./build \
--only-4xx --check-html --http-status-ignore "429" \
--only-4xx --check-html --http-status-ignore "429" --http-status-ignore "403" \
--file-ignore ./build/html/genindex.html,./build/html/search.html,/html/api/ \
--alt-ignore '/.*/' --url-ignore '#'

Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pip
docutils==0.18.1
docutils
sphinx>=5.0.0
sphinx-tabs==3.4.4
sphinx-tabs
sphinx-multiversion
sphinx-rtd-theme
sphinx-copybutton
sphinxcontrib-doxylink
sphinxcontrib-doxylink@git+https://github.com/sea-bass/doxylink.git@fix-parse-tag-file

0 comments on commit 86030f2

Please sign in to comment.