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')