archesproject / arches-docs

official repo for Arches documentation
https://arches.readthedocs.io
9 stars 21 forks source link

fix left nav menu style on RTD #258

Closed mradamcox closed 3 years ago

mradamcox commented 3 years ago

describe the issue

On Read the Docs (but not in local builds) the margins are off for headers in the left-hand navigation menu.

This:

2021-08-02_16-00-menu-issue

Should look like this:

2021-08-02_16-00-menu-issue-good

The underlying issue seems to be that the <p> elements in RTD aren't getting the caption class added to them, but they do in local builds. Most likely some environmental settings are to blame.

which release does this issue concern?

5.1 (stable) and latest. 5.0 and lower are fine.

mradamcox commented 3 years ago

I found this ticket on the sphinx_rtd_theme repo https://github.com/readthedocs/sphinx_rtd_theme/issues/1112 which discusses the underlying issue. To fix it I added a .readthedocs.yaml file to the latest branches (master and 5.1) of this repo, which tells RTD to use the requirements.txt file on deployment, and then pinned a later release of the RTD theme in there. These updates have fixed the issue.

mradamcox commented 3 years ago

This issue popped back up again today. Have solved it by pinning both Sphinx and sphinx_rtd_theme in requirements.

Sphinx==3.2.1
sphinx_rtd_theme==0.5.2

Previously I had used

Sphinx==3.2.1
sphinx_rtd_theme>=0.5.2

and it seems that > 0.5.2 rtd themes reintroduce these problems.

mradamcox commented 2 years ago

Issue appeared again, new pins are:

Sphinx==4.2.0
sphinx_rtd_theme==0.5.2
docutils==0.16