* [dpdk-dev] [PATCH v1] doc: import sphinx rtd doc theme when available
@ 2017-06-23 13:05 John McNamara
2017-07-09 21:22 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: John McNamara @ 2017-06-23 13:05 UTC (permalink / raw)
To: dev; +Cc: John McNamara
The ReadTheDocs theme is no longer available by default in
Sphinx versions >= 1.3.1 and if it isn't available then an
exception is raised. This patch imports the ReadTheDocs
theme when it is available and warns but proceeds when it
isn't.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
doc/guides/conf.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index c3cd0bd..3988075 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -47,11 +47,17 @@
# Python 3.
import configparser
+try:
+ import sphinx_rtd_theme
-project = 'Data Plane Development Kit'
-
-if LooseVersion(sphinx_version) >= LooseVersion('1.3.1'):
html_theme = "sphinx_rtd_theme"
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+except:
+ print('Install the sphinx ReadTheDocs theme for improved html documentation '
+ 'layout: pip install sphinx_rtd_theme')
+ pass
+
+project = 'Data Plane Development Kit'
html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
latex_logo = '../logo/DPDK_logo_horizontal_tag.png'
html_add_permalinks = ""
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-09 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 13:05 [dpdk-dev] [PATCH v1] doc: import sphinx rtd doc theme when available John McNamara
2017-07-09 21:22 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).