From fd8c63f3631fe19a8258b42f16d6a76ee9af7aa0 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 16 Mar 2018 14:06:39 -0400 Subject: [PATCH] fix #42 fix getting sidebars --- sphinxcontrib/versioning/sphinx_.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sphinxcontrib/versioning/sphinx_.py b/sphinxcontrib/versioning/sphinx_.py index a90587d4f..291884b67 100644 --- a/sphinxcontrib/versioning/sphinx_.py +++ b/sphinxcontrib/versioning/sphinx_.py @@ -57,7 +57,10 @@ def builder_inited(app): # Add versions.html to sidebar. if '**' not in app.config.html_sidebars: - app.config.html_sidebars['**'] = StandaloneHTMLBuilder.default_sidebars + ['versions.html'] + if 'html_sidebars' in StandaloneHTMLBuilder(app).get_theme_config()[1].keys(): + app.config.html_sidebars['**'] = StandaloneHTMLBuilder(app).get_theme_config()[1]['html_sidebars'] + ['versions.html'] + else: + app.config.html_sidebars['**'] = ['versions.html'] elif 'versions.html' not in app.config.html_sidebars['**']: app.config.html_sidebars['**'].append('versions.html')