Julia's documentation is written in reStructuredText, a good reference for which is the Documenting Python chapter of the Python Developer's Guide.
The documentation is built using Sphinx and LaTeX. On ubuntu, you'll need the following packages installed:
python-sphinx
texlive
texlive-latex-extra
Then run
$ make helpdb.jl
$ make html
$ make latexpdf
conf.py Sphinx configuration
helpdb.jl REPL help database
sphinx/ Sphinx extensions and plugins
sphinx/jlhelp.py Sphinx plugin to build helpdb.jl
stdlib/ Julia standard library documentation
_themes/ Sphinx html themes