|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 |
|
3 |
| -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries |
| 3 | +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries |
4 | 4 | #
|
5 | 5 | # SPDX-License-Identifier: MIT
|
6 | 6 |
|
7 | 7 | import os
|
8 | 8 | import sys
|
| 9 | +import datetime |
9 | 10 |
|
10 | 11 | sys.path.insert(0, os.path.abspath(".."))
|
11 | 12 |
|
|
16 | 17 | # ones.
|
17 | 18 | extensions = [
|
18 | 19 | "sphinx.ext.autodoc",
|
| 20 | + "sphinxcontrib.jquery", |
19 | 21 | "sphinx.ext.intersphinx",
|
20 | 22 | "sphinx.ext.napoleon",
|
21 | 23 | "sphinx.ext.todo",
|
|
29 | 31 |
|
30 | 32 |
|
31 | 33 | 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), |
34 | 36 | }
|
35 | 37 |
|
36 |
| -# Show the docstring from both the class and its __init__() method. |
37 |
| -autoclass_content = "both" |
38 |
| - |
39 | 38 | # Add any paths that contain templates here, relative to this directory.
|
40 | 39 | templates_path = ["_templates"]
|
41 | 40 |
|
|
63 | 62 | #
|
64 | 63 | # This is also used if you do content translation via gettext catalogs.
|
65 | 64 | # Usually you set "language" from the command line for these cases.
|
66 |
| -language = None |
| 65 | +language = "en" |
67 | 66 |
|
68 | 67 | # List of patterns, relative to source directory, that match files and
|
69 | 68 | # directories to ignore when looking for source files.
|
70 | 69 | # 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"] |
78 | 71 |
|
79 | 72 | # The reST default role (used for this markup: `text`) to use for all
|
80 | 73 | # documents.
|
|
101 | 94 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
102 | 95 | # a list of builtin themes.
|
103 | 96 | #
|
104 |
| -on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| 97 | +import sphinx_rtd_theme |
105 | 98 |
|
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(), "."] |
117 | 101 |
|
118 | 102 | # Add any paths that contain custom static files (such as style sheets) here,
|
119 | 103 | # relative to this directory. They are copied after the builtin static files,
|
|
133 | 117 |
|
134 | 118 | latex_elements = {
|
135 | 119 | # The paper size ('letterpaper' or 'a4paper').
|
| 120 | + # |
136 | 121 | # 'papersize': 'letterpaper',
|
137 | 122 | # The font size ('10pt', '11pt' or '12pt').
|
| 123 | + # |
138 | 124 | # 'pointsize': '10pt',
|
139 | 125 | # Additional stuff for the LaTeX preamble.
|
| 126 | + # |
140 | 127 | # 'preamble': '',
|
141 | 128 | # Latex figure (float) alignment
|
| 129 | + # |
142 | 130 | # 'figure_align': 'htbp',
|
143 | 131 | }
|
144 | 132 |
|
|
166 | 154 | "CircuitPython DisplayIO_Annotation Library Documentation",
|
167 | 155 | [author],
|
168 | 156 | 1,
|
169 |
| - ), |
| 157 | + ) |
170 | 158 | ]
|
171 | 159 |
|
172 | 160 | # -- Options for Texinfo output -------------------------------------------
|
|
0 commit comments