Skip to content
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

chore: server side rendering of math equations #589

Merged
merged 1 commit into from
Mar 30, 2025

Conversation

deining
Copy link
Contributor

@deining deining commented Feb 26, 2025

This PR brings server side rendering of math equations via hugo's built-in KaTeX rendering engine.

Advantages:

  • server side rendering (instead of client side rendering)
  • no JS needed for math content
  • typesetting of formulae using LaTeX standard syntax, no escaping of delimiters needed
  • no need to activate math mode in frontmatter any more
  • internal rendering engine supports rendering of chemical equations out of the box (as of hugo version 0.144.0)
  • no need to include KaTeX dependencies any more

I hope you like this PR.

Copy link

netlify bot commented Feb 26, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 1f40030
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/67bf89fb5acb110008f6c41c
😎 Deploy Preview https://deploy-preview-589--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.

@deining deining force-pushed the server-side-math-rendering branch 2 times, most recently from d089b75 to 35131cf Compare February 26, 2025 21:35
@deining deining force-pushed the server-side-math-rendering branch from 35131cf to 1f40030 Compare February 26, 2025 21:39
@imfing
Copy link
Owner

imfing commented Feb 28, 2025

Hi @deining,

Thank you, this is great! I plan to merge it in the next minor version.

I may follow up separately with a small PR to make the katex CDN configurable

@imfing imfing linked an issue Mar 23, 2025 that may be closed by this pull request
@imfing imfing merged commit b700825 into imfing:main Mar 30, 2025
4 checks passed
@deining deining deleted the server-side-math-rendering branch March 30, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants