From 54076ed7971c3e74036e2ff38eb668f5f0f618da Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 22 Mar 2017 09:57:25 +0900 Subject: [PATCH] treat alabaster as a builtin extension --- sphinx/application.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sphinx/application.py b/sphinx/application.py index 7b6b0788e..043d2b793 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -97,6 +97,9 @@ builtin_extensions = ( 'sphinx.environment.collectors.title', 'sphinx.environment.collectors.toctree', 'sphinx.environment.collectors.indexentries', + # Strictly, alabaster theme is not a builtin extension, + # but it is loaded automatically to use it as default theme. + 'alabaster', ) # type: Tuple[unicode, ...] CONFIG_FILENAME = 'conf.py' @@ -190,12 +193,6 @@ class Sphinx(object): for extension in builtin_extensions: self.setup_extension(extension) - # extension loading support for alabaster theme - # self.config.html_theme is not set from conf.py at here - # for now, sphinx always load a 'alabaster' extension. - if 'alabaster' not in self.config.extensions: - self.config.extensions.append('alabaster') - # load all user-given extension modules for extension in self.config.extensions: self.setup_extension(extension)