16π
Iβve used sphinx/githubpages to document one of my python projects. I found this blog post very helpful. Hereβs an example of my working docs directory.
Adding a .nojekyll file in the docs directory will fix the issue. This tells github pages not to publish the files through jekyll. With this, you wonβt need to change any directory names and it should work with "_" prefixes.
6π
TL;DR
Add a .nojekyll
file to the toplevel directory of your repository (source).
In contrast to previous answers, the .nojekyll
file has to be on the toplevel β even if you serve your page from docs/
.
Background:
Github pages uses jekyll by default.
When jekyll generates a site, files whose name starts with an underscore are not included in the destination (source, bottom).
This is why they are not served by github pages as long as you are lacking a .nojekyll
(to disable jekyll processing).
- How to test a Django model with pytest?
- Trouble with Django sending email though smtp.gmail.com
- Is it possible to disable django related_name for a specific field?
1π
There is a sphinx extension for github pages: sphinx.ext.githubpages
Appending this to the list of extensions
in the Sphinxβs config file docs/conf.py
should do the trick.
...
extensions = [
...,
"sphinx.ext.githubpages",
]
...
- Django override the form HTML label template?
- Can't pip install mysql-python
- Django: JSON Notifications using Redis PubSub, Node.js & Socket.io
- What is the right way to use angular2 http requests with Django CSRF protection?
- How do I extend the Django "login" form?
0π
I was doing the same thing; the issue is with the underscore in the folder name. The underscore means to ignore the folder.
I used sed
to modify it.
- How should I be implementing user SSO with AAD in a Django application (using the Django Microsoft Authentication Backend module)?
- Why do I get a "auth_user does not exist"error when running "migrate" on a newly created django project with "registration redux" app installed?
- How to append pages of data using jQuery and Django pagination?
- Django test client does not automatically serialize factories
0π
For me the issue was I used the Read the Docs theme and added it as the HTML theme:
html_theme = "sphinx_rtd_theme"
but I forgot to include it in the extensions:
extensions = [
...
"sphinx_rtd_theme",
]
and import it:
import sphinx_rtd_theme
I was able to figure this out by looking at the console error messages and seeing what the issue was:
- Find django/contrib/admin/templates
- Django + virtualenv + gunicorn β No module named django.core.wsgi?