mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
commit
cafb8bfe92
@ -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)
|
||||||
|
@ -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',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user