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

KaTeX fonts are not rendered by Vite (not in Vite server.fs.allow[]) #1538

Closed
exhumea opened this issue Apr 16, 2024 · 0 comments · Fixed by #1559
Closed

KaTeX fonts are not rendered by Vite (not in Vite server.fs.allow[]) #1538

exhumea opened this issue Apr 16, 2024 · 0 comments · Fixed by #1559
Labels
bug Something isn't working

Comments

@exhumea
Copy link

exhumea commented Apr 16, 2024

Describe the bug
KaTeX fonts are not rendered by Vite for slides in a sub-directory (not in Vite server.fs.allow[]).

> slidev export --format pdf SUBDIR/slides.md

  ●■▲
  Slidev  v0.48.9 

  theme       slidev-theme-frankfurt
  css engine  unocss
  entry       SUBDIR/slides.md
  ■ rendering...The request url "./node_modules/katex/dist/fonts/KaTeX_Main-Regular.woff2" is outside of Vite serving allow list.

- ./SUBDIR
- ./node_modules/@slidev/cli
- ./node_modules/@slidev/client
- ./node_modules/slidev-theme-frankfurt
- ./node_modules/vite/dist/client

Refer to docs https://vitejs.dev/config/server-options.html#server-fs-allow for configurations and more details.

The request url "./node_modules/katex/dist/fonts/KaTeX_Main-Regular.woff2" is outside of Vite serving allow list.
The request url "./node_modules/katex/dist/fonts/KaTeX_Math-Italic.woff" is outside of Vite serving allow list.
[...]

  ✓ exported to ./slides-export.pdf

To Reproduce

  1. npm init [email protected]
  2. Add a $X = Y$ TeX formula somewhere
  3. Move slides.md (and any sub-pages, snippets) in a sub-directory
  4. npm run export -- SUBDIR/slides.md

Versions:

  • OS: Debian GNU/Linux 12 (bookworm)
  • Slidev version: 0.48.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants