I have the following problem. I am using Hugo to generate my website.
I also use the ananke theme. Now, I would like to render some math, so I
followed the instructions at:
https://gohugo.io/content-management/mathematics/
This means making some changes the layout of ananke. I did those locally
and it does render the math. Then I follow the instructions at:
https://srht.site/quickstart
which, if I'm correct, would upload the static website I have
rendered with hugo locally. But when I open the link on the webpage it
does not show the math:
https://gavox.srht.site/curso_mcpi/2024_08_28_modelos_y_software/
I have also tried to render it with the automatic deployment:
https://srht.site/automating-deployments
but in that case the build fails, because my local version of ananke is
different from the canonical one (since I modified it, for it to be able
to render math):
fatal: Fetched in submodule path 'themes/ananke', but it did not contain
https://builds.sr.ht/~gavox/job/1316253
Any ideas on how to solve this?
Help will be appreciated.
--
Gabriel Villalobos Camargo
===============
Profesor Ciencia de Datos ESAP
Profesor MM&S UTADEO
Doctor en Ciencias - Física, UN
===============
On Sun Sep 1, 2024 at 12:47 AM CEST, Gabriel wrote:
> [...]> which, if I'm correct, would upload the static website I have> rendered with hugo locally.
Yes and no, you upload the site your render locally, but math is
rendered on the client side i.e. reader's browser.
> [...]> https://gavox.srht.site/curso_mcpi/2024_08_28_modelos_y_software/
Checking the console, I see this:
Content-Security-Policy: The page’s settings blocked a script (script-src-elem) at
https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js
from being executed because it violates the following directive:
“script-src 'self' 'unsafe-eval' 'unsafe-inline'”
It seems that the mathjax scripts are not loaded correctly from the cdn.
I'm not sure if it is srht.site policy. Anyways, you can solve this by
serving mathjax files yourself, e.g. by putting the js file under
`static` and change the script url to yours instead of using a cdn.
--
wth
220F 6A50 7BEF 8C33 3B4A 4404 99DE B3B4 1583 4AEF
On Sun, 1 Sep 2024, at 01:10, Tianhao Wang wrote:
> On Sun Sep 1, 2024 at 12:47 AM CEST, Gabriel wrote:> [...]>> It seems that the mathjax scripts are not loaded correctly from the cdn.> I'm not sure if it is srht.site policy. Anyways, you can solve this by> serving mathjax files yourself, e.g. by putting the js file under> `static` and change the script url to yours instead of using a cdn.>
This is srht.site policy. You need to serve
all files yourself, and can’t execute scripts
from third party domains.
--
Hugo
"Hugo Osvaldo Barrera" <hugo@whynothugo.nl> writes:
> This is srht.site policy. You need to serve> all files yourself, and can’t execute scripts> from third party domains.
For completeness, here is the documentation about the limitations of what pages.sr.ht can offer:
https://srht.site/limitations
Thanks for the answers. It solved my issue.
On Sun, Sep 1, 2024 at 7:05 AM jman <srht@city17.xyz> wrote:
>> "Hugo Osvaldo Barrera" <hugo@whynothugo.nl> writes:>> > This is srht.site policy. You need to serve> > all files yourself, and can’t execute scripts> > from third party domains.>> For completeness, here is the documentation about the limitations of what pages.sr.ht can offer:> https://srht.site/limitations
--
Gabriel Villalobos Camargo
===============
Profesor Ciencia de Datos ESAP
Profesor MM&S UTADEO
Doctor en Ciencias - Física, UN
===============