|
11 | 11 | # All configuration values have a default; values that are commented out
|
12 | 12 | # serve to show the default.
|
13 | 13 |
|
14 |
| -import os |
15 | 14 |
|
16 | 15 | # If extensions (or modules to document with autodoc) are in another directory,
|
17 | 16 | # add these directories to sys.path here. If the directory is relative to the
|
|
26 | 25 | # Add any Sphinx extension module names here, as strings. They can be
|
27 | 26 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
28 | 27 | # ones.
|
29 |
| -extensions = ["sphinx.ext.autodoc", "sphinx.ext.graphviz"] |
| 28 | +extensions = ["sphinx.ext.autodoc", "sphinx.ext.graphviz", "sphinx_copybutton"] |
30 | 29 |
|
31 | 30 | # Add any paths that contain templates here, relative to this directory.
|
32 | 31 | # templates_path = ["_templates"]
|
|
42 | 41 |
|
43 | 42 | # General information about the project.
|
44 | 43 | project = "prompt_toolkit"
|
45 |
| -copyright = "2014-2020, Jonathan Slenders" |
| 44 | +copyright = "2014-2023, Jonathan Slenders" |
46 | 45 |
|
47 | 46 | # The version info for the project you're documenting, acts as replacement for
|
48 | 47 | # |version| and |release|, also used in various other places throughout the
|
|
83 | 82 | # show_authors = False
|
84 | 83 |
|
85 | 84 | # The name of the Pygments (syntax highlighting) style to use.
|
86 |
| -pygments_style = "sphinx" |
| 85 | +pygments_style = "pastie" |
| 86 | +pygments_dark_style = "dracula" |
87 | 87 |
|
88 | 88 | # A list of ignored prefixes for module index sorting.
|
89 | 89 | # modindex_common_prefix = []
|
|
105 | 105 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
106 | 106 | # a list of builtin themes.
|
107 | 107 |
|
108 |
| -on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| 108 | +# on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| 109 | + |
| 110 | +try: |
| 111 | + import sphinx_nefertiti |
| 112 | + |
| 113 | + html_theme = "sphinx_nefertiti" |
| 114 | + html_theme_path = [sphinx_nefertiti.get_html_theme_path()] |
| 115 | + html_theme_options = { |
| 116 | + # "style" can take the following values: "blue", "indigo", "purple", |
| 117 | + # "pink", "red", "orange", "yellow", "green", "tail", and "default". |
| 118 | + "style": "default", |
| 119 | + # Fonts are customizable (and are not retrieved online). |
| 120 | + # https://sphinx-nefertiti.readthedocs.io/en/latest/users-guide/customization/fonts.html |
| 121 | + # "documentation_font": "Open Sans", |
| 122 | + # "monospace_font": "Ubuntu Mono", |
| 123 | + # "monospace_font_size": "1.1rem", |
| 124 | + "logo": "logo_400px.png", |
| 125 | + "logo_alt": "python-prompt-toolkit", |
| 126 | + "logo_width": "36", |
| 127 | + "logo_height": "36", |
| 128 | + "repository_url": "https://github.com/prompt-toolkit/python-prompt-toolkit", |
| 129 | + "repository_name": "python-prompt-toolkit", |
| 130 | + "footer_links": ",".join( |
| 131 | + [ |
| 132 | + "Documentation|https://python-prompt-toolkit.readthedocs.io/", |
| 133 | + "Package|https://pypi.org/project/prompt-toolkit/", |
| 134 | + "Repository|https://github.com/prompt-toolkit/python-prompt-toolkit", |
| 135 | + "Issues|https://github.com/prompt-toolkit/python-prompt-toolkit/issues", |
| 136 | + ] |
| 137 | + ), |
| 138 | + } |
| 139 | + |
| 140 | +except ImportError: |
| 141 | + html_theme = "pyramid" |
109 | 142 |
|
110 |
| -if on_rtd: |
111 |
| - html_theme = "default" |
112 |
| -else: |
113 |
| - try: |
114 |
| - import sphinx_rtd_theme |
115 |
| - |
116 |
| - html_theme = "sphinx_rtd_theme" |
117 |
| - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
118 |
| - except ImportError: |
119 |
| - html_theme = "pyramid" |
120 | 143 |
|
121 | 144 | # Theme options are theme-specific and customize the look and feel of a theme
|
122 | 145 | # further. For a list of options available for each theme, see the
|
123 | 146 | # documentation.
|
124 |
| -# html_theme_options = {} |
| 147 | + |
125 | 148 |
|
126 | 149 | # Add any paths that contain custom themes here, relative to this directory.
|
127 | 150 | # html_theme_path = []
|
|
0 commit comments