summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2020-09-07 21:44:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 10:09:34 +0100
commite4b904b21cd30f0b2f412117b73411b0f2844fef (patch)
treead0043bda23a976f6902638edc81ad2c46fb7f2d /documentation
parent2a94fe8d6bab10f54e08e9785402dec396a2252d (diff)
downloadpoky-e4b904b21cd30f0b2f412117b73411b0f2844fef.tar.gz
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 <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/_templates/layout.html2
-rw-r--r--documentation/conf.py7
2 files changed, 4 insertions, 5 deletions
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 @@
1{% extends "!layout.html" %} 1{% extends "!layout.html" %}
2 2
3{% set script_files = script_files + ['_static/switchers.js'] %}
4
5{% block extrabody %} 3{% block extrabody %}
6<div id="outdated-warning" style="text-align: center; background-color: #FFBABA; color: #6A0E0E;"> 4<div id="outdated-warning" style="text-align: center; background-color: #FFBABA; color: #6A0E0E;">
7</div> 5</div>
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'
103html_static_path = ['sphinx-static'] 103html_static_path = ['sphinx-static']
104 104
105html_context = { 105html_context = {
106 'css_files': [
107 '_static/theme_overrides.css',
108 ],
109 'current_version': current_version, 106 'current_version': current_version,
110} 107}
111 108
109# Add customm CSS and JS files
110html_css_files = ['theme_overrides.css']
111html_js_files = ['switchers.js']
112
112# Hide 'Created using Sphinx' text 113# Hide 'Created using Sphinx' text
113html_show_sphinx = False 114html_show_sphinx = False
114 115