Sphinxdoc and ReadTheDocs theme tricks

| 0 comments

0.00 avg. rating (0% score) - 0 votes

logo_readthedocs

I’ll talk about things that may frustrate you with Sphinxdoc and ReadTheDocs. ReadTheDocs has a beautiful theme and you certainly want to use it with Sphinxdoc. However the size of the main text may be too small for you. Or you noticed that when you try to generate a version locally you’ll see it works like a charm but when it’s compiled on Readthedocs, it will fail.

Here is a solution on how to make it work both locally and on Readthedocs:

You may noticed that I’m overriding here CSS files with a custom theme_overrides.css file. This to have a larger width for the main text, here is the css content:

The problem with Readthedocs is when you’re doing that, you’ll loose default CSS. That’s why I recall the official CSS themes as well. To see the result, you can check MySecureShell documentation.

Hope this will help you.

Author: Deimos

I'm a passionate DevOps. I love transmit my skills and I love working on high availability infrastructures/technologies.

Laisser une réponse