Skip to content

Commit

Permalink
Merge pull request JuliaLang#2379 from pao/topic/2123
Browse files Browse the repository at this point in the history
Move Sphinx plugins and format to Python package
  • Loading branch information
pao committed May 31, 2013
2 parents a9f61ce + 8af6759 commit edddc81
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 970 deletions.
1 change: 0 additions & 1 deletion doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
_build/
_themes/julia/static/jquery.js
58 changes: 23 additions & 35 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

JQUERYDEST = _themes/julia/static/jquery.js
JQUERYURL = https://code.jquery.com/jquery-latest.js
WGET = $(abspath ../deps)/jldownload

.PHONY: help clean clean-jquery cleanall get-jquery html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \
.PHONY: help clean cleanall html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \
epub latex latexpdf text man changes linkcheck doctest gettext listpkg

help:
Expand Down Expand Up @@ -48,50 +44,42 @@ help:

clean:
-rm -rf $(BUILDDIR)/*
-rm -f sphinx/*.pyc

clean-jquery:
-rm -f $(JQUERYDEST)

cleanall: clean clean-jquery

get-jquery: $(JQUERYDEST)

$(JQUERYDEST):
$(WGET) $@ $(JQUERYURL)
juliadoc-pkg:
pip install --user --upgrade -r requirements.txt

html: get-jquery
html: juliadoc-pkg
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml: get-jquery
dirhtml: juliadoc-pkg
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml: get-jquery
singlehtml: juliadoc-pkg
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
pickle: juliadoc-pkg
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
json: juliadoc-pkg
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp: get-jquery
htmlhelp: juliadoc-pkg
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp: get-jquery
qthelp: juliadoc-pkg
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
Expand All @@ -100,7 +88,7 @@ qthelp: get-jquery
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/JuliaLanguage.qhc"

devhelp:
devhelp: juliadoc-pkg
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
Expand All @@ -109,69 +97,69 @@ devhelp:
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/JuliaLanguage"
@echo "# devhelp"

epub:
epub: juliadoc-pkg
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
latex: juliadoc-pkg
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
latexpdf: juliadoc-pkg
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
text: juliadoc-pkg
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
man: juliadoc-pkg
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
texinfo: juliadoc-pkg
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
info: juliadoc-pkg
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
gettext: juliadoc-pkg
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
changes: juliadoc-pkg
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
linkcheck: juliadoc-pkg
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
doctest: juliadoc-pkg
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

helpdb.jl: stdlib/*.rst sphinx/jlhelp.py sphinx/julia.py
helpdb.jl: stdlib/*.rst juliadoc-pkg
$(SPHINXBUILD) -b jlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/jlhelp
mv $(BUILDDIR)/jlhelp/jlhelp.jl helpdb.jl

Expand Down
8 changes: 5 additions & 3 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ File layout

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

Sphinx extensions and theme
---------------------------
The extensions to Sphinx and the theme are in the
https://github.com/JuliaLang/JuliaDoc repository, and can also be used to style
package documentation.
17 changes: 17 additions & 0 deletions doc/_templates/sidebarintro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<p class="logo">
<img alt="Julia" src="//d1qchgnwtps1zh.cloudfront.net/julia_logo.png">
</p>

<h3>Other formats</h3>
<ul>
<li><a href="//media.readthedocs.org/pdf/julia/latest/julia.pdf">as PDF</a></li>
<li><a href="//media.readthedocs.org/pdf/julia/latest/julia.epub">as ePub</a></li>
<li><a href="//media.readthedocs.org/pdf/julia/latest/julia.zip">as zipped HTML</a></li>
</ul>

<h3>Translations</h3>
<ul>
<li><a href="//julia-zh-cn.readthedocs.org/">简体中文</a></li>
<li><a href="//julia-pt-br.readthedocs.org/">Português brasileiro</a></li>
<li><a href="//julia-es-la.readthedocs.org/">Español latino</a></li>
</ul>
64 changes: 0 additions & 64 deletions doc/_themes/julia/layout.html

This file was deleted.

15 changes: 0 additions & 15 deletions doc/_themes/julia/localtoc.html

This file was deleted.

22 changes: 0 additions & 22 deletions doc/_themes/julia/searchbox.html

This file was deleted.

Loading

0 comments on commit edddc81

Please sign in to comment.