Skip to content

Commit 2d66a93

Browse files
committed
updated docs for sphinx-0.6. Actually requires a patch to sphinx-0.6.1,
patch submitted upstream.
1 parent 0c47386 commit 2d66a93

7 files changed

Lines changed: 56 additions & 99 deletions

File tree

doc/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ build/generate-stamp: $(wildcard source/reference/*.rst)
101101
touch build/generate-stamp
102102

103103
html: generate
104-
mkdir -p build/html build/doctrees
105-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
104+
$(SPHINXBUILD) -t html -b html $(ALLSPHINXOPTS) build/html
106105
$(PYTHON) postprocess.py html build/html/*.html
107106
@echo
108107
@echo "Build finished. The HTML pages are in build/html."
@@ -129,8 +128,7 @@ htmlhelp-build: htmlhelp build/htmlhelp/numpy.chm
129128
-hhc.exe $^
130129

131130
latex: generate
132-
mkdir -p build/latex build/doctrees
133-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
131+
$(SPHINXBUILD) -t latex -b latex $(ALLSPHINXOPTS) build/latex
134132
$(PYTHON) postprocess.py tex build/latex/*.tex
135133
perl -pi -e 's/\t(latex.*|pdflatex) (.*)/\t-$$1 -interaction batchmode $$2/' build/latex/Makefile
136134
@echo

doc/source/conf.py

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
# Add any Sphinx extension module names here, as strings. They can be extensions
2525
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
26-
extensions = ['sphinx.ext.pngmath', 'sphinx.ext.autodoc', 'only_directives',
26+
extensions = ['sphinx.ext.pngmath', 'sphinx.ext.autodoc',
2727
'ipython_console_highlighting', 'plot_directive', 'numpydoc',
2828
'docscrape', 'docscrape_sphinx', 'autosummary']
2929

@@ -59,6 +59,13 @@
5959
# Else, today_fmt is used as the format for a strftime call.
6060
today_fmt = '%B %d, %Y'
6161

62+
# List of directories, relative to source directory, that shouldn't be searched
63+
# for source files.
64+
exclude_trees = ['_build']
65+
66+
# The reST default role (used for this markup: `text`) to use for all documents.
67+
#default_role = None
68+
6269
# List of documents that shouldn't be included in the build.
6370
#unused_docs = []
6471

@@ -74,7 +81,10 @@
7481
#show_authors = False
7582

7683
# The name of the Pygments (syntax highlighting) style to use.
77-
pygments_style = 'friendly'
84+
pygments_style = 'sphinx'
85+
86+
# A list of ignored prefixes for module index sorting.
87+
#modindex_common_prefix = []
7888

7989

8090
# Options for HTML output
@@ -83,7 +93,31 @@
8393
# The style sheet to use for HTML and HTML Help pages. A file of that name
8494
# must exist either in Sphinx' static/ path, or in one of the custom paths
8595
# given in html_static_path.
86-
html_style = 'sphinxdoc.css'
96+
html_theme = 'sphinxdoc'
97+
98+
# Theme options are theme-specific and customize the look and feel of a theme
99+
# further. For a list of options available for each theme, see the
100+
# documentation.
101+
#html_theme_options = {}
102+
103+
# Add any paths that contain custom themes here, relative to this directory.
104+
#html_theme_path = []
105+
106+
# The name for this set of Sphinx documents. If None, it defaults to
107+
# "<project> v<release> documentation".
108+
#html_title = None
109+
110+
# A shorter title for the navigation bar. Default is the same as html_title.
111+
#html_short_title = None
112+
113+
# The name of an image file (relative to this directory) to place at the top
114+
# of the sidebar.
115+
#html_logo = None
116+
117+
# The name of an image file (within the static path) to use as favicon of the
118+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
119+
# pixels large.
120+
#html_favicon = None
87121

88122
# Add any paths that contain custom static files (such as style sheets) here,
89123
# relative to this directory. They are copied after the builtin static files,
@@ -105,6 +139,18 @@
105139
# template names.
106140
html_additional_pages = {'index': 'index.html'}
107141

142+
# If false, no module index is generated.
143+
#html_use_modindex = True
144+
145+
# If false, no index is generated.
146+
#html_use_index = True
147+
148+
# If true, the index is split into individual pages for each letter.
149+
#html_split_index = False
150+
151+
# If true, links to the reST sources are added to the pages.
152+
#html_show_sourcelink = True
153+
108154
# If true, an OpenSearch description file will be output, and all pages will
109155
# contain a <link> tag referring to it.
110156
html_use_opensearch = 'False'
@@ -133,7 +179,7 @@
133179
#latex_logo = '_static/sphinx.png'
134180

135181
# Additional stuff for the LaTeX preamble.
136-
latex_elements = {'fontpkg': '\\usepackage{pslatex}'}
182+
latex_preamble = {'fontpkg': '\\usepackage{pslatex}'}
137183

138184
# Documents to append as an appendix to all manuals.
139185
latex_appendices = []

doc/source/contents.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
.. htmlonly::
2+
.. only:: html
33

44
:Release: |version|
55
:Date: |today|

doc/sphinxext/autosummary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
from docutils.statemachine import ViewList
5757
from docutils import nodes
5858

59-
import sphinx.addnodes, sphinx.roles, sphinx.builder
59+
import sphinx.addnodes, sphinx.roles
6060
from sphinx.util import patfilter
6161

6262
from docscrape_sphinx import get_doc_object

doc/sphinxext/numpydoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
3737
v = dict(full_name="%s.%s" % (obj.__module__, obj.__name__))
3838
else:
3939
v = dict(full_name=obj.__name__)
40-
lines += ['', '.. htmlonly::', '']
40+
lines += ['', '.. only:: html', '']
4141
lines += [' %s' % x for x in
4242
(app.config.numpydoc_edit_link % v).split("\n")]
4343

doc/sphinxext/only_directives.py

Lines changed: 0 additions & 87 deletions
This file was deleted.

doc/sphinxext/plot_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def makefig(code, code_path, output_dir, output_base, config):
259259
TEMPLATE = """
260260
{{source_code}}
261261
262-
.. htmlonly::
262+
.. only:: html
263263
264264
{% if source_code %}
265265
(`Source code <{{source_link}}>`__)

0 commit comments

Comments
 (0)