Skip to content

Commit 20da652

Browse files
committed
update docs conf
1 parent 3c75827 commit 20da652

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

docs/conf.py

+15-27
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# -*- coding: utf-8 -*-
22

3-
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
3+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
44
#
55
# SPDX-License-Identifier: MIT
66

77
import os
88
import sys
9+
import datetime
910

1011
sys.path.insert(0, os.path.abspath(".."))
1112

@@ -16,6 +17,7 @@
1617
# ones.
1718
extensions = [
1819
"sphinx.ext.autodoc",
20+
"sphinxcontrib.jquery",
1921
"sphinx.ext.intersphinx",
2022
"sphinx.ext.napoleon",
2123
"sphinx.ext.todo",
@@ -29,13 +31,10 @@
2931

3032

3133
intersphinx_mapping = {
32-
"python": ("https://docs.python.org/3.4", None),
33-
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
34+
"python": ("https://docs.python.org/3", None),
35+
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
3436
}
3537

36-
# Show the docstring from both the class and its __init__() method.
37-
autoclass_content = "both"
38-
3938
# Add any paths that contain templates here, relative to this directory.
4039
templates_path = ["_templates"]
4140

@@ -63,18 +62,12 @@
6362
#
6463
# This is also used if you do content translation via gettext catalogs.
6564
# Usually you set "language" from the command line for these cases.
66-
language = None
65+
language = "en"
6766

6867
# List of patterns, relative to source directory, that match files and
6968
# directories to ignore when looking for source files.
7069
# This patterns also effect to html_static_path and html_extra_path
71-
exclude_patterns = [
72-
"_build",
73-
"Thumbs.db",
74-
".DS_Store",
75-
".env",
76-
"CODE_OF_CONDUCT.md",
77-
]
70+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
7871

7972
# The reST default role (used for this markup: `text`) to use for all
8073
# documents.
@@ -101,19 +94,10 @@
10194
# The theme to use for HTML and HTML Help pages. See the documentation for
10295
# a list of builtin themes.
10396
#
104-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
97+
import sphinx_rtd_theme
10598

106-
if not on_rtd: # only import and set the theme if we're building docs locally
107-
try:
108-
import sphinx_rtd_theme
109-
110-
html_theme = "sphinx_rtd_theme"
111-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
112-
except:
113-
html_theme = "default"
114-
html_theme_path = ["."]
115-
else:
116-
html_theme_path = ["."]
99+
html_theme = "sphinx_rtd_theme"
100+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
117101

118102
# Add any paths that contain custom static files (such as style sheets) here,
119103
# relative to this directory. They are copied after the builtin static files,
@@ -133,12 +117,16 @@
133117

134118
latex_elements = {
135119
# The paper size ('letterpaper' or 'a4paper').
120+
#
136121
# 'papersize': 'letterpaper',
137122
# The font size ('10pt', '11pt' or '12pt').
123+
#
138124
# 'pointsize': '10pt',
139125
# Additional stuff for the LaTeX preamble.
126+
#
140127
# 'preamble': '',
141128
# Latex figure (float) alignment
129+
#
142130
# 'figure_align': 'htbp',
143131
}
144132

@@ -166,7 +154,7 @@
166154
"CircuitPython DisplayIO_Annotation Library Documentation",
167155
[author],
168156
1,
169-
),
157+
)
170158
]
171159

172160
# -- Options for Texinfo output -------------------------------------------

0 commit comments

Comments
 (0)