diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 73b97211c..9cf1ce1f5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,3 +14,6 @@ build: # - /usr/bin/rsync -a --mkpath docs/_build/ $READTHEDOCS_OUTPUT/ - mkdir -p $READTHEDOCS_OUTPUT - cp -a docs/_build/* $READTHEDOCS_OUTPUT/ + # Black magic to make symlinks of `.html` files recursively + # https://stackoverflow.com/a/65833364/22352077 + - find $READTHEDOCS_OUTPUT/html -type f -iname "*.html" -exec sh -c 'ln -s $(basename "$1") $(dirname "$1")/$(basename "$1" .html)' sh {} \';\'