refactor: Register events for HTML builders in the HTML builder module

This commit is contained in:
Takeshi KOMIYA
2020-11-28 20:17:36 +09:00
parent bae7ab9c9d
commit 6a88e64fd0
2 changed files with 4 additions and 2 deletions

View File

@@ -1243,6 +1243,10 @@ def setup(app: Sphinx) -> Dict[str, Any]:
app.add_config_value('html_math_renderer', None, 'env') app.add_config_value('html_math_renderer', None, 'env')
app.add_config_value('html4_writer', False, 'html') app.add_config_value('html4_writer', False, 'html')
# events
app.add_event('html-collect-pages')
app.add_event('html-page-context')
# event handlers # event handlers
app.connect('config-inited', convert_html_css_files, priority=800) app.connect('config-inited', convert_html_css_files, priority=800)
app.connect('config-inited', convert_html_js_files, priority=800) app.connect('config-inited', convert_html_js_files, priority=800)

View File

@@ -50,8 +50,6 @@ core_events = {
'warn-missing-reference': 'domain, node', 'warn-missing-reference': 'domain, node',
'doctree-resolved': 'doctree, docname', 'doctree-resolved': 'doctree, docname',
'env-updated': 'env', 'env-updated': 'env',
'html-collect-pages': 'builder',
'html-page-context': 'pagename, context, doctree or None',
'build-finished': 'exception', 'build-finished': 'exception',
} }