veenamj
veenamj

Reputation: 45

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).

Upvotes: 1

Views: 2809

Answers (2)

Steve Piercy
Steve Piercy

Reputation: 15055

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.

Upvotes: 1

Paebbels
Paebbels

Reputation: 16221

ReadTheDocs doesn't purge the build directory on every new build. I fixed it by manually cleaning all temporary files from ReadTheDocs:

  • all build directories
  • created content from autoapi plugins

After that, my modified RTD theme was used for new builds.

To do so I added a tag detection in conf.py. If my tag is set, it does a cleanup. You can set user defined tags in the ReadTheDocs web UI.

Upvotes: 0

Related Questions