-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code formatting works locally but not on ReadTheDocs.org #4072
Comments
It seems duplicate of #4050 |
Yes, looks like the same issue. Workaround is to explicitly specify the version of sphinx_rtd_theme package I don't have any requirements.txt in my repository. There is one scant reference to it in the docs: Looks like I need to go to Advanced settings and enable build with virtualenv and specify the requirements.txt file there. My questions is: what are all dependencies of building RTD. Should these be enough? |
EDIT: This doesn't work. Not permanently at least. See my comment below. My issue is resolved. Steps for other folks:
Screenshots: |
Thank you, @amit1rrr, for both logging and resolving your issue! Glad you got it fixed. |
@RichardLitt I'm not sure that a thousand developers should do the same. I think it should be fixed on RTFD side. |
@ivankravets yeah, we didn't update the package on rtd because of a previous bug on the 0.3 version of the theme. But now that is fixed. |
After I followed those steps a couple of builds went fine and now I started seeing this error on RTD: And rightly so, because if we have selected to install a project inside virtual env with setup.py then we need to write our own setup.py :( I am not sure why it succeeded the first few times. Now spending time writing a setup.py to get my original issue of code formatting working is not worth it. @stsewd since the theme issue is fixed can of you update the package on rtd? |
I just made an attempt at simple setup.py that worked. Everyone shouldn't have to do all this to get syntax highlighting working for code blocks. Seems like an essential feature for any documentation system is broken in RTD. |
The default version of the readthedocs theme does not support code highlighting correctly so manually specify a compatible version as per readthedocs/readthedocs.org#4072
The default version of the readthedocs theme does not support code highlighting correctly so manually specify a compatible version as per readthedocs/readthedocs.org#4072
The default version of the readthedocs theme does not support code highlighting correctly so manually specify a compatible version as per readthedocs/readthedocs.org#4072
I can say that the |
@stsewd I just tried deselecting the I am terrified at inconsistent result of RTD builds with same configuration and same code. We should have an ability to replicate RTD build steps locally. |
That's weird, can you please try to wipe the environment before doing a build? You can do this on the |
Also, you can re-build your docs manually from the |
Worked fine after wiping. I think the sphinx_rtd_theme package would have got cached or something. Shouldn't |
Yes and no, I mean, the wipe feature is for doing a clean installation, that would be a waste of resources for rtd doing it on each build. This step is almost no need it, just in exceptional cases like this one. |
I'm not sure about that. I have had inconsistent results twice in my first 2 weeks with RTD (documented in this thread above). When there is nothing exceptional in my build/package/config. |
The default version of the readthedocs theme does not support code highlighting correctly so manually specify a compatible version as per readthedocs/readthedocs.org#4072
We can close this, as the original issue was solved. I think there is already a follow up by the rtd team to upgrade the theme on the rtd side. |
@stsewd I did “wipe” for docs.platformio.org and it still doesn’t work without a custom requirements.txt Should it work without extra steps as in the previous years? |
@ivankravets yes, you need a requirements file with the rtd_theme version that fixes the syntax. |
And as mention, rtd only needs to upgrade the default version of the theme and then you wouldn't need a requirements file. |
Do you have any ETA when you will have this fixed on your side? |
the follow up issue should be shared here for those interested |
@ivankravets @morenoh149 Please see this comment #4050 (comment) |
Probably within a week. We generally don't limit ourselves with strict timelines. |
that's odd, this issue and the one you shared say the issue is fixed. What would it take to get https://solidity.readthedocs.io/en/v0.4.23/solidity-by-example.html working? because the issue ethereum/solidity#4125 (comment) said to track this issue (this thread). |
Several issues noticed in logs of builds on RTD with inclusion of files in the tutorial. Also noticed that the syntax highlighting on RTD seemed broken compared to a local build. Fixed by adding a requirements.txt file. See following links for more: readthedocs/readthedocs.org#4050 readthedocs/readthedocs.org#4072
Details
Expected Result
I am expecting python code snippets to be syntax highlighted on ReadTheDocs.org. It's working fine locally where I have readthedocs theme installed. I am using code block. Here is the snippet example inside .rst file:
Screenshots attached.
Local Build.
On my hosted domain
The text was updated successfully, but these errors were encountered: