-
Notifications
You must be signed in to change notification settings - Fork 143
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 fonts are incorrectly transformed to lower-case for Hugo v0.123 #309
Comments
@jonasreiher the font files are embedded here: https://github.com/imfing/hextra/tree/main/assets/lib/katex/fonts I'm not sure why GitLab normalize those filenames to all lower-cases. This issue doesn't happen on GitHub Pages though: https://imfing.github.io/hextra/docs/guide/latex/ |
Ok, I'm now relatively sure that this is not a GitLab issue. In the folder you referenced (/assets/lib/katex/fonts), the font files all have their original mixed-case names. Next, I'm locally running Finally, I'm locally running just the build command I haven't yet found out what is causing this renaming and why it's not happening on your site. Maybe the theme inclusion as a Hugo module does something unexpected. I'm using the Hugo and theme versions mentioned in the issue description above. |
This may be related to the setting disablePathToLower which is false by default. However, simple setting this to true in my Also, as of this comment, |
I have the same problem. I'm not deploy the site with GitLab or GitHub Pages. Instead, I use |
@Hifive55555 Hi, did you check the browser devtool network tab? I wonder if it's caused by requesting the lower-case font files? |
@jonasreiher @Hifive55555 I believe it's a Hugo issue, in the newest 0.123.x I was able to reproduce it v0.122.0
v0.123.6
|
updates: I believe it's fixed by gohugoio/hugo@7023cf0 Please wait for Hugo to cut a patch release Related issue: gohugoio/hugo#12182 |
Indeed! Thank you for finding this! In the meantime, I'll go back to Hugo v.0.122 |
Description
When deploying to GitLab Pages, the KaTeX fonts cannot be loaded since the queried URLs yield a 404:
Additional Context
I'm guessing this has to do with lower-case file names. The file assets/lib/katex/katex.min.css links all fonts with mixed-case file names, e.g.
KaTeX_AMS-Regular.woff2
but when building the site, the font files actually get lower-case file names, e.g.katex_ams-regular.woff2
.On my deployed site, the links with mixed-case file names actually yield a 404 while adjusted ones with all lower-case letters lead me to the right font files.
Steps To Reproduce
I'm not exactly sure what's required for reproduction, since I don't see this with a local hugo server, but something like this:
math: true
in the preamble.$$f(x) = \int_{-\infty}^\infty \hat{f}(\xi) e^{2 \pi i \xi x} d\xi$$
gitlab-ci.yml
:Expected Behavior
Math content should render with KaTeX fonts like this:
Actual Behavior
Math content is rendered with some default font and sizing/spacing is all messed up like this:
Environment
The text was updated successfully, but these errors were encountered: