Search code examples
themespython-sphinxread-the-docs

sphinx_rtd_theme is not getting applied on the ReadTheDocs builds but local builds work fine


I am facing a strange problem. I added latest sphinx_rtd_theme files on to my project and did the required theme overrides (including the well-known text wrapping within the tables).

The local build works absolutely fine. But it was pushed to the master, the theme goes back to very basic and it is not getting applied. I tried manual builds but still I could not trace the root cause and the workaround.

By master, I mean the builds that are created on the ReadTheDocs website (account).


Solution

  • According to your RTD Versions, "latest" points to the master branch of your project's documentation. I looked at the source of conf.py on the master branch, and it is set to the theme ra. So whatever you are doing locally is not getting pushed up to the same branch that RTD uses to build docs.

    Before you do anything else, make sure that any changes you make locally, push up to your organization repo, and that RTD pulls from to build the docs are all on the same branch.

    Once you get that sorted, and assuming you want to use rtd_sphinx_theme both on RTD and locally, and that you also want other developers to be able to reproduce the docs, then follow the sphinx_rtd_theme installation via package method.