Skip to content

Commit fb7be54

Browse files
committed
Use npx serve rather than python for server example
1 parent 3650864 commit fb7be54

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

web/hosting.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ additional cross-origin restrictions for ``file://`` URLs, and that
354354
may limit where you can place the MathJax files and font files.
355355

356356
In that case, you may need to run a local webserver for MathJax and
357-
its files. For example, if you have ``python`` installed, and have
358-
placed the ``mathjax`` and ``mathjax-newcm-font`` files in a directory
359-
called ``assets``, then if do
357+
its files. For example, if you have placed the ``mathjax`` and
358+
``mathjax-newcm-font`` files in a directory called ``assets``, then if
359+
do
360360

361361
.. code-block:: shell
362362
363363
cd assets
364-
python -M http.server 8000
364+
node serve --cors
365365
366366
and configure your page like
367367

@@ -375,11 +375,11 @@ and configure your page like
375375
MathJax = {
376376
output: {
377377
font: 'mathjax-stix2',
378-
fontPath: 'http://localhost:8000/mathjax-strix2-font',
378+
fontPath: 'http://localhost:3000/mathjax-strix2-font',
379379
}
380380
};
381381
</script>
382-
<script defer src="http://localhost:8000/mathjax/tex-chtml.js"></script>
382+
<script defer src="http://localhost:3000/mathjax/tex-chtml.js"></script>
383383
</head>
384384
<body>
385385
...
@@ -388,7 +388,7 @@ and configure your page like
388388

389389
then you should be able to load this file using a ``file://`` URL and
390390
have MathJax served from the local pyhton server without the need for
391-
any access to the internet.
391+
any access to the internet.
392392

393393

394394
|-----|

0 commit comments

Comments
 (0)