mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix mathjax is not loaded
This commit is contained in:
parent
1c3eadcf61
commit
e5ddc36fd1
@ -64,7 +64,8 @@ def builder_inited(app):
|
||||
if not app.config.jsmath_path:
|
||||
raise ExtensionError('jsmath_path config value must be set for the '
|
||||
'jsmath extension to work')
|
||||
app.add_js_file(app.config.jsmath_path)
|
||||
if app.builder.format == 'html':
|
||||
app.builder.add_js_file(app.config.jsmath_path) # type: ignore
|
||||
|
||||
|
||||
def setup(app):
|
||||
|
@ -72,8 +72,9 @@ def builder_inited(app):
|
||||
if not app.config.mathjax_path:
|
||||
raise ExtensionError('mathjax_path config value must be set for the '
|
||||
'mathjax extension to work')
|
||||
options = {'async': 'async'}
|
||||
app.add_js_file(app.config.mathjax_path, **options)
|
||||
if app.builder.format == 'html':
|
||||
options = {'async': 'async'}
|
||||
app.builder.add_js_file(app.config.mathjax_path, **options) # type: ignore
|
||||
|
||||
|
||||
def setup(app):
|
||||
|
Loading…
Reference in New Issue
Block a user