diff options
author | Pauli Virtanen <pav@iki.fi> | 2013-07-24 18:43:41 +0300 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2013-07-25 14:58:05 +0300 |
commit | df2198336bf8a0e513ac8f32cddf8b10278520db (patch) | |
tree | 2997a46226b1400f4773f14ad6160d60c33718d9 /doc/source/conf.py | |
parent | 756dad2846b3ae531e6ebd94b6c0fe89b48f25c6 (diff) | |
download | numpy-df2198336bf8a0e513ac8f32cddf8b10278520db.tar.gz |
DOC: use the new scipy-sphinx-theme in the documentation
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r-- | doc/source/conf.py | 83 |
1 files changed, 34 insertions, 49 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 42e46c4f8..233f2e409 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -30,9 +30,6 @@ templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' -# The master toctree document. -#master_doc = 'index' - # General substitutions. project = 'NumPy' copyright = '2008-2009, The Scipy community' @@ -83,62 +80,50 @@ pygments_style = 'sphinx' # HTML output # ----------------------------------------------------------------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'scipy.css' - -# The name for this set of Sphinx documents. If None, it defaults to -# "<project> v<release> documentation". -html_title = "%s v%s Manual (DRAFT)" % (project, version) +themedir = os.path.join(os.pardir, 'scipy-sphinx-theme', '_theme') +if not os.path.isdir(themedir): + raise RuntimeError("Get the scipy-sphinx-theme first, " + "via git submodule init && git submodule update") + +html_theme = 'scipy' +html_theme_path = [themedir] + +if 'scipyorg' in tags: + # Build for the scipy.org website + html_theme_options = { + "edit_link": True, + "sidebar": "right", + "scipy_org_logo": True, + "rootlinks": [("http://scipy.org/", "Scipy.org"), + ("http://docs.scipy.org/", "Docs")] + } +else: + # Default build + html_theme_options = { + "edit_link": False, + "sidebar": "left", + "scipy_org_logo": False, + "rootlinks": [] + } + html_sidebars = {'index': 'indexsidebar.html'} -# The name of an image file (within the static path) to place at the top of -# the sidebar. -html_logo = 'scipyshiny_small.png' +html_additional_pages = { + 'index': 'indexcontent.html', +} -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". +html_title = "%s v%s Manual" % (project, version) html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. html_last_updated_fmt = '%b %d, %Y' -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'index': 'indexsidebar.html' -} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -html_additional_pages = { - 'index': 'indexcontent.html', -} - -# If false, no module index is generated. +html_use_modindex = True +html_copy_source = False html_domain_indices = False +html_file_suffix = '.html' -# If true, the reST sources are included in the HTML build as _sources/<name>. -#html_copy_source = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a <link> tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".html"). -#html_file_suffix = '.html' - -# Output file base name for HTML help builder. htmlhelp_basename = 'numpy' -# Pngmath should try to align formulas properly pngmath_use_preview = True +pngmath_dvipng_args = ['-gamma', '1.5', '-D', '96', '-bg', 'Transparent'] # ----------------------------------------------------------------------------- |