summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 4d8f9f16..1c1014e0 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -134,7 +134,7 @@ llms_txt_file = False
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-html_logo = '_static/images/vyos-logo.png'
+html_logo = '_static/images/vyos-logo.webp'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -209,5 +209,13 @@ texinfo_documents = [
]
+def _prefer_webp(app):
+ """Prepend WebP to supported image types for HTML builders."""
+ if app.builder.name in ('html', 'dirhtml', 'readthedocs'):
+ types = app.builder.supported_image_types
+ if 'image/webp' not in types:
+ app.builder.supported_image_types = ['image/webp'] + types
+
+
def setup(app):
- pass \ No newline at end of file
+ app.connect('builder-inited', _prefer_webp)