Reputation: 201
I'm using RTD + Sphinx for my project ( redgrease = https://github.com/lyngon/redgrease ) and it seems like the syntax highlighting of code-blocks isn't working on the readthedocs.io page.
It only displays black text in a box.
E.g. see list item 3 at: https://redgrease.readthedocs.io/en/latest/intro.html#intro-redgrease
The syntax highlighting works fine when I build locally (with sphinx-build) as well as in VS Code using the reStructuredText plugin.
The code blocks are all indented (as they appear inside lists), similar to this:
#. :ref:`Server-side Redis commands <red_commands>`.
Allowing for ... blah blah ...
It is ... yada yada ...
.. code-block:: python
:emphasize-lines: 8, 11, 13
import redgrease
import redgrease.utils
# ... moar codes ..
What might be going on? Do i need some extension or add some config option? I don't have much trickery going on in the 'conf.py' nor '.readthedocs.yml'. (see repo)
Upvotes: 1
Views: 775
Reputation: 201
The reason was painfully simple.
I had by mistake pinned a really old version of 'sphinx-rtd-theme' in my 'requirements.txt' file.
I had pinned version 0.1.5 instead of the latest 0.5.1
My local env simply had a more recent version.
Doh! 🤦
Upvotes: 2