Github Pages with Sphinx generated documentation not displaying HTML correctly

I fought with this for 9 hours before figuring out that the underscore in the _static folder was causing the issue.

You need to by pass Jekyll on github pages.

To do this, add an empty .nojekyll to your gh-pages branch. (See example)


I was having a similar issue and then found this, which solved it for me:

Python Sphinx css not working on github pages

Looks like using underscores for the _sources + _static folder caused the issues. Need to rename the folders and paths using them in the html files accordingly.