summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-04-15 12:23:25 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-04-15 12:23:25 +0300
commit278fe418cf3cc5b9889bd1f9973a417a3560796f (patch)
treefd925f40a68deb10ca6db977050e54a56c31ab75 /docs/conf.py
parentcb88a20453f647106bf35d0db61bf1a8b92d8be8 (diff)
downloadvyos-documentation-278fe418cf3cc5b9889bd1f9973a417a3560796f.tar.gz
vyos-documentation-278fe418cf3cc5b9889bd1f9973a417a3560796f.zip
fix: also patch DirectoryHTMLBuilder for WebP priority
ReadTheDocs uses a builder that subclasses DirectoryHTMLBuilder, not StandaloneHTMLBuilder. Patch both to ensure WebP is preferred in all HTML build variants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/conf.py b/docs/conf.py
index b2c871c5..eacec2c7 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -200,11 +200,14 @@ texinfo_documents = [
def setup(app):
# Prefer WebP for HTML output; LaTeX keeps its default (PDF/PNG/JPEG)
- from sphinx.builders.html import StandaloneHTMLBuilder
- StandaloneHTMLBuilder.supported_image_types = [
+ webp_types = [
'image/webp',
'image/svg+xml',
'image/png',
'image/gif',
'image/jpeg',
- ] \ No newline at end of file
+ ]
+ from sphinx.builders.html import StandaloneHTMLBuilder
+ StandaloneHTMLBuilder.supported_image_types = webp_types
+ from sphinx.builders.dirhtml import DirectoryHTMLBuilder
+ DirectoryHTMLBuilder.supported_image_types = webp_types \ No newline at end of file