Merge pull request #8507 from tk0miya/refactor_html_events_registration

refactor: Register events for HTML builders in the HTML builder module
This commit is contained in:
Takeshi KOMIYA 2020-11-29 23:57:47 +09:00 committed by GitHub
commit cafb8bfe92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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('html4_writer', False, 'html')
# events
app.add_event('html-collect-pages')
app.add_event('html-page-context')
# event handlers
app.connect('config-inited', convert_html_css_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',
'doctree-resolved': 'doctree, docname',
'env-updated': 'env',
'html-collect-pages': 'builder',
'html-page-context': 'pagename, context, doctree or None',
'build-finished': 'exception',
}