Skip to content

Conversation

StarryReverie
Copy link
Contributor

@StarryReverie StarryReverie commented Apr 2, 2025

Currently, the KaTeX CSS file katex(\.min)?.css is retrieve from CDN, whose content is not patched:

@font-face {
    font-family: KaTeX_AMS;
    font-style: normal;
    font-weight: 400;
    src: url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")
}

// ...

On line 5, for example, fonts/KaTeX_AMS-Regular.woff2 is expanded to <my-website>/css/fonts/KaTeX_AMS-Regular.woff2, which is a nonexistent path in the docs website. This PR adds codes to replace these URLs with CDN's paths.

Fix #655.

Copy link

netlify bot commented Apr 2, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 5026dd4
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/67ed0a051b99030008224942
😎 Deploy Preview https://deploy-preview-656--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@imfing imfing merged commit 1f88cff into imfing:main Apr 3, 2025
4 checks passed
@StarryReverie StarryReverie deleted the fix-katex-fonts branch April 4, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Math fonts are missing after the introduction of SSR math formulas
2 participants