Comments (8)
@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/
from hextra.
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.
On your deployed site, they still keep these mixed-case names. E.g. imfing.github.io/.../KaTeX_AMS-Regular.woff2 exists while imfing.github.io/.../katex_ams-regular.woff2 does not exist.
So far, so good.
Next, I'm locally running hugo server
in my site's repository. Here, https://localhost:1313/lib/katex/fonts/KaTeX_AMS-Regular.woff2 and https://localhost:1313/lib/katex/fonts/katex_ams-regular.woff2 both URLs exist and a mixed-case or lower-case file, respectively, lands in my downloads.
This is already interesting.
Finally, I'm locally running just the build command hugo
in my repository. Now the public folder contains only the lower-case font files, e.g. public/lib/katex/fonts/katex_ams-regular.woff2.
Since this is what arrives on GitLab pages, it's no wonder that the mixed-case URLs lead to a 404.
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.
from hextra.
This may be related to the setting disablePathToLower which is false by default. However, simple setting this to true in my hugo.yaml
doesn't seem to be sufficient.
Also, as of this comment, hugo server
is case insensitive which would explain why I don't have issues there.
from hextra.
I have the same problem. I'm not deploy the site with GitLab or GitHub Pages. Instead, I use hugo -D -w
to deploy it on my own server and when it comes to render KaTex signs, it fails to load resource with a status of 404. I'm looking for a solution.
from hextra.
@Hifive55555 Hi, did you check the browser devtool network tab? I wonder if it's caused by requesting the lower-case font files?
from hextra.
@jonasreiher @Hifive55555 I believe it's a Hugo issue, in the newest 0.123.x I was able to reproduce it
v0.122.0
$ hugo
Start building sites …
hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended linux/amd64 BuildDate=2024-01-26T15:54:24Z VendorInfo=gohugoio
| EN
-------------------+-----
Pages | 14
Paginator pages | 0
Non-page files | 0
Static files | 11
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Total in 134 ms
$ ls public/lib/katex/fonts/
KaTeX_AMS-Regular.ttf KaTeX_Fraktur-Regular.ttf KaTeX_Main-Regular.ttf
v0.123.6
$ hugo
Start building sites …
hugo v0.123.6-92684f9a26838a46d1a81e3c250fef5207bcb735+extended linux/amd64 BuildDate=2024-02-28T18:29:40Z VendorInfo=brew
| EN
-------------------+-----
Pages | 15
Paginator pages | 0
Non-page files | 0
Static files | 11
Processed images | 0
Aliases | 0
Cleaned | 0
Total in 107 ms
$ ls public/lib/katex/fonts/
katex_ams-regular.ttf katex_fraktur-regular.ttf katex_main-regular.ttf
from hextra.
updates: I believe it's fixed by gohugoio/hugo@7023cf0
Please wait for Hugo to cut a patch release
Related issue: gohugoio/hugo#12182
from hextra.
Indeed! Thank you for finding this! In the meantime, I'll go back to Hugo v.0.122
from hextra.
Related Issues (20)
- Automatic redirect from page 404. HOT 1
- ---
- Steps are displayed in the "on this page" menu, even though they are not titles or navigation items HOT 1
- _index.md with no title inherits name from folder name
- Allow changing background color HOT 10
- Feature Request: Folder name with no _index should not direct to empty page. Show subpages instead HOT 11
- Make custom Tailwind CSS work
- Feature request: vertical line for toc like the one in nav HOT 1
- 配置相关问题咨询 HOT 2
- Indented callouts rendered incorrectly HOT 4
- can not see the copy button when hover HOT 3
- feature request: support for Umami analytics
- How to include all css in assets/css HOT 6
- Pagination for blog listing page
- Partial for Card shortcode
- Add light/dark theme switch to navigation
- Request for Conversion of Hextra to WordPress Theme HOT 1
- Links don't work within Callout Shortcodes HOT 1
- Default Click-To-Zoom / Image-Zoom capability HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hextra.