Github

A website, documentation, or other information in github can be hosted on https://pages.github.com/.

See https://help.github.com/en/articles/about-github-pages.

Tip

Sphinx output HTML can be hosted on https://pages.github.com/.

https://sphinx-gallery.github.io/index.html is a good example.

Warning

For Sphinx generated html to render, an empty file called .nojekyll must be added to the root directory.

This tells GitHub Pages not to run the published files through Jekyll. This is important since Jekyll will discard any files that begin with _.

In the case of Sphinx, this would be the _images/ _sources/ _static/ directories!

Project Site Recipe

  1. Create project site as https://github.com/user/<repository>

  2. Clone repo

  3. Add .nojekyll empty file in <repository>. If you don’t do this, the html content will be viewable but without the CSS.

  4. Build Sphinx html

  5. Add output docs/build/* content to repo

  6. Push repo to remote: git push -u origin master

  7. view site on http://user.github.io/<repository>

Pushing to Multiple Git Repos

If a project needs to live in multiple remote repos e.g. Github, Bitbucket, then it is possible to push to these multiple repos at one time.

See https://gist.github.com/rvl/c3f156e117e22a25f242