|
7 | 7 | # -- Environment -------------------------------------------------------------
|
8 | 8 |
|
9 | 9 | # Explicitly put the extensions directory to Python path
|
10 |
| -sys.path.append(os.path.abspath('_extensions')) |
| 10 | +sys.path.append(os.path.abspath("_extensions")) |
11 | 11 |
|
12 | 12 |
|
13 | 13 | # -- Project information -----------------------------------------------------
|
14 | 14 |
|
15 |
| -project = 'Dokumentace české Python komunity' |
16 |
| -copyright = '2023, Pyvec, z.s.' |
17 |
| -author = 'Pyvec, z.s.' |
| 15 | +project = "Dokumentace české Python komunity" |
| 16 | +copyright = "2023, Pyvec, z.s." |
| 17 | +author = "Pyvec, z.s." |
18 | 18 |
|
19 | 19 | # The short X.Y version
|
20 |
| -version = '' |
| 20 | +version = "" |
21 | 21 | # The full version, including alpha/beta/rc tags
|
22 |
| -release = '' |
| 22 | +release = "" |
23 | 23 |
|
24 | 24 |
|
25 | 25 | # -- General configuration ---------------------------------------------------
|
26 | 26 |
|
27 |
| -# If your documentation needs a minimal Sphinx version, state it here. |
28 |
| -# |
29 |
| -# needs_sphinx = '1.0' |
30 |
| - |
31 | 27 | # Add any Sphinx extension module names here, as strings. They can be
|
32 | 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
33 | 29 | # ones.
|
34 | 30 | extensions = [
|
35 |
| - 'sphinx.ext.doctest', |
36 |
| - 'sphinx.ext.todo', |
37 |
| - 'sphinx.ext.githubpages', |
38 |
| - 'sphinxemoji.sphinxemoji', |
39 |
| - 'slack', |
40 |
| - 'twitter', |
41 |
| - 'gh_repo', |
42 |
| - 'myst_parser', |
| 31 | + "sphinx.ext.doctest", |
| 32 | + "sphinx.ext.todo", |
| 33 | + "sphinx.ext.githubpages", |
| 34 | + "sphinxemoji.sphinxemoji", |
| 35 | + "slack", |
| 36 | + "twitter", |
| 37 | + "gh_repo", |
| 38 | + "myst_parser", |
43 | 39 | ]
|
44 | 40 |
|
45 | 41 | # Add any paths that contain templates here, relative to this directory.
|
46 |
| -templates_path = ['_templates'] |
| 42 | +templates_path = ["_templates"] |
47 | 43 |
|
48 | 44 | # The suffix(es) of source filenames.
|
49 | 45 | # You can specify multiple suffix as a list of string:
|
50 | 46 | #
|
51 | 47 | # source_suffix = ['.rst', '.md']
|
52 |
| -source_suffix = ['.rst', '.md'] |
| 48 | +source_suffix = [".rst", ".md"] |
53 | 49 |
|
54 | 50 | # The master toctree document.
|
55 |
| -master_doc = 'index' |
| 51 | +master_doc = "index" |
56 | 52 |
|
57 | 53 | # The language for content autogenerated by Sphinx. Refer to documentation
|
58 | 54 | # for a list of supported languages.
|
59 | 55 | #
|
60 | 56 | # This is also used if you do content translation via gettext catalogs.
|
61 | 57 | # Usually you set "language" from the command line for these cases.
|
62 |
| -language = 'cs' |
| 58 | +language = "cs" |
63 | 59 |
|
64 | 60 | # List of patterns, relative to source directory, that match files and
|
65 | 61 | # directories to ignore when looking for source files.
|
66 | 62 | # This pattern also affects html_static_path and html_extra_path .
|
67 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'venv'] |
| 63 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv", ".venv"] |
68 | 64 |
|
69 | 65 | # The name of the Pygments (syntax highlighting) style to use.
|
70 |
| -pygments_style = 'monokai' |
| 66 | +pygments_style = "monokai" |
71 | 67 |
|
72 | 68 |
|
73 | 69 | # -- Options for HTML output -------------------------------------------------
|
74 | 70 |
|
| 71 | +# Set canonical URL from the Read the Docs Domain |
| 72 | +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") |
| 73 | + |
75 | 74 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
76 | 75 | # a list of builtin themes.
|
77 |
| -html_theme = 'sphinx_rtd_theme' |
78 |
| -html_logo = '_static/images/org-i.svg' |
79 |
| - |
80 |
| -# Theme options are theme-specific and customize the look and feel of a theme |
81 |
| -# further. For a list of options available for each theme, see the |
82 |
| -# documentation. |
83 |
| -# |
84 |
| -# html_theme_options = {} |
| 76 | +html_theme = "sphinx_rtd_theme" |
| 77 | +html_logo = "_static/images/org-i.svg" |
85 | 78 |
|
86 | 79 | # Add any paths that contain custom static files (such as style sheets) here,
|
87 | 80 | # relative to this directory. They are copied after the builtin static files,
|
88 | 81 | # so a file named "default.css" will overwrite the builtin "default.css".
|
89 |
| -html_static_path = ['_static'] |
90 |
| - |
91 |
| -# Custom sidebar templates, must be a dictionary that maps document names |
92 |
| -# to template names. |
93 |
| -# |
94 |
| -# The default sidebars (for documents that don't match any pattern) are |
95 |
| -# defined by theme itself. Builtin themes are using these templates by |
96 |
| -# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', |
97 |
| -# 'searchbox.html']``. |
98 |
| -# |
99 |
| -# html_sidebars = {} |
| 82 | +html_static_path = ["_static"] |
100 | 83 |
|
101 | 84 |
|
102 | 85 | # -- Options for HTMLHelp output ---------------------------------------------
|
103 | 86 |
|
104 | 87 | # Output file base name for HTML help builder.
|
105 |
| -htmlhelp_basename = 'pyvec-doc' |
| 88 | +htmlhelp_basename = "pyvec-doc" |
106 | 89 |
|
107 | 90 |
|
108 | 91 | # -- Options for LaTeX output ------------------------------------------------
|
109 | 92 |
|
110 |
| -latex_elements = { |
111 |
| - # The paper size ('letterpaper' or 'a4paper'). |
112 |
| - # |
113 |
| - # 'papersize': 'letterpaper', |
114 |
| - |
115 |
| - # The font size ('10pt', '11pt' or '12pt'). |
116 |
| - # |
117 |
| - # 'pointsize': '10pt', |
118 |
| - |
119 |
| - # Additional stuff for the LaTeX preamble. |
120 |
| - # |
121 |
| - # 'preamble': '', |
122 |
| - |
123 |
| - # Latex figure (float) alignment |
124 |
| - # |
125 |
| - # 'figure_align': 'htbp', |
126 |
| -} |
| 93 | +latex_elements = {} |
127 | 94 |
|
128 | 95 | # Grouping the document tree into LaTeX files. List of tuples
|
129 | 96 | # (source start file, target name, title,
|
130 | 97 | # author, documentclass [howto, manual, or own class]).
|
131 | 98 | latex_documents = [
|
132 |
| - (master_doc, 'pyvec.tex', project, author, 'manual'), |
| 99 | + (master_doc, "pyvec.tex", project, author, "manual"), |
133 | 100 | ]
|
134 | 101 |
|
135 | 102 |
|
136 | 103 | # -- Options for manual page output ------------------------------------------
|
137 | 104 |
|
138 | 105 | # One entry per manual page. List of tuples
|
139 | 106 | # (source start file, name, description, authors, manual section).
|
140 |
| -man_pages = [ |
141 |
| - (master_doc, 'pyvec', project, [author], 1) |
142 |
| -] |
| 107 | +man_pages = [(master_doc, "pyvec", project, [author], 1)] |
143 | 108 |
|
144 | 109 |
|
145 | 110 | # -- Options for Texinfo output ----------------------------------------------
|
|
148 | 113 | # (source start file, target name, title, author,
|
149 | 114 | # dir menu entry, description, category)
|
150 | 115 | texinfo_documents = [
|
151 |
| - (master_doc, 'pyvec', project, author, 'pyvec', project, |
152 |
| - 'Miscellaneous'), |
| 116 | + (master_doc, "pyvec", project, author, "pyvec", project, "Miscellaneous"), |
153 | 117 | ]
|
154 | 118 |
|
155 | 119 |
|
|
161 | 125 | epub_publisher = author
|
162 | 126 | epub_copyright = copyright
|
163 | 127 |
|
164 |
| -# The unique identifier of the text. This can be a ISBN number |
165 |
| -# or the project homepage. |
166 |
| -# |
167 |
| -# epub_identifier = '' |
168 |
| - |
169 |
| -# A unique identification for the text. |
170 |
| -# |
171 |
| -# epub_uid = '' |
172 |
| - |
173 | 128 | # A list of files that should not be packed into the epub file.
|
174 |
| -epub_exclude_files = ['search.html'] |
| 129 | +epub_exclude_files = ["search.html"] |
175 | 130 |
|
176 | 131 |
|
177 | 132 | # -- Extension configuration -------------------------------------------------
|
178 | 133 |
|
179 | 134 | linkcheck_ignore = [
|
180 |
| - r'http://127\.0\.0\.1:\d+', # localhost |
181 |
| - r'https://docs\.google\.com/.+', # links to private documents |
182 |
| - |
183 |
| - # crawling/DDoS protection |
184 |
| - r'https://twitter\.com/.+', |
185 |
| - r'https://(www\.)?buffer\.com.*', |
186 |
| - r'https://www\.nytimes\.com/.*', |
187 |
| - |
188 |
| - # see https://pyvec.slack.com/archives/C4PPZNPDK/p1617716799001200 |
189 |
| - r'https://cz\.pycon\.org/\d+/.+', |
| 135 | + r"http://127\.0\.0\.1:\d+", # localhost |
| 136 | + r"https://docs\.google\.com/.+", # links to private documents |
| 137 | + r"https://twitter\.com/.+", # crawling/DDoS protection |
| 138 | + r"https://(www\.)?buffer\.com.*", # crawling/DDoS protection |
| 139 | + r"https://www\.nytimes\.com/.*", # crawling/DDoS protection |
| 140 | + r"https://cz\.pycon\.org/\d+/.+", # see https://pyvec.slack.com/archives/C4PPZNPDK/p1617716799001200 |
190 | 141 | ]
|
191 | 142 |
|
192 | 143 |
|
|
199 | 150 | # -- Options for the emoji extension -----------------------------------------
|
200 | 151 |
|
201 | 152 | # Ensures consistent emoji style on all computers, operating systems, browsers
|
202 |
| -sphinxemoji_style = 'twemoji' |
| 153 | +sphinxemoji_style = "twemoji" |
203 | 154 |
|
204 | 155 |
|
205 | 156 | # -- Setting up extensions ---------------------------------------------------
|
206 | 157 |
|
| 158 | + |
207 | 159 | def setup(app):
|
208 |
| - app.add_css_file('custom.css') |
209 |
| - app.add_js_file('redirect.js') |
| 160 | + app.add_css_file("custom.css") |
| 161 | + app.add_js_file("redirect.js") |
0 commit comments