I have been trying to publish a Sphinx generated documentation for our repository on Github pages with the theme provided by readthedocs.org.
After a few attempts I managed to get it online by uploading the Sphinx generated HTML files in the gh-pages branch of the repository.
Obtaining this:
https://takeqontrol.github.io/qontrol_api/
Which is looking awful, erasing all the customization of the theme by Read the Docs.
Here is an example of what you see if you open the link:
But if I open those HTML files on my computer the pages looks exactly how I wanted them to look. Here is an example of how exactly the same HTML looks locally:
Does anybody know what is going on? Or even point me somewhere where I can find an explanation?
All the code is available here: https://github.com/takeqontrol/qontrol_api in the two branches.
It's likely that your local project is mistakenly being seen as a GitHub Project page, but it's actually a User page on GitHub. This is then triggering the wrong template section to be included in your local environment.
To get your site working again you'll need to make sure your repository is set to public again, head to the repository settings page, make sure that GitHub Pages is enabled, then push a fresh commit to your repository.
Usage limitsPublished GitHub Pages sites may be no larger than 1 GB. GitHub Pages sites have a soft bandwidth limit of 100 GB per month. GitHub Pages sites have a soft limit of 10 builds per hour. This limit does not apply if you build and publish your site with a custom GitHub Actions workflow.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With