mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/3] doc: fix CSS/JS files not getting picked up by sphinx 5.3.0
@ 2023-05-06 20:22 Roland Hieber
  2023-05-06 20:22 ` [ptxdist] [PATCH 2/3] doc: custom.css: fix indentation Roland Hieber
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Roland Hieber @ 2023-05-06 20:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Somewhen between v3.4.3 (Debian bullseye) and v5.3.0 (Debian bookworm),
sphinx stopped picking up our CSS and JS files from the html_context,
which has the effect that the styling of the HTML documentation looks
very broken when built with sphinx 5.3.0.

Instead of injecting the CSS and JS files into html_context, use the
dedicated variables html_css_files and html_js_files, which were
introduced in sphinx 1.8 (which came out in 2018). This mostly fixes the
layout with sphinx v5.3.0, apart from a small vertical space glitch in
the "View page source" link, which we will fix later.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 doc/conf.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/doc/conf.py b/doc/conf.py
index 92594f4078a0..3e53aa4db20e 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -172,15 +172,16 @@ html_theme = 'sphinx_rtd_theme'
 
 html_static_path = ['_static']
 
-html_context = {
-    'css_files': ['_static/css/custom.css'],
-    'script_files': [
-        '_static/js/jquery-3.1.0.min.js',
-        '_static/underscore.js',
-        '_static/doctools.js',
-        '_static/js/main.js',
-    ],
-}
+html_css_files = [
+        'css/custom.css',
+]
+
+html_js_files = [
+        'js/jquery-3.1.0.min.js',
+        'underscore.js',
+        'doctools.js',
+        'js/main.js',
+]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-- 
2.39.2




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-15 11:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-06 20:22 [ptxdist] [PATCH 1/3] doc: fix CSS/JS files not getting picked up by sphinx 5.3.0 Roland Hieber
2023-05-06 20:22 ` [ptxdist] [PATCH 2/3] doc: custom.css: fix indentation Roland Hieber
2023-05-11  5:55   ` [ptxdist] [APPLIED] " Michael Olbrich
2023-05-06 20:22 ` [ptxdist] [PATCH 3/3] doc: custom.css: fix "View Page Source" align with newer sphinx_rtd_theme Roland Hieber
2023-05-11  5:55   ` [ptxdist] [APPLIED] " Michael Olbrich
2023-05-11  5:55 ` [ptxdist] [APPLIED] doc: fix CSS/JS files not getting picked up by sphinx 5.3.0 Michael Olbrich
2023-05-15 10:21 ` [ptxdist] [PATCH 1/3] " Jonas Schmidt
2023-05-15 11:18   ` Gavin Schenk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox