-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Katex css/js not included #40
Comments
I couldn't replicate this with PaperMod (latest version). Would you be willing to share a minimal repository for testing purposes? The KaTeX diagrams were rendered correctly when editing the |
Hi @razonyang, thanks for looking into this! I've pushed a minimal reproduction repository here: https://github.com/jpf91/katex-repro The easiest way to reproduce: If I just run |
There is a workaround to replace the extend_head with the following template instead, to make sure the content was processed first, then generate the CSS and JS markup. {{ $data := dict "page" . }}
{{ with (templates.Defer (dict "data" $data)) }}
{{ partial "katex/assets/css" .page }}
{{ partial "katex/assets/js" .page }}
{{ end }} It's a bug. I will take a close look at it if I have time, so please do not close the issue. |
The workaround seems to be working, thanks a lot 😄 |
Hi,
sorry if this is a dumb question, but I couldn't find a solution.
I'm using the latest version of the PaperMod theme and hugo v0.140.2.
I've added this to
layouts/partials/extend_head.html
:And if I add some debug text there I also see that it's always included. However, if I run hugo serve, add the example to a post and save:
Then the latex does not render and the CSS and JS is not included. If I now open
extend_head.html
and save it, hugo recompiles, the page reloads, the imports are there and Katex renders. But if I now modify the article and save that file, it doesn't render again. Any idea what could cause this?The text was updated successfully, but these errors were encountered: