|
1 |
| -# -*- coding: utf-8 -*- |
2 |
| - |
3 | 1 | # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
|
4 | 2 | #
|
5 | 3 | # SPDX-License-Identifier: MIT
|
6 | 4 |
|
| 5 | +import datetime |
7 | 6 | import os
|
8 | 7 | import sys
|
9 | 8 |
|
|
16 | 15 | # ones.
|
17 | 16 | extensions = [
|
18 | 17 | "sphinx.ext.autodoc",
|
| 18 | + "sphinxcontrib.jquery", |
19 | 19 | "sphinx.ext.intersphinx",
|
20 | 20 | "sphinx.ext.napoleon",
|
21 | 21 | "sphinx.ext.todo",
|
|
27 | 27 | # autodoc module docs will fail to generate with a warning.
|
28 | 28 | # autodoc_mock_imports = ["digitalio", "busio"]
|
29 | 29 |
|
| 30 | +autodoc_preserve_defaults = True |
30 | 31 |
|
31 | 32 | intersphinx_mapping = {
|
32 | 33 | "python": ("https://docs.python.org/3", None),
|
|
46 | 47 |
|
47 | 48 | # General information about the project.
|
48 | 49 | project = "CircuitPython DisplayIO_Effects Library"
|
49 |
| -copyright = "2022 Alec Delaney" |
| 50 | +creation_year = "2022" |
| 51 | +current_year = str(datetime.datetime.now().year) |
| 52 | +year_duration = ( |
| 53 | + current_year if current_year == creation_year else creation_year + " - " + current_year |
| 54 | +) |
| 55 | +copyright = year_duration + " Alec Delaney" |
50 | 56 | author = "Alec Delaney"
|
51 | 57 |
|
52 | 58 | # The version info for the project you're documenting, acts as replacement for
|
|
63 | 69 | #
|
64 | 70 | # This is also used if you do content translation via gettext catalogs.
|
65 | 71 | # Usually you set "language" from the command line for these cases.
|
66 |
| -language = None |
| 72 | +language = "en" |
67 | 73 |
|
68 | 74 | # List of patterns, relative to source directory, that match files and
|
69 | 75 | # directories to ignore when looking for source files.
|
|
101 | 107 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
102 | 108 | # a list of builtin themes.
|
103 | 109 | #
|
104 |
| -on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
105 |
| - |
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 = ["."] |
| 110 | +import sphinx_rtd_theme |
| 111 | + |
| 112 | +html_theme = "sphinx_rtd_theme" |
117 | 113 |
|
118 | 114 | # Add any paths that contain custom static files (such as style sheets) here,
|
119 | 115 | # relative to this directory. They are copied after the builtin static files,
|
|
0 commit comments