Skip to content

Commit ab1649c

Browse files
committed
src/sage_docbuild/conf.py: use absolute path to mathjax
Previously we copied mathjax to sphinx's _static output directory and then referenced it with a path relative to _static. This commit references it by absolute path on the filesystem, solving two problems: 1. It doesn't waste space; there are multiple _static directories, and mathjax was copied to all of them 2. It avoids polluting _static with mathjax files Closes: #30296
1 parent de55f27 commit ab1649c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sage_docbuild/conf.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ def set_intersphinx_mappings(app, config):
374374
if os.environ.get('SAGE_USE_CDNS', 'no') == 'yes':
375375
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
376376
else:
377-
mathjax_path = 'mathjax/tex-chtml.js'
378-
html_common_static_path += [MATHJAX_DIR]
377+
mathjax_path = os.path.join(MATHJAX_DIR, 'tex-chtml.js')
379378

380379
# A list of glob-style patterns that should be excluded when looking for source
381380
# files. They are matched against the source file names relative to the

0 commit comments

Comments
 (0)