mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
7cb89be1fa
@ -9,3 +9,5 @@ recursive-include sphinx_rtd_theme *.svg
|
||||
recursive-include sphinx_rtd_theme *.ttf
|
||||
recursive-include sphinx_rtd_theme *.woff
|
||||
recursive-include sphinx_rtd_theme *.woff2
|
||||
recursive-include tests *.py
|
||||
recursive-include tests *.rst
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sphinx-rtd-theme",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"homepage": "https://github.com/rtfd/sphinx_rtd_theme",
|
||||
"authors": [
|
||||
"Dave Snider, Read the Docs, Inc. & contributors <dev@readthedocs.org>"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
*********
|
||||
Changelog
|
||||
*********
|
||||
@ -6,11 +5,22 @@ Changelog
|
||||
master
|
||||
======
|
||||
|
||||
:Date: TBD
|
||||
|
||||
New Features
|
||||
-------------
|
||||
|
||||
Fixes
|
||||
-----
|
||||
|
||||
Other Changes
|
||||
--------------
|
||||
|
||||
0.4.3
|
||||
======
|
||||
|
||||
:Date: Feb 12, 2019
|
||||
|
||||
New Features
|
||||
-------------
|
||||
|
||||
Fixes
|
||||
-----
|
||||
@ -18,12 +28,12 @@ Fixes
|
||||
* Fix scrolling to active item in sidebar on load (#214)
|
||||
* Style caption link for code and literal blocks
|
||||
* Fix inconsistent font size and line height for autodoc "raises" and "returns" (#267)
|
||||
* Fix last_updated notice appearing in same line as copyright notice (#704)
|
||||
|
||||
|
||||
Other Changes
|
||||
--------------
|
||||
|
||||
|
||||
v0.4.2
|
||||
======
|
||||
|
||||
|
260
docs/conf.py
260
docs/conf.py
@ -1,37 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Sphinx RTD theme demo documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Nov 3 11:56:36 2013.
|
||||
#
|
||||
# This file is executed with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
import re
|
||||
|
||||
sys.path.append(os.path.abspath('..'))
|
||||
sys.path.append(os.path.abspath('./demo/'))
|
||||
|
||||
from sphinx.locale import _
|
||||
|
||||
from sphinx_rtd_theme import __version__
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
project = u'Read the Docs Sphinx Theme'
|
||||
slug = re.sub(r'\W+', '-', project.lower())
|
||||
version = __version__
|
||||
release = __version__
|
||||
author = u'Dave Snider, Read the Docs, Inc. & contributors'
|
||||
copyright = author
|
||||
language = 'en'
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = [
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.autodoc',
|
||||
@ -40,223 +28,65 @@ extensions = [
|
||||
'sphinxcontrib.httpdomain',
|
||||
]
|
||||
|
||||
# Do not warn about external images (status badges in README.rst)
|
||||
suppress_warnings = ['image.nonlocal_uri']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Read the Docs Sphinx Theme'
|
||||
copyright = u'Dave Snider, Read the Docs, Inc. & contributors'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = __version__
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = __version__
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
language = 'en'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
master_doc = 'index'
|
||||
suppress_warnings = ['image.nonlocal_uri']
|
||||
pygments_style = 'default'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
intersphinx_mapping = {
|
||||
'rtd': ('https://docs.readthedocs.io/en/latest/', None),
|
||||
'sphinx': ('http://www.sphinx-doc.org/en/stable/', None),
|
||||
}
|
||||
|
||||
intersphinx_mapping = {'rtd': ('https://docs.readthedocs.io/en/latest/', None)}
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
'logo_only': True
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ["../.."]
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
html_logo = "demo/static/logo-wordmark-light.svg"
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# 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_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 = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
htmlhelp_basename = slug
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = 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 = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'SphinxRTDthemedemodoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'SphinxRTDthemedemo.tex', u'Sphinx RTD theme demo Documentation',
|
||||
u'Dave Snider, Read the Docs, Inc. & contributors', 'manual'),
|
||||
('index', '{0}.tex'.format(slug), project, author, 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'sphinxrtdthemedemo', u'Sphinx RTD theme demo Documentation',
|
||||
[u'Dave Snider, Read the Docs, Inc. & contributors'], 1)
|
||||
('index', slug, project, [author], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'SphinxRTDthemedemo', u'Sphinx RTD theme demo Documentation',
|
||||
u'Dave Snider, Read the Docs, Inc. & contributors', 'SphinxRTDthemedemo',
|
||||
'One line description of project.', 'Miscellaneous'),
|
||||
('index', slug, project, author, slug, project, 'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
# Extensions to theme docs
|
||||
def setup(app):
|
||||
from sphinx.domains.python import PyField
|
||||
from sphinx.util.docfields import Field
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
app.add_object_type(
|
||||
'confval',
|
||||
'confval',
|
||||
objname='configuration value',
|
||||
indextemplate='pair: %s; configuration value',
|
||||
doc_field_types=[
|
||||
PyField(
|
||||
'type',
|
||||
label=_('Type'),
|
||||
has_arg=False,
|
||||
names=('type',),
|
||||
bodyrolename='class'
|
||||
),
|
||||
Field(
|
||||
'default',
|
||||
label=_('Default'),
|
||||
has_arg=False,
|
||||
names=('default',),
|
||||
),
|
||||
]
|
||||
)
|
||||
|
@ -1,19 +1,14 @@
|
||||
|
||||
*************
|
||||
Configuration
|
||||
*************
|
||||
|
||||
You can configure different parts of the theme.
|
||||
Theme options
|
||||
=============
|
||||
|
||||
Project-wide Configuration
|
||||
==========================
|
||||
The following options can be defined in your project's ``conf.py`` file, using
|
||||
the :confval:`html_theme_options <sphinx:html_theme_options>` configuration option.
|
||||
|
||||
HTML Theme Options
|
||||
------------------
|
||||
|
||||
The theme's project-wide options are defined in the ``sphinx_rtd_theme/theme.conf``
|
||||
file of this repository, and can be defined in your project's ``conf.py`` via
|
||||
``html_theme_options``. For example:
|
||||
For example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
@ -25,6 +20,7 @@ file of this repository, and can be defined in your project's ``conf.py`` via
|
||||
'prev_next_buttons_location': 'bottom',
|
||||
'style_external_links': False,
|
||||
'vcs_pageview_mode': '',
|
||||
'style_nav_header_background': 'white',
|
||||
# Toc options
|
||||
'collapse_navigation': True,
|
||||
'sticky_navigation': True,
|
||||
@ -33,76 +29,198 @@ file of this repository, and can be defined in your project's ``conf.py`` via
|
||||
'titles_only': False
|
||||
}
|
||||
|
||||
The following options are available:
|
||||
Table of contents options
|
||||
-------------------------
|
||||
|
||||
Base options
|
||||
~~~~~~~~~~~~
|
||||
The following options change how :rst:dir:`sphinx:toctree` directives generate
|
||||
documentation navigation.
|
||||
|
||||
* ``canonical_url`` String. This will specify a `canonical url <https://en.wikipedia.org/wiki/Canonical_link_element>`__
|
||||
to let search engines know they should give higher ranking to latest version of the docs.
|
||||
The url points to the root of the documentation and requires a trailing slash.
|
||||
* ``analytics_id`` String. Change the Google Analytics ID that is included on pages.
|
||||
* ``display_version`` Bool. With this disabled, the version number isn't shown at the top of the sidebar.
|
||||
* ``prev_next_buttons_location`` String. can take the value ``bottom``, ``top``, ``both`` , or ``None``
|
||||
and will display the "Next" and "Previous" buttons accordingly.
|
||||
* ``style_external_links`` Bool. Add an icon next to external links. Defaults to ``False``.
|
||||
* ``vcs_pageview_mode`` String. Changes how to view files when using `display_github`, `display_gitlab`, etc.
|
||||
When using Github or Gitlab this can be: `blob` (default), `edit`, or `raw`,
|
||||
on Bitbucket, this can be either: `view` (default) or `edit`.
|
||||
.. confval:: collapse_navigation
|
||||
|
||||
TOC Options
|
||||
~~~~~~~~~~~
|
||||
:type: boolean
|
||||
:default: ``True``
|
||||
|
||||
These effect how we display the Table of Contents in the side bar. You can read more about them here: http://www.sphinx-doc.org/en/stable/templating.html#toctree
|
||||
With this enabled, navigation entries are not expandable -- the ``[+]``
|
||||
icons next to each entry are removed.
|
||||
|
||||
* ``collapse_navigation`` Bool. With this enabled, you will lose the ``[+]`` drop downs next to each section in the sidebar.
|
||||
* ``sticky_navigation`` Bool. This causes the sidebar to scroll with the main page content as you scroll the page.
|
||||
* ``navigation_depth`` Int. Indicate the max depth of the tree; by default, 4 levels are included;
|
||||
set it to -1 to allow unlimited depth.
|
||||
* ``includehidden`` Bool. Specifies if the sidebar includes toctrees marked with the ``:hidden:`` option
|
||||
* ``titles_only`` Bool. If True, removes headers within a page from the sidebar.
|
||||
.. confval:: sticky_navigation
|
||||
|
||||
:type: boolean
|
||||
:default: ``True``
|
||||
|
||||
Scroll the navigation with the main page content as you scroll the page.
|
||||
|
||||
.. confval:: navigation_depth
|
||||
|
||||
:type: integer
|
||||
:default: ``4``
|
||||
|
||||
The maximum depth of the table of contents tree. Set
|
||||
this to ``-1`` to allow unlimited depth.
|
||||
|
||||
.. confval:: includehidden
|
||||
|
||||
:type: boolean
|
||||
:default: ``True``
|
||||
|
||||
Specifies if the navigation includes hidden table(s) of contents -- that is,
|
||||
any :rst:dir:`sphinx:toctree` directive that is marked with the ``:hidden:``
|
||||
option.
|
||||
|
||||
.. confval:: titles_only
|
||||
|
||||
:type: boolean
|
||||
:default: False
|
||||
|
||||
When enabled, page subheadings are not included in the
|
||||
navigation.
|
||||
|
||||
.. note::
|
||||
|
||||
Setting ``collapse_navigation`` to False and using a high ``navigation_depth``
|
||||
can cause projects with many files and a deep file structure to generate HTML files
|
||||
that are significantly larger in file size and much longer compilation times.
|
||||
Setting :confval:`collapse_navigation` to ``False`` and using a high value
|
||||
for :confval:`navigation_depth` on projects with many files and a deep file
|
||||
structure can cause long compilation times and can result in HTML files that
|
||||
are significantly larger in file size.
|
||||
|
||||
.. _table of contents configuration options: http://www.sphinx-doc.org/en/stable/templating.html#toctree
|
||||
|
||||
|
||||
HTML Context Options
|
||||
--------------------
|
||||
|
||||
TODO.
|
||||
..
|
||||
TODO
|
||||
.
|
||||
HTML context options
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Page-level Configuration
|
||||
========================
|
||||
Miscellaneous options
|
||||
---------------------
|
||||
|
||||
Pages support metadata that changes how the theme renders.
|
||||
You can currently add the following:
|
||||
.. confval:: analytics_id
|
||||
|
||||
* ``:github_url:`` This will force the "Edit on GitHub" to the configured URL
|
||||
* ``:bitbucket_url:`` This will force the "Edit on Bitbucket" to the configured URL
|
||||
* ``:gitlab_url:`` This will force the "Edit on GitLab" to the configured URL
|
||||
:type: string
|
||||
|
||||
Change the Google Analytics ID that is included on pages.
|
||||
|
||||
.. warning::
|
||||
This configuration option is not yet used.
|
||||
|
||||
.. confval:: canonical_url
|
||||
|
||||
:type: URL
|
||||
|
||||
This will specify a `canonical URL`_ meta link element to tell search
|
||||
engines which URL should be ranked as the primary URL for your
|
||||
documentation. This is important if you have multiple URLs that your
|
||||
documentation is available through. The URL points to the root path of the
|
||||
documentation and requires a trailing slash.
|
||||
|
||||
.. confval:: display_version
|
||||
|
||||
:type: boolean
|
||||
:default: ``True``
|
||||
|
||||
If ``True``, the version number is shown at the top of the sidebar.
|
||||
|
||||
.. confval:: logo_only
|
||||
|
||||
:type: boolean
|
||||
:default: ``False``
|
||||
|
||||
Only display the logo image, do not display the project name at the top of
|
||||
the sidebar
|
||||
|
||||
.. confval:: prev_next_buttons_location
|
||||
|
||||
:type: string
|
||||
:default: ``bottom``
|
||||
|
||||
Location to display :guilabel:`Next` and :guilabel:`Previous` buttons. This
|
||||
can be either ``bottom``, ``top``, ``both`` , or ``None``.
|
||||
|
||||
.. confval:: style_external_links
|
||||
|
||||
:type: boolean
|
||||
:default: ``False``
|
||||
|
||||
Add an icon next to external links.
|
||||
|
||||
.. confval:: vcs_pageview_mode
|
||||
|
||||
:type: string
|
||||
:default: ``blob`` or ``view``
|
||||
|
||||
Changes how to view files when using ``display_github``, ``display_gitlab``,
|
||||
etc. When using GitHub or GitLab this can be: ``blob`` (default), ``edit``,
|
||||
or ``raw``. On Bitbucket, this can be either: ``view`` (default) or
|
||||
``edit``.
|
||||
|
||||
.. confval:: style_nav_header_background
|
||||
|
||||
:type: string
|
||||
:default: ``#2980B9``
|
||||
|
||||
Changes the background of the search area in the navigation bar. The value
|
||||
can be anything valid in a CSS `background` property.
|
||||
|
||||
.. _canonical URL: https://en.wikipedia.org/wiki/Canonical_link_element
|
||||
|
||||
|
||||
How the Table of Contents builds
|
||||
================================
|
||||
File-wide metadata
|
||||
==================
|
||||
|
||||
Currently the left menu will build based upon any ``toctree(s)`` defined in your ``index.rst`` file.
|
||||
It outputs 2 levels of depth, which should give your visitors a high level of access to your
|
||||
docs. If no toctrees are set the theme reverts to sphinx's usual local toctree.
|
||||
The following options can be used as :ref:`file-wide metadata
|
||||
<sphinx:metadata>`:
|
||||
|
||||
It's important to note that if you don't follow the same styling for your rST headers across
|
||||
your documents, the toctree will misbuild, and the resulting menu might not show the correct
|
||||
depth when it renders.
|
||||
.. confval:: github_url
|
||||
|
||||
Also note that by default the table of contents is set with ``includehidden=True``. This allows you
|
||||
to set a hidden toc in your index file with the `:hidden: <hidden_>`_ property that will allow you
|
||||
to build a toc without it rendering in your index.
|
||||
Force the :guilabel:`Edit on GitHub` button to use the configured URL.
|
||||
|
||||
By default, the navigation will "stick" to the screen as you scroll. However if your toc
|
||||
is vertically too large, it will revert to static positioning. To disable the sticky nav
|
||||
altogether change the setting in ``conf.py``.
|
||||
.. confval:: bitbucket_url
|
||||
|
||||
.. _hidden: http://sphinx-doc.org/markup/toctree.html
|
||||
Force the :guilabel:`Edit on Bitbucket` button to use the configured URL.
|
||||
|
||||
.. confval:: gitlab_url
|
||||
|
||||
Force the :guilabel:`Edit on GitLab` button to use the configured URL.
|
||||
|
||||
|
||||
Other configuration
|
||||
===================
|
||||
|
||||
Adding a logo
|
||||
-------------
|
||||
|
||||
Using the Sphinx standard option :py:confval:`html_logo <sphinx:html_logo>`,
|
||||
you can set an image file to be used as a logo at the top of the sidebar. The
|
||||
theme option :py:confval:`logo_only` also allows for *only* the logo to be shown
|
||||
at the top of the sidebar.
|
||||
|
||||
Adding custom CSS or Javascript
|
||||
-------------------------------
|
||||
|
||||
Adding custom CSS or Javascript can help you alter the look and feel of this
|
||||
theme without forking the theme for local use.
|
||||
|
||||
In order to add custom CSS or Javascript without disrupting the existing theme
|
||||
files, you can :doc:`add files to be included in your documentation output
|
||||
<rtd:guides/adding-custom-css>`.
|
||||
|
||||
How the table of contents displays
|
||||
==================================
|
||||
|
||||
Currently the left menu will build based upon any ``toctree`` directives defined
|
||||
in your source files. It outputs 4 levels of depth by default, to allow for
|
||||
quick navigation through topics. If no TOC trees are defined, Sphinx's default
|
||||
behavior is to use the page headings instead.
|
||||
|
||||
It's important to note that if you don't follow the same styling for your reST
|
||||
headings across your documents, the TOC tree will build incorrectly, and the
|
||||
resulting menu might not show the correct depth when it renders.
|
||||
|
||||
Also note that by default the table of contents is set with
|
||||
``includehidden=True``. This allows you to set a hidden TOC in your index file
|
||||
with the :ref:`:hidden: <sphinx:toctree-directive>` property that will allow you
|
||||
to build a TOC without it rendering in your index.
|
||||
|
||||
By default, the navigation will "stick" to the screen as you scroll. However if
|
||||
your TOC is not tall enough, it will revert to static positioning. To disable the
|
||||
sticky navigation altogether, change the :confval:`sticky_navigation` theme option.
|
||||
|
@ -13,7 +13,7 @@ of a front-end developer (vs. that of a python developer). That means installing
|
||||
.. seealso::
|
||||
|
||||
If you are unsure of appropriate actions to take while interacting with our
|
||||
community please read our :doc:`Code of Conduct <rtd:/code-of-conduct>`.
|
||||
community please read our :doc:`Code of Conduct <rtd:code-of-conduct>`.
|
||||
|
||||
|
||||
Set up your environment
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "sphinx_rtd_theme",
|
||||
"main": "js/theme.js",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"bower": "^1.8.4",
|
||||
|
@ -5,7 +5,8 @@ From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
|
||||
"""
|
||||
from os import path
|
||||
|
||||
__version__ = '0.4.2.dev0'
|
||||
|
||||
__version__ = '0.4.3.dev0'
|
||||
__version_full__ = __version__
|
||||
|
||||
|
||||
@ -14,6 +15,7 @@ def get_html_theme_path():
|
||||
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
|
||||
return cur_dir
|
||||
|
||||
|
||||
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
|
||||
def setup(app):
|
||||
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
|
||||
|
@ -36,7 +36,9 @@
|
||||
</span>
|
||||
{% endtrans %}
|
||||
{%- elif last_updated %}
|
||||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
||||
<span class="lastupdated">
|
||||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
||||
</span>
|
||||
{%- endif %}
|
||||
|
||||
</p>
|
||||
|
@ -105,11 +105,10 @@
|
||||
|
||||
{% block extrabody %} {% endblock %}
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
{# SIDE NAV, TOGGLES ON MOBILE #}
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
<div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
|
||||
{% block sidebartitle %}
|
||||
|
||||
{% if logo and theme_logo_only %}
|
||||
|
@ -1 +1 @@
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
||||
/* sphinx_rtd_theme version 0.4.2 | MIT license */
|
||||
/* Built 20181005 13:10 */
|
||||
require=function r(s,a,l){function c(e,n){if(!a[e]){if(!s[e]){var i="function"==typeof require&&require;if(!n&&i)return i(e,!0);if(u)return u(e,!0);var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(n){return c(s[e][1][n]||n)},o,o.exports,r,s,a,l)}return a[e].exports}for(var u="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var i=this;void 0===e&&(e=!0),i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),i("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span class="toctree-expand"></span>'),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var i=(new Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
|
||||
/* sphinx_rtd_theme version 0.4.3 | MIT license */
|
||||
/* Built 20190212 16:02 */
|
||||
require=function r(s,a,l){function c(e,n){if(!a[e]){if(!s[e]){var i="function"==typeof require&&require;if(!n&&i)return i(e,!0);if(u)return u(e,!0);var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(n){return c(s[e][1][n]||n)},o,o.exports,r,s,a,l)}return a[e].exports}for(var u="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var i=this;void 0===e&&(e=!0),i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),i("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span class="toctree-expand"></span>'),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"),i[0].scrollIntoView())}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var i=(new Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
|
@ -10,8 +10,9 @@ collapse_navigation = True
|
||||
sticky_navigation = True
|
||||
navigation_depth = 4
|
||||
includehidden = True
|
||||
titles_only =
|
||||
titles_only =
|
||||
logo_only =
|
||||
display_version = True
|
||||
prev_next_buttons_location = bottom
|
||||
style_external_links = False
|
||||
style_nav_header_background =
|
Loading…
Reference in New Issue
Block a user