|
25 | 25 | # Add any Sphinx extension module names here, as strings. They can be |
26 | 26 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
27 | 27 | # ones. |
28 | | -extensions = ["sphinx.ext.autodoc", "sphinx.ext.graphviz", "sphinx_copybutton"] |
| 28 | +extensions = [ |
| 29 | + "sphinx.ext.autodoc", |
| 30 | + "sphinx.ext.graphviz", |
| 31 | + "sphinx_copybutton", |
| 32 | +] |
29 | 33 |
|
30 | 34 | # Add any paths that contain templates here, relative to this directory. |
31 | 35 | # templates_path = ["_templates"] |
32 | 36 |
|
33 | 37 | # The suffix of source filenames. |
34 | | -source_suffix = ".rst" |
| 38 | +source_suffix = {".rst": "restructuredtext"} |
35 | 39 |
|
36 | 40 | # The encoding of source files. |
37 | 41 | # source_encoding = 'utf-8-sig' |
|
47 | 51 | # |version| and |release|, also used in various other places throughout the |
48 | 52 | # built documents. |
49 | 53 | # |
| 54 | +# --------------------------------------------------------------------- |
| 55 | +# Versions. |
50 | 56 | # The short X.Y version. |
51 | 57 | version = "3.0.48" |
52 | 58 | # The full version, including alpha/beta/rc tags. |
53 | 59 | release = "3.0.48" |
| 60 | +# The URL pattern to match releases to ReadTheDocs URLs. |
| 61 | +docs_fmt_url = "https://python-prompt-toolkit.readthedocs.io/en/{release}/" |
| 62 | +# The list of releases to include in the dropdown. |
| 63 | +releases = [ |
| 64 | + "latest", |
| 65 | + release, |
| 66 | + "2.0.9", |
| 67 | + "1.0.15", |
| 68 | +] |
54 | 69 |
|
55 | 70 | # The language for content autogenerated by Sphinx. Refer to documentation |
56 | 71 | # for a list of supported languages. |
|
82 | 97 | # show_authors = False |
83 | 98 |
|
84 | 99 | # The name of the Pygments (syntax highlighting) style to use. |
85 | | -pygments_style = "pastie" |
86 | | -pygments_dark_style = "dracula" |
| 100 | +# pygments_style = "pastie" # Provided as a theme option below. |
87 | 101 |
|
88 | 102 | # A list of ignored prefixes for module index sorting. |
89 | 103 | # modindex_common_prefix = [] |
|
107 | 121 |
|
108 | 122 | # on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
109 | 123 |
|
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" |
| 124 | +html_theme = "sphinx_nefertiti" |
| 125 | +# html_theme_path = [sphinx_nefertiti.get_html_theme_path()] |
| 126 | +html_theme_options = { |
| 127 | + "documentation_font": "Open Sans", |
| 128 | + "monospace_font": "Ubuntu Mono", |
| 129 | + "monospace_font_size": "1.1rem", |
| 130 | + # "style" can take the following values: "blue", "indigo", "purple", |
| 131 | + # "pink", "red", "orange", "yellow", "green", "tail", and "default". |
| 132 | + "style": "blue", |
| 133 | + "pygments_light_style": "pastie", |
| 134 | + "pygments_dark_style": "dracula", |
| 135 | + # Fonts are customizable (and are not retrieved online). |
| 136 | + # https://sphinx-nefertiti.readthedocs.io/en/latest/users-guide/customization/fonts.html |
| 137 | + "logo": "logo_400px.png", |
| 138 | + "logo_alt": "python-prompt-toolkit", |
| 139 | + "logo_width": "36", |
| 140 | + "logo_height": "36", |
| 141 | + "repository_url": "https://github.com/prompt-toolkit/python-prompt-toolkit", |
| 142 | + "repository_name": "python-prompt-toolkit", |
| 143 | + "current_version": "latest", |
| 144 | + "versions": [(item, docs_fmt_url.format(release=item)) for item in releases], |
| 145 | + "header_links": [ |
| 146 | + {"text": "Getting started", "link": "pages/getting_started"}, |
| 147 | + { |
| 148 | + "text": "Tutorials", |
| 149 | + "match": "/tutorials/*", |
| 150 | + "dropdown": ( |
| 151 | + {"text": "Build an SQLite REPL", "link": "pages/tutorials/repl"}, |
| 152 | + ), |
| 153 | + }, |
| 154 | + { |
| 155 | + "text": "Advanced", |
| 156 | + "link": "pages/advanced_topics/index", |
| 157 | + "match": "/advanced_topics/*", |
| 158 | + "dropdown": ( |
| 159 | + { |
| 160 | + "text": "More about key bindings", |
| 161 | + "link": "pages/advanced_topics/key_bindings", |
| 162 | + }, |
| 163 | + { |
| 164 | + "text": "More about styling", |
| 165 | + "link": "pages/advanced_topics/styling", |
| 166 | + }, |
| 167 | + { |
| 168 | + "text": "Filters", |
| 169 | + "link": "pages/advanced_topics/filters", |
| 170 | + }, |
| 171 | + { |
| 172 | + "text": "The rendering flow", |
| 173 | + "link": "pages/advanced_topics/rendering_flow", |
| 174 | + }, |
| 175 | + { |
| 176 | + "text": "Running on top of the asyncio event loop", |
| 177 | + "link": "pages/advanced_topics/asyncio", |
| 178 | + }, |
| 179 | + { |
| 180 | + "text": "Unit testing", |
| 181 | + "link": "pages/advanced_topics/unit_testing", |
| 182 | + }, |
| 183 | + { |
| 184 | + "text": "Input hooks", |
| 185 | + "link": "pages/advanced_topics/input_hooks", |
| 186 | + }, |
| 187 | + { |
| 188 | + "text": "Architecture", |
| 189 | + "link": "pages/advanced_topics/architecture", |
| 190 | + }, |
| 191 | + { |
| 192 | + "text": "The rendering pipeline", |
| 193 | + "link": "pages/advanced_topics/rendering_pipeline", |
| 194 | + }, |
| 195 | + ), |
| 196 | + }, |
| 197 | + { |
| 198 | + "text": "Reference", |
| 199 | + "link": "pages/reference", |
| 200 | + }, |
| 201 | + ], |
| 202 | + "footer_links": [ |
| 203 | + { |
| 204 | + "text": "Documentation", |
| 205 | + "link": "https://python-prompt-toolkit.readthedocs.io/", |
| 206 | + }, |
| 207 | + { |
| 208 | + "text": "Package", |
| 209 | + "link": "https://pypi.org/project/prompt-toolkit/", |
| 210 | + }, |
| 211 | + { |
| 212 | + "text": "Repository", |
| 213 | + "link": "https://github.com/prompt-toolkit/python-prompt-toolkit", |
| 214 | + }, |
| 215 | + { |
| 216 | + "text": "Issues", |
| 217 | + "link": "https://github.com/prompt-toolkit/python-prompt-toolkit/issues", |
| 218 | + }, |
| 219 | + ], |
| 220 | +} |
142 | 221 |
|
143 | 222 |
|
144 | 223 | # Theme options are theme-specific and customize the look and feel of a theme |
|
0 commit comments