how to share location of local mathjax? #12051
Replies: 10 comments 19 replies
-
I checked out for httpd of using files outside of DocumentRoot, it could be done by But livereload supports
will work. BUT, This solution requires us to create |
Beta Was this translation helpful? Give feedback.
-
Temporary solution for automatic copying of mathjax files:
the files inside Though this isn't really shared storage for mathjax, at least all projects work automatically now. |
Beta Was this translation helpful? Give feedback.
-
I started by using this method:
But, when deployed all the MathJax assets were deployed separately for each project, which slowed deploy times (lots of files) and also ate up a lot more storage over time. Since then, I have switched to having a single project deploy with the local MathJax files like it normally would, then all other projects use |
Beta Was this translation helpful? Give feedback.
-
you are ritht, using a self-hosted |
Beta Was this translation helpful? Give feedback.
-
I'd love to know: how did the author I checked that is added by (1675a45) into sphinx. |
Beta Was this translation helpful? Give feedback.
-
I'd love to know: how did the author I checked that is added by (1675a45) into sphinx. |
Beta Was this translation helpful? Give feedback.
-
I don't know if I would read into it to much, as implementation is likely so individual that it would hard to give more detail. Given the context, I have feeling they meant a shared hosted location, whether that's in a stand alone location or as part of a Sphinx project. |
Beta Was this translation helpful? Give feedback.
-
or back to the the soft-link solution. |
Beta Was this translation helpful? Give feedback.
-
mark as closed
|
Beta Was this translation helpful? Give feedback.
-
Solved by adding a feature to create a symlink: #12080 After merged of this pull request, one can set conf.py as:
or
|
Beta Was this translation helpful? Give feedback.
-
I have muti projects, which want to use the same local mathjax, as saying in www.sphinx-doc.org: 'If you host more than one Sphinx documentation set on one server, it is advisable to install MathJax in a shared location.'
However, could not using a path not inside
_build/html
such as,
then, not work: If set
mathjax_path = '../../../../mathjax/es5/tex-chtml.js'
, i.e. the relative path of/data/project1/_build/html/_static
,it will only make browser to load matjax file from
http://IP:8000/mathjax/es5/tex-chtml.js
, instead of fromhttp://IP:8000/../../../mathjax/es5/tex-chtml.js
.However, file
/data/project1/_build/html/mathjax/es5/tex-chtml.js
does not exist. So not work.what will only works is copy mathjax files into a path inside
/data/project1/_build/html
and change themathjax_path
too,However, this way does not share mathjax bettween projects.
So, How to share?
Beta Was this translation helpful? Give feedback.
All reactions