Skip to content

Commit

Permalink
DOC: use the new scipy-sphinx-theme in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pv committed Jul 25, 2013
1 parent 756dad2 commit df21983
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 240 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "doc/scipy-sphinx-theme"]
path = doc/scipy-sphinx-theme
url = https://github.com/scipy/scipy-sphinx-theme.git
1 change: 1 addition & 0 deletions doc/scipy-sphinx-theme
Submodule scipy-sphinx-theme added at 65c59f
189 changes: 0 additions & 189 deletions doc/source/_static/scipy.css

This file was deleted.

1 change: 0 additions & 1 deletion doc/source/_templates/indexsidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<h3>Resources</h3>
<ul>
<li><a href="http://scipy.org/">Scipy.org website</a></li>
<li>&nbsp;</li>
</ul>
5 changes: 4 additions & 1 deletion doc/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% extends "!layout.html" %}

{% block rootrellink %}
<li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li>
{% if pagename != 'index' %}
<li class="active"><a href="{{ pathto('index') }}">{{ shorttitle|e }}</a></li>
{% endif %}
{% endblock %}

{% block sidebarsearch %}
Expand Down
83 changes: 34 additions & 49 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
# 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'
Expand Down Expand Up @@ -83,62 +80,50 @@
# 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']


# -----------------------------------------------------------------------------
Expand Down
Binary file removed doc/source/scipyshiny_small.png
Binary file not shown.

0 comments on commit df21983

Please sign in to comment.