Skip to content

Commit 7050db0

Browse files
authored
Merge branch 'master' into master
2 parents 8992188 + ddfdd35 commit 7050db0

24 files changed

+395
-388
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ recursive-include sphinx_rtd_theme *.ttf
1111
recursive-include sphinx_rtd_theme *.woff
1212
recursive-include sphinx_rtd_theme *.woff2
1313
recursive-include sphinx_rtd_theme/locale *.pot *.po *.mo
14-
prune build
14+
recursive-include tests *.py
15+
recursive-include tests *.rst
16+
prune build

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: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
*********
32
Changelog
43
*********
@@ -13,6 +12,33 @@ New Features
1312
* Added i18n support using Babel
1413
* Added Translation Guide documentation
1514

15+
Fixes
16+
-----
17+
18+
Other Changes
19+
--------------
20+
21+
* Add the ``navigation`` template block around the navigation area.
22+
23+
0.4.3
24+
======
25+
26+
:Date: Feb 12, 2019
27+
28+
New Features
29+
-------------
30+
31+
Fixes
32+
-----
33+
34+
* Fix scrolling to active item in sidebar on load (#214)
35+
* Style caption link for code and literal blocks
36+
* Fix inconsistent font size and line height for autodoc "raises" and "returns" (#267)
37+
* Fix last_updated notice appearing in same line as copyright notice (#704)
38+
39+
40+
Other Changes
41+
--------------
1642

1743
v0.4.2
1844
======

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',
@@ -41,223 +29,65 @@
4129
'sphinx_rtd_theme',
4230
]
4331

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

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)