summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McNamara <john.mcnamara@intel.com>2017-06-23 14:05:29 +0100
committerThomas Monjalon <thomas@monjalon.net>2017-07-10 00:46:38 +0200
commit46562be650942cbd100e939bed3986a03ba3780a (patch)
tree3aa69f975409cb6cca95136a7fea05a80aec166e
parent1e46fadefeeb2a60aa58df6c5adc655de337977f (diff)
downloaddpdk-46562be650942cbd100e939bed3986a03ba3780a.zip
dpdk-46562be650942cbd100e939bed3986a03ba3780a.tar.gz
dpdk-46562be650942cbd100e939bed3986a03ba3780a.tar.xz
doc: import sphinx rtd theme when available
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>
-rw-r--r--doc/guides/conf.py12
1 files 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 @@ except:
# 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 = ""