Skip to content

Commit aa56a59

Browse files
authored
Merge branch 'master' into decouple-menu-current-and-expand
2 parents 3d2d0ea + 8c31a26 commit aa56a59

22 files changed

+322
-340
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Document global line endings settings
22
# https://help.github.com/articles/dealing-with-line-endings/
33
* text eol=lf
4+
*.bat text eol=crlf
45

56

67
# Denote all files that are truly binary and should not be modified.

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ matrix:
88
include:
99
- python: 2.7
1010
env: TOXENV=docs
11-
sudo: false
1211
install:
1312
- pip install tox-travis
1413
script:

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ recursive-include sphinx_rtd_theme *.svg
99
recursive-include sphinx_rtd_theme *.ttf
1010
recursive-include sphinx_rtd_theme *.woff
1111
recursive-include sphinx_rtd_theme *.woff2
12+
recursive-include tests *.py
13+
recursive-include tests *.rst

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sphinx-rtd-theme",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"homepage": "https://github.com/rtfd/sphinx_rtd_theme",
55
"authors": [
66
"Dave Snider, Read the Docs, Inc. & contributors <[email protected]>"

docs/changelog.rst

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
*********
32
Changelog
43
*********
@@ -8,19 +7,39 @@ master
87

98
:Date: TBD
109

10+
New Features
11+
-------------
12+
1113
Fixes
1214
-----
1315

14-
* Fix scrolling to active item in sidebar on load (#214)
15-
* Style caption link for code and literal blocks
16-
* Fix inconsistent font size and line height for autodoc "raises" and "returns" (#267)
1716
* Clicking active menu item no longer makes it look inactive (#306)
1817

1918
Other Changes
2019
--------------
2120

2221
* Menu items can now expand and collapse regardless of active item
22+
* Add the ``navigation`` template block around the navigation area.
23+
24+
0.4.3
25+
======
2326

27+
:Date: Feb 12, 2019
28+
29+
New Features
30+
-------------
31+
32+
33+
Fixes
34+
-----
35+
36+
* Fix scrolling to active item in sidebar on load (#214)
37+
* Style caption link for code and literal blocks
38+
* Fix inconsistent font size and line height for autodoc "raises" and "returns" (#267)
39+
* Fix last_updated notice appearing in same line as copyright notice (#704)
40+
41+
Other Changes
42+
--------------
2443

2544
v0.4.2
2645
======

docs/conf.py

Lines changed: 46 additions & 216 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,25 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Sphinx RTD theme demo documentation build configuration file, created by
4-
# sphinx-quickstart on Sun Nov 3 11:56:36 2013.
5-
#
6-
# This file is executed with the current directory set to its containing dir.
7-
#
8-
# Note that not all possible configuration values are present in this
9-
# autogenerated file.
10-
#
11-
# All configuration values have a default; values that are commented out
12-
# serve to show the default.
132

143
import sys
154
import os
16-
5+
import re
176

187
sys.path.append(os.path.abspath('..'))
198
sys.path.append(os.path.abspath('./demo/'))
209

21-
from sphinx_rtd_theme import __version__
10+
from sphinx.locale import _
2211

23-
# If extensions (or modules to document with autodoc) are in another directory,
24-
# add these directories to sys.path here. If the directory is relative to the
25-
# documentation root, use os.path.abspath to make it absolute, like shown here.
26-
#sys.path.insert(0, os.path.abspath('.'))
12+
from sphinx_rtd_theme import __version__
2713

28-
# -- General configuration -----------------------------------------------------
2914

30-
# If your documentation needs a minimal Sphinx version, state it here.
31-
#needs_sphinx = '1.0'
15+
project = u'Read the Docs Sphinx Theme'
16+
slug = re.sub(r'\W+', '-', project.lower())
17+
version = __version__
18+
release = __version__
19+
author = u'Dave Snider, Read the Docs, Inc. & contributors'
20+
copyright = author
21+
language = 'en'
3222

33-
# Add any Sphinx extension module names here, as strings. They can be extensions
34-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3523
extensions = [
3624
'sphinx.ext.intersphinx',
3725
'sphinx.ext.autodoc',
@@ -40,223 +28,65 @@
4028
'sphinxcontrib.httpdomain',
4129
]
4230

43-
# Do not warn about external images (status badges in README.rst)
44-
suppress_warnings = ['image.nonlocal_uri']
45-
46-
# Add any paths that contain templates here, relative to this directory.
4731
templates_path = ['_templates']
48-
49-
# The suffix of source filenames.
5032
source_suffix = '.rst'
51-
52-
# The encoding of source files.
53-
#source_encoding = 'utf-8-sig'
54-
55-
# The master toctree document.
56-
master_doc = 'index'
57-
58-
# General information about the project.
59-
project = u'Read the Docs Sphinx Theme'
60-
copyright = u'Dave Snider, Read the Docs, Inc. & contributors'
61-
62-
# The version info for the project you're documenting, acts as replacement for
63-
# |version| and |release|, also used in various other places throughout the
64-
# built documents.
65-
#
66-
# The short X.Y version.
67-
version = __version__
68-
# The full version, including alpha/beta/rc tags.
69-
release = __version__
70-
71-
# The language for content autogenerated by Sphinx. Refer to documentation
72-
# for a list of supported languages.
73-
language = 'en'
74-
75-
# There are two options for replacing |today|: either, you set today to some
76-
# non-false value, then it is used:
77-
#today = ''
78-
# Else, today_fmt is used as the format for a strftime call.
79-
#today_fmt = '%B %d, %Y'
80-
81-
# List of patterns, relative to source directory, that match files and
82-
# directories to ignore when looking for source files.
8333
exclude_patterns = []
8434

85-
# The reST default role (used for this markup: `text`) to use for all documents.
86-
#default_role = None
87-
88-
# If true, '()' will be appended to :func: etc. cross-reference text.
89-
#add_function_parentheses = True
90-
91-
# If true, the current module name will be prepended to all description
92-
# unit titles (such as .. function::).
93-
#add_module_names = True
94-
95-
# If true, sectionauthor and moduleauthor directives will be shown in the
96-
# output. They are ignored by default.
97-
#show_authors = False
98-
99-
# The name of the Pygments (syntax highlighting) style to use.
35+
master_doc = 'index'
36+
suppress_warnings = ['image.nonlocal_uri']
10037
pygments_style = 'default'
10138

102-
# A list of ignored prefixes for module index sorting.
103-
#modindex_common_prefix = []
104-
105-
intersphinx_mapping = {'rtd': ('https://docs.readthedocs.io/en/latest/', None)}
106-
107-
108-
# -- Options for HTML output ---------------------------------------------------
39+
intersphinx_mapping = {
40+
'rtd': ('https://docs.readthedocs.io/en/latest/', None),
41+
'sphinx': ('http://www.sphinx-doc.org/en/stable/', None),
42+
}
10943

110-
# The theme to use for HTML and HTML Help pages. See the documentation for
111-
# a list of builtin themes.
11244
html_theme = 'sphinx_rtd_theme'
113-
114-
# Theme options are theme-specific and customize the look and feel of a theme
115-
# further. For a list of options available for each theme, see the
116-
# documentation.
11745
html_theme_options = {
11846
'logo_only': True
11947
}
120-
121-
# Add any paths that contain custom themes here, relative to this directory.
12248
html_theme_path = ["../.."]
123-
124-
# The name for this set of Sphinx documents. If None, it defaults to
125-
# "<project> v<release> documentation".
126-
#html_title = None
127-
128-
# A shorter title for the navigation bar. Default is the same as html_title.
129-
#html_short_title = None
130-
131-
# The name of an image file (relative to this directory) to place at the top
132-
# of the sidebar.
13349
html_logo = "demo/static/logo-wordmark-light.svg"
134-
135-
# The name of an image file (within the static path) to use as favicon of the
136-
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
137-
# pixels large.
138-
#html_favicon = None
139-
140-
# Add any paths that contain custom static files (such as style sheets) here,
141-
# relative to this directory. They are copied after the builtin static files,
142-
# so a file named "default.css" will overwrite the builtin "default.css".
143-
#html_static_path = ['_static']
144-
145-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
146-
# using the given strftime format.
147-
#html_last_updated_fmt = '%b %d, %Y'
148-
149-
# If true, SmartyPants will be used to convert quotes and dashes to
150-
# typographically correct entities.
151-
#html_use_smartypants = True
152-
153-
# Custom sidebar templates, maps document names to template names.
154-
#html_sidebars = {}
155-
156-
# Additional templates that should be rendered to pages, maps page names to
157-
# template names.
158-
#html_additional_pages = {}
159-
160-
# If false, no module index is generated.
161-
#html_domain_indices = True
162-
163-
# If false, no index is generated.
164-
#html_use_index = True
165-
166-
# If true, the index is split into individual pages for each letter.
167-
#html_split_index = False
168-
169-
# If true, links to the reST sources are added to the pages.
17050
html_show_sourcelink = True
17151

172-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
173-
#html_show_sphinx = True
174-
175-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
176-
#html_show_copyright = True
177-
178-
# If true, an OpenSearch description file will be output, and all pages will
179-
# contain a <link> tag referring to it. The value of this option must be the
180-
# base URL from which the finished HTML is served.
181-
#html_use_opensearch = ''
182-
183-
# This is the file name suffix for HTML files (e.g. ".xhtml").
184-
#html_file_suffix = None
185-
186-
# Output file base name for HTML help builder.
187-
htmlhelp_basename = 'SphinxRTDthemedemodoc'
188-
52+
htmlhelp_basename = slug
18953

190-
# -- Options for LaTeX output --------------------------------------------------
191-
192-
latex_elements = {
193-
# The paper size ('letterpaper' or 'a4paper').
194-
#'papersize': 'letterpaper',
195-
196-
# The font size ('10pt', '11pt' or '12pt').
197-
#'pointsize': '10pt',
198-
199-
# Additional stuff for the LaTeX preamble.
200-
#'preamble': '',
201-
}
202-
203-
# Grouping the document tree into LaTeX files. List of tuples
204-
# (source start file, target name, title, author, documentclass [howto/manual]).
20554
latex_documents = [
206-
('index', 'SphinxRTDthemedemo.tex', u'Sphinx RTD theme demo Documentation',
207-
u'Dave Snider, Read the Docs, Inc. & contributors', 'manual'),
55+
('index', '{0}.tex'.format(slug), project, author, 'manual'),
20856
]
20957

210-
# The name of an image file (relative to this directory) to place at the top of
211-
# the title page.
212-
#latex_logo = None
213-
214-
# For "manual" documents, if this is true, then toplevel headings are parts,
215-
# not chapters.
216-
#latex_use_parts = False
217-
218-
# If true, show page references after internal links.
219-
#latex_show_pagerefs = False
220-
221-
# If true, show URL addresses after external links.
222-
#latex_show_urls = False
223-
224-
# Documents to append as an appendix to all manuals.
225-
#latex_appendices = []
226-
227-
# If false, no module index is generated.
228-
#latex_domain_indices = True
229-
230-
231-
# -- Options for manual page output --------------------------------------------
232-
233-
# One entry per manual page. List of tuples
234-
# (source start file, name, description, authors, manual section).
23558
man_pages = [
236-
('index', 'sphinxrtdthemedemo', u'Sphinx RTD theme demo Documentation',
237-
[u'Dave Snider, Read the Docs, Inc. & contributors'], 1)
59+
('index', slug, project, [author], 1)
23860
]
23961

240-
# If true, show URL addresses after external links.
241-
#man_show_urls = False
242-
243-
244-
# -- Options for Texinfo output ------------------------------------------------
245-
246-
# Grouping the document tree into Texinfo files. List of tuples
247-
# (source start file, target name, title, author,
248-
# dir menu entry, description, category)
24962
texinfo_documents = [
250-
('index', 'SphinxRTDthemedemo', u'Sphinx RTD theme demo Documentation',
251-
u'Dave Snider, Read the Docs, Inc. & contributors', 'SphinxRTDthemedemo',
252-
'One line description of project.', 'Miscellaneous'),
63+
('index', slug, project, author, slug, project, 'Miscellaneous'),
25364
]
25465

255-
# Documents to append as an appendix to all manuals.
256-
#texinfo_appendices = []
257-
258-
# If false, no module index is generated.
259-
#texinfo_domain_indices = True
26066

261-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
262-
#texinfo_show_urls = 'footnote'
67+
# Extensions to theme docs
68+
def setup(app):
69+
from sphinx.domains.python import PyField
70+
from sphinx.util.docfields import Field
71+
72+
app.add_object_type(
73+
'confval',
74+
'confval',
75+
objname='configuration value',
76+
indextemplate='pair: %s; configuration value',
77+
doc_field_types=[
78+
PyField(
79+
'type',
80+
label=_('Type'),
81+
has_arg=False,
82+
names=('type',),
83+
bodyrolename='class'
84+
),
85+
Field(
86+
'default',
87+
label=_('Default'),
88+
has_arg=False,
89+
names=('default',),
90+
),
91+
]
92+
)

0 commit comments

Comments
 (0)