sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
524 stars 75 forks source link

sphinx-rtd-theme: no icons on Previous/Next buttons, and homelink as well #28

Closed bialix closed 3 years ago

bialix commented 9 years ago

If I simply open static html in the browser, I get normal icons as expected.

But when the same html served by your tool, there is no icons:

sphinx-rtd-theme-no-icons

C:\Python\2.7-32>python -m pip list alabaster (0.7.3) argh (0.26.1) Babel (1.3) backports.ssl-match-hostname (3.4.0.2) certifi (14.5.14) colorama (0.3.3) docutils (0.12) Jinja2 (2.7.3) livereload (2.3.2) MarkupSafe (0.23) pathtools (0.1.2) PIL (1.1.7) pip (6.1.1) pip-autoremove (0.9.0) Pygments (2.0.2) pytz (2015.2) PyYAML (3.11) setuptools (15.0) six (1.9.0) snowballstemmer (1.2.0) Sphinx (1.3.1) sphinx-autobuild (0.5.0) sphinx-rtd-theme (0.1.7) tornado (4.1) watchdog (0.8.3)

pradyunsg commented 3 years ago

I'm unable to reproduce this with the current Sphinx-RTD-theme:

git clone https://github.com/readthedocs/sphinx_rtd_theme/
pip install sphinx sphinx-autobuild sphinxcontrib-httpdomain ./sphinx_rtd_theme/
sphinx-autobuild --open-browser -b html -d /tmp/doctrees sphinx_rtd_theme/docs/ /tmp/html
Screenshot 2020-08-20 at 12 21 27 PM

I'll go ahead and close this eagerly since this is an extremely old issue and I'm not able to reproduce this.

FrostyX commented 3 years ago

Hello @pradyunsg, for what its worth, I just reproduced the issue with current Fedora packages.

pradyunsg commented 3 years ago

@FrostyX Could you please go ahead and file a new issue for this, providing reproduction steps and the output of the run + the failures?

FrostyX commented 3 years ago

@pradyunsg, I actually cannot see any failures even when using --debug. However, I was able to successfully pinpoint the issue. It seem, that the RTD theme is not compatible with FontAwesome 5. With version 4.7 it works fine.

As for reproducer, you can use my repo:

$ cd ~/git
$ git clone https://pagure.io/forks/frostyx/copr/copr.git
$ cd copr
$ git checkout doc-rtd-theme

If you run a docker container with F32, it works fine:

$ docker run -v ~/git/copr:/copr -it fedora:32 bash
[root@27e82c1ef746 /]# dnf install python3-sphinx python3-sphinx_rtd_theme make
[root@27e82c1ef746 /]# cd /copr/doc
[root@83a066b6eef2 doc]# make html

Icons get rendered properly because there is fontawesome-fonts-4.7.0-8.fc32.noarch and fontawesome-fonts-web-4.7.0-8.fc32.noarch in F32 by default. If you build a newer Font Awesome package, you will reproduce the issue.

$ mock -r fedora-32-x86_64 https://kojipkgs.fedoraproject.org//packages/fontawesome-fonts/5.13.1/2.fc33/src/fontawesome-fonts-5.13.1-2.fc33.src.rpm
$ docker cp /var/lib/mock/fedora-32-x86_64/result/fontawesome-fonts-5.13.1-2.fc32.noarch.rpm 83a066b6eef2:/
$ docker cp /var/lib/mock/fedora-32-x86_64/result/fontawesome-fonts-web-5.13.1-2.fc32.noarch.rpm 83a066b6eef2:/

Now install it in the container and rebuild the documentation

[root@83a066b6eef2 doc]# dnf install /fontawesome-fonts*-5.13.1-2.fc32.noarch.rpm
[root@83a066b6eef2 doc]# rm -rf _build
[root@83a066b6eef2 doc]# make html

Now, I am aware that out of the box it works fine, so you might not care. Building my documentation in a container is a good-enough workaround for me, so I am not blocked by this issue. What might be worth it though, is to check whether the current version of RTD theme is compatible and ready to be used with Font Awesome 5 (or newer) and potentially fixing it.