Commit 91276151 authored by Nikita Titov's avatar Nikita Titov Committed by Guolin Ke
Browse files

build docs with latest sphinx (#1729)

parent 757586b2
...@@ -19,6 +19,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then ...@@ -19,6 +19,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then
if [[ $PYTHON_VERSION == "2.7" ]]; then if [[ $PYTHON_VERSION == "2.7" ]]; then
conda -y -n $CONDA_ENV mock conda -y -n $CONDA_ENV mock
fi fi
# sphinx >=1.8 is incompatible with rstcheck
conda install -y -n $CONDA_ENV "sphinx<1.8" "sphinx_rtd_theme>=0.3" # html5validator conda install -y -n $CONDA_ENV "sphinx<1.8" "sphinx_rtd_theme>=0.3" # html5validator
pip install rstcheck pip install rstcheck
# check reStructuredText formatting # check reStructuredText formatting
...@@ -27,6 +28,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then ...@@ -27,6 +28,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then
cd $BUILD_DIRECTORY/docs cd $BUILD_DIRECTORY/docs
rstcheck --report warning --ignore-directives=autoclass,autofunction `find . -type f -name "*.rst"` || exit -1 rstcheck --report warning --ignore-directives=autoclass,autofunction `find . -type f -name "*.rst"` || exit -1
# build docs and check them for broken links # build docs and check them for broken links
conda update -y -n $CONDA_ENV sphinx
make html || exit -1 make html || exit -1
find ./_build/html/ -type f -name '*.html' -exec \ find ./_build/html/ -type f -name '*.html' -exec \
sed -i'.bak' -e 's;\(\.\/[^.]*\.\)rst\([^[:space:]]*\);\1html\2;g' {} \; # emulate js function sed -i'.bak' -e 's;\(\.\/[^.]*\.\)rst\([^[:space:]]*\);\1html\2;g' {} \; # emulate js function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment