From e4b904b21cd30f0b2f412117b73411b0f2844fef Mon Sep 17 00:00:00 2001 From: Nicolas Dechesne Date: Mon, 7 Sep 2020 21:44:54 +0200 Subject: sphinx: conf: include CSS/JS files, the proper way html_css_files and html_js_files exist since Sphinx 1.8, and it's the proper (documented) mechanism to include custom CSS and JS files in the documentation. (From yocto-docs rev: 4ae9c426654e33fed4185e5d6e0de76b4a430d84) Signed-off-by: Nicolas Dechesne Signed-off-by: Richard Purdie --- documentation/_templates/layout.html | 2 -- documentation/conf.py | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'documentation') diff --git a/documentation/_templates/layout.html b/documentation/_templates/layout.html index af4c6acc60..308d5c7a28 100644 --- a/documentation/_templates/layout.html +++ b/documentation/_templates/layout.html @@ -1,7 +1,5 @@ {% extends "!layout.html" %} -{% set script_files = script_files + ['_static/switchers.js'] %} - {% block extrabody %}
diff --git a/documentation/conf.py b/documentation/conf.py index 83dea72e41..e1a7e5e3dd 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -103,12 +103,13 @@ html_logo = 'sphinx-static/YoctoProject_Logo_RGB.jpg' html_static_path = ['sphinx-static'] html_context = { - 'css_files': [ - '_static/theme_overrides.css', - ], 'current_version': current_version, } +# Add customm CSS and JS files +html_css_files = ['theme_overrides.css'] +html_js_files = ['switchers.js'] + # Hide 'Created using Sphinx' text html_show_sphinx = False -- cgit v1.2.3-54-g00ecf