This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
conf.py
307 lines (268 loc) · 11.3 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
from dotenv import load_dotenv
load_dotenv()
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'Aiven Docs'
copyright = '2023, Aiven Team'
author = 'Aiven Team'
html_title = 'Aiven'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_sitemap',
'sphinx_design',
'sphinxcontrib.mermaid',
'sphinx_external_toc',
'sphinx_copybutton',
'sphinx_gitstamp',
'sphinxext.opengraph',
'notfound.extension',
'override_canonical',
]
# Not Found configuration
# see all options at https://sphinx-notfound-page.readthedocs.io/en/latest/configuration.html
notfound_urls_prefix = ''
# OpenGraph configuration
# see all options at https://github.com/wpilibsuite/sphinxext-opengraph#options
ogp_site_url = 'https://docs.aiven.io/'
ogp_description_length = 200
ogp_image = 'https://docs.aiven.io/_static/images/site-preview.png'
# Mermaid version
mermaid_version = "8.12.0"
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
'_build', 'Thumbs.db', '.DS_Store', 'README*', 'scripts', 'utils',
'CONTRIBUTING.rst', 'REVIEWING.rst', 'includes',
'.github/vale', '.venv', 'venv',
]
# gitstamp config
gitstamp_fmt = "%B %Y"
# sitemap config
html_baseurl = 'https://docs.aiven.io'
# Since we have `language='en'` set (further down) the URLs in the sitemap will
# default to "{version}{lang}{link}", producing things like
# <url><loc>https://docs.aiven.io/en/docs/platform/howto/create_authentication_token.html</loc></url>
# That doesn't work because we do not produce pages with the `/en` in the URL.
# We need to be explicit that we don't want {version} or {language} in the URLs
sitemap_url_scheme = "{link}"
# ``make linkcheck`` is not perfect.
# The following pages are known to cause it problems.
linkcheck_ignore = [
# Kafka documentation anchors do not seem to be detected. We use the following:
'https://kafka.apache.org/documentation/#consumerconfigs_auto.offset.reset',
'https://kafka.apache.org/documentation/#design_consumerposition',
# Azure Marketplace uses internal links which confuses the checker, so ignoring these:
'https://portal.azure.com/#view/Microsoft_Azure_Marketplace/MarketplaceOffersBlade/selectedMenuItemId/home',
]
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_favicon = './_static/images/favicon.ico'
html_theme = 'furo'
html_theme_options = {
"light_logo": "images/logoLight.png",
"dark_logo": "images/logoDark.png",
"light_css_variables": {
"color-brand-primary": "#FF5200",
"color-brand-content": "#343745",
"color-link": "#007cc2",
"color-link--hover": "#016BB2",
"color-link-underline--hover": "#016BB2",
"color-sidebar-link-text": "#343745",
"color-sidebar-link-text--top-level": "#343745",
"font-stack": "Inter, sans-serif",
"color-sidebar-brand-text": "#343745",
"color-sidebar-background-hover": "#F8F9FB",
"color-sidebar-item-background--hover": "#F8F9FB",
"color-foreground-primary": "#333333",
"color-foreground-secondary": "#4f5366",
"color-foreground-muted": "#4f5366",
"color-foreground-border": "#EDEDF0",
"color-background-primary": "#ffffff",
"color-background-secondary": "#f7f7fa",
"color-content-foreground": "#4f5366",
"color-background-hover": "#c60443",
"color-background-border": "#EDEDF0",
"color-highlighted-background": "#1c1c2f",
"color-inline-code-background": "#4f5366",
"color-sidebar-background": "#FFFFFF",
"color-sidebar-background-border": "#EDEDF0",
"color-sidebar-search-background": "#fff",
"color-card-border": "#E1E1E3",
"sd-color-card-background": "#fff",
"sd-color-primary": "#343745",
"sd-color-shadow": "none",
"sidebar-tree-space-above": "8px",
# Custom css variables
"color-search": "#19191D",
"color-search-focused": "#4A4B57",
"color-search-border": "#B4B4BB",
"color-search-border-focused": "#4F5366",
"color-search-container-outline-focused": "#B4E5FB",
"color-search-background": "#FFFFFF",
"color-sidebar-search-icon": "#B4B4BB",
"color-topnav-background": "#FFFFFF",
"color-topnav-border": "#EDEEF3",
"color-topnav-link": "#1A1B22",
"color-topnav-theme-toggle-border": "rgba(0, 0, 0, 0.1)",
"color-topnav-button-primary": "#FFFFFF",
"color-topnav-button-primary-hover": "#FFFFFF",
"color-topnav-button-primary-background": "#FF5200",
"color-topnav-button-primary-hover-background": "#F04D00",
"color-topnav-button-secondary": "#1A1B22",
"color-topnav-button-secondary-border": "#B4B7C5",
"color-topnav-button-secondary-hover": "#1A1B22",
"color-topnav-button-secondary-hover-border": "#4F5366",
"color-topnav-button-secondary-hover-background": "transparent",
"color-toc-item-text--active": "#007cc2",
"color-highlight-on-target": "#F8F9FB",
},
"dark_css_variables": {
"color-brand-primary": "#FF5200",
"color-brand-content": "#ffffff",
"color-link": "#6DCDF8",
"color-link--hover": "#3DBBF5",
"color-link-underline--hover": "#3DBBF5",
"font-stack": "Inter, sans-serif",
"color-sidebar-brand-text": "#D2D2D6",
"color-sidebar-background-hover": "#161825",
"color-sidebar-item-background--hover": "#161825",
"color-sidebar-link-text": "#D2D2D6",
"color-sidebar-link-text--top-level": "#D2D2D6",
"color-foreground-primary": "#ffffff",
"color-foreground-secondary": "#D2D2D6",
"color-foreground-muted": "#D2D2D6",
"color-foreground-border": "#3A3A44",
"color-background-primary": "#11111e",
"color-background-secondary": "#1c1c2f",
"color-content-foreground": "#D2D2D6",
"color-background-hover": "#ff3554",
"color-background-border": "#3A3A44",
"color-highlighted-background": "#1c1c2f",
"color-inline-code-background": "#f7f7fa",
"color-sidebar-background": "#11111E",
"color-sidebar-background-border": "#3A3A44",
"color-sidebar-search-background": "#1c1c2f",
"color-admonition-title-background--tip": "#00c85240",
"color-admonition-title-background--note": "#00b0ff40",
"color-admonition-title-background--warning": "#ff910040",
"color-admonition-title-background--error": "#ff525240",
"sd-color-card-background": "#161825",
"sd-color-card-header": "#0b0b14",
"sd-color-primary": "#ffffff",
"sd-color-shadow": "none",
"color-card-border": "#3A3A44",
"sidebar-tree-space-above": "8px",
# Custom css variables
"color-search": "#F7F7FA",
"color-search-focused": "#FFFFFF",
"color-search-border": "#3A3A44",
"color-search-border-focused": "#7FD1F7",
"color-search-container-outline-focused": "#0174BA",
"color-search-background": "#11111E",
"color-sidebar-search-icon": "#F7F7FA",
"color-topnav-background": "#0B0B14",
"color-topnav-border": "#3A3A44",
"color-topnav-link": "#F7F7FA",
"color-topnav-theme-toggle-border": "rgba(255, 255, 255, 0.1)",
"color-topnav-button-primary": "#FFFFFF",
"color-topnav-button-primary-hover": "#FFFFFF",
"color-topnav-button-primary-background": "#FF5200",
"color-topnav-button-primary-hover-background": "#F04D00",
"color-topnav-button-secondary": "#f7f7fa",
"color-topnav-button-secondary-border": "#f7f7fa",
"color-topnav-button-secondary-hover": "#f7f7fa",
"color-topnav-button-secondary-hover-border": "#f7f7fa",
"color-topnav-button-secondary-hover-background": "transparent",
"color-toc-item-text--active": "#6DCDF8",
"color-highlight-on-target": "#161825",
},
"navigation_with_keys": True
}
pygments_style = "monokai"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
language = "en"
html_extra_path = ['robots.txt', '_redirects']
html_static_path = ['_static']
html_css_files = ['css/aiven.css']
html_sidebars = {
"**": [
"sidebar/scroll-start.html",
"sidebar/mobile-header.html",
"sidebar/mobile-search.html",
"sidebar/navigation.html",
"sidebar/mobile-actions.html",
"sidebar/scroll-end.html",
]
}
# -- Replacements -----------------------------------------------------------
rst_epilog = """
.. |icon-postgres| image:: /images/icons/icon-pg.svg
:width: 24px
:class: no-scaled-link
.. |icon-mysql| image:: /images/icons/icon-mysql.svg
:width: 24px
:class: no-scaled-link
.. |icon-kafka| image:: /images/icons/icon-kafka.svg
:width: 24px
:class: no-scaled-link
.. |icon-kafka-connect| image:: /images/icons/icon-kafka-connect.svg
:width: 24px
:class: no-scaled-link
.. |icon-kafka-mirrormaker| image:: /images/icons/icon-kafka-mirrormaker.svg
:width: 24px
:class: no-scaled-link
.. |icon-m3db| image:: /images/icons/icon-m3db.svg
:width: 24px
:class: no-scaled-link
.. |icon-influxdb| image:: /images/icons/icon-influxdb.svg
:width: 24px
:class: no-scaled-link
.. |icon-opensearch| image:: /images/icons/icon-opensearch.png
:width: 24px
:class: no-scaled-link
.. |icon-cassandra| image:: /images/icons/icon-cassandra.svg
:width: 24px
:class: no-scaled-link
.. |icon-redis| image:: /images/icons/icon-redis.svg
:width: 24px
:class: no-scaled-link
.. |icon-grafana| image:: /images/icons/icon-grafana.svg
:width: 24px
:class: no-scaled-link
.. |icon-flink| image:: /images/icons/icon-flink.svg
:width: 24px
:class: no-scaled-link
.. |icon-clickhouse| image:: /images/icons/icon-clickhouse.svg
:width: 24px
:class: no-scaled-link
.. |icon-dragonfly| image:: /images/icons/icon-dragonfly.svg
:width: 24px
:class: no-scaled-link
.. |preview| replace:: :bdg-secondary:`preview`
"""
html_context = {
'api_url_search': os.getenv('API_URL_SEARCH'),
'api_url_create_feedback': os.getenv('API_URL_CREATE_FEEDBACK')
}