服务端 katex-rs 只输出 HTML span,字体/排版靠配套 CSS。从 npm 包 katex 0.16.x 的 dist/ 拷贝 katex.min.css + woff2 字体(省去 woff/ttf)到 public/katex/, CSS 用相对 url(fonts/) 引用故两者须同级。 - libs/package.json: katex ^0.16.22 作 workspace 根 devDependency - Makefile: 新增 katex-css target,接入 build/build-linux/dev;clean 清 public/katex - Dioxus.toml: [web.resource]/[web.resource.dev] style 列表注册 /katex/katex.min.css - .gitignore: public/katex 作构建产物忽略(同 highlight.css 等) make katex-css 验证通过:23KB CSS + 20 个 woff2 字体就位。
25 lines
533 B
JSON
25 lines
533 B
JSON
{
|
|
"name": "yggdrasil-workspace",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "pnpm -r run build",
|
|
"test": "pnpm -r run test",
|
|
"typecheck": "pnpm -r run typecheck",
|
|
"lint": "biome check .",
|
|
"format": "biome format --write ."
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.5.3",
|
|
"happy-dom": "^20.10.6",
|
|
"katex": "^0.16.22",
|
|
"typescript": "^7.0.2",
|
|
"vite": "^8.1.3",
|
|
"vitest": "^4.1.10"
|
|
},
|
|
"packageManager": "pnpm@11.8.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
}
|
|
}
|