19

I just documented loads of my code and learnt how to use sphinx to generate the documentation. I want to include that into my GitHub project page but I do not know how to. Does anyone know existing tutorial or simple step to do so?

3 Answers 3

40

github will serve static content for you using their github pages feature. Essentially, you create a branch called gh-pages, into which you commit your static pages. The pages are then served at you.github.com/yourproject.

See the instructions at http://pages.github.com/.

You will likely run into an issue using Sphinx on github, because Sphinx uses directories with leading underscores. You can fix this by adding a file called .nojekyll in the the directory with the generated sphinx html.

Sign up to request clarification or add additional context in comments.

3 Comments

The link for the instructions is broken.
.nojekyll tip is life-saver. wish I had read this earlier. Further note: add it to the root of your html tree.
5

John Paulett's answer is obviously correct and likely sufficient for most users already (+1).

Alternatively you might want to check out Ben Welsh's thorough tutorial Sphinx documentation on GitHub, which provides step by step instructions as well as a convenient Fabric based script/task tying those together to get you started to Quickly publish documentation alongside your code [...] via a single command.

1 Comment

Sphinx documentation on GitHub said: you need to cre­ate an empty file in the root dir­ect­ory that lets Git­Hub know you aren’t us­ing Je­kyll to struc­ture your site.
0

github-tools has a feature doing exactly what you are asking for:

paver gh_pages_create gh_pages_build

Refer to the excellent documentation (of course using itself) for how to set it up for your project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.