Skip to content

feat: add option to pass directory to site.Params.math.katex.assets - #1025

Open
Keonik1 wants to merge 1 commit into
imfing:mainfrom
Keonik1:feature/directory-to-katex_assets
Open

feat: add option to pass directory to site.Params.math.katex.assets#1025
Keonik1 wants to merge 1 commit into
imfing:mainfrom
Keonik1:feature/directory-to-katex_assets

Conversation

@Keonik1

@Keonik1 Keonik1 commented Aug 20, 2026

Copy link
Copy Markdown

Problem

In params.math.katex.assets, you have to specify a whole list of files, which is inconvenient if there are many of them (such as fonts), because it bloats the hugo.yaml file

Solution

Added the ability to specify a directory so that all files in it are included, without having to list every file individually (combined approaches also work)

Before

# hugo.yaml
params:
  math:
    engine: katex
    katex:
      css: “css/katex.min.css”
      assets:
        - css/fonts/KaTeX_AMS-Regular.ttf
        - css/fonts/KaTeX_AMS-Regular.woff
        - css/fonts/KaTeX_AMS-Regular.woff2
        - css/fonts/KaTeX_Caligraphic-Bold.ttf
        ...

Now

# hugo.yaml
params:
  math:
    engine: katex
    katex:
      css: “css/katex.min.css”
      assets:
        - css/fonts/

@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 7354937
🔍 Latest deploy log https://app.netlify.com/projects/hugo-hextra/deploys/6a86b9f285eb950008115d76
😎 Deploy Preview https://deploy-preview-1025--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 project configuration.

@imfing imfing self-assigned this Aug 25, 2026
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.

2 participants