mirror of https://github.com/YunYouJun/valaxy
docs: add how to custom katex options, close #308
This commit is contained in:
parent
0f20cdf34c
commit
7969b4a86c
|
@ -421,6 +421,24 @@ $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
|
|||
| $\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}}$ | curl of $\vec{\mathbf{E}}$ is proportional to the rate of change of $\vec{\mathbf{B}}$ |
|
||||
| $\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} = 4 \pi \rho$ | _wha?_ |
|
||||
|
||||
### Custom KaTeX Options
|
||||
|
||||
> [KaTeX options](https://katex.org/docs/options.html)
|
||||
|
||||
```ts
|
||||
export default defineValaxyConfig({
|
||||
markdown: {
|
||||
/**
|
||||
* KaTeX options
|
||||
* @see https://katex.org/docs/options.html
|
||||
*/
|
||||
katex: {
|
||||
strict: false
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Markdown File Inclusion
|
||||
|
||||
::: tip
|
||||
|
|
|
@ -56,6 +56,9 @@ export interface MarkdownOptions {
|
|||
|
||||
lineNumbers?: boolean
|
||||
|
||||
/**
|
||||
* @see https://katex.org/docs/options.html
|
||||
*/
|
||||
katex?: KatexOptions
|
||||
/**
|
||||
* shiki
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
"@iconify-json/ri": "^1.1.18",
|
||||
"@intlify/unplugin-vue-i18n": "^2.0.0",
|
||||
"@types/body-scroll-lock": "^3.1.2",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@unhead/addons": "^1.8.9",
|
||||
"@unhead/schema-org": "^1.8.9",
|
||||
"@unhead/vue": "^1.8.9",
|
||||
|
@ -135,7 +136,6 @@
|
|||
"@types/cross-spawn": "^6.0.6",
|
||||
"@types/ejs": "^3.1.5",
|
||||
"@types/html-to-text": "^9.0.4",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@types/markdown-it": "^13.0.7",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/pascalcase": "^1.0.3",
|
||||
|
|
|
@ -10,7 +10,7 @@ importers:
|
|||
devDependencies:
|
||||
'@antfu/eslint-config':
|
||||
specifier: 2.4.6
|
||||
version: 2.4.6(@vue/compiler-sfc@3.3.12)(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0)
|
||||
version: 2.4.6(@vue/compiler-sfc@3.3.13)(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0)
|
||||
'@iconify-json/logos':
|
||||
specifier: ^1.1.41
|
||||
version: 1.1.41
|
||||
|
@ -235,6 +235,9 @@ importers:
|
|||
'@types/body-scroll-lock':
|
||||
specifier: ^3.1.2
|
||||
version: 3.1.2
|
||||
'@types/katex':
|
||||
specifier: ^0.16.7
|
||||
version: 0.16.7
|
||||
'@unhead/addons':
|
||||
specifier: ^1.8.9
|
||||
version: 1.8.9(rollup@3.29.4)
|
||||
|
@ -381,7 +384,7 @@ importers:
|
|||
version: 5.0.10(@types/node@20.10.5)(sass@1.69.5)
|
||||
vite-plugin-pages:
|
||||
specifier: ^0.32.0
|
||||
version: 0.32.0(@vue/compiler-sfc@3.3.12)(vite@5.0.10)
|
||||
version: 0.32.0(@vue/compiler-sfc@3.3.13)(vite@5.0.10)
|
||||
vite-plugin-vue-layouts:
|
||||
specifier: ^0.10.0
|
||||
version: 0.10.0(vite@5.0.10)(vue-router@4.2.5)(vue@3.3.13)
|
||||
|
@ -434,9 +437,6 @@ importers:
|
|||
'@types/html-to-text':
|
||||
specifier: ^9.0.4
|
||||
version: 9.0.4
|
||||
'@types/katex':
|
||||
specifier: ^0.16.7
|
||||
version: 0.16.7
|
||||
'@types/markdown-it':
|
||||
specifier: ^13.0.7
|
||||
version: 13.0.7
|
||||
|
@ -688,7 +688,7 @@ packages:
|
|||
'@jridgewell/gen-mapping': 0.3.3
|
||||
'@jridgewell/trace-mapping': 0.3.20
|
||||
|
||||
/@antfu/eslint-config@2.4.6(@vue/compiler-sfc@3.3.12)(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0):
|
||||
/@antfu/eslint-config@2.4.6(@vue/compiler-sfc@3.3.13)(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0):
|
||||
resolution: {integrity: sha512-dwRlY//llv3xnzLdSJzjEQQ/uS9p5rdNh7m4k2sqUlo4PsJ9EXBTWnZl6BPJZIGoVZGpDiGBpyO8hG/5I7yLrQ==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
@ -736,7 +736,7 @@ packages:
|
|||
eslint-plugin-vitest: 0.3.18(@typescript-eslint/eslint-plugin@6.14.0)(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0)
|
||||
eslint-plugin-vue: 9.19.2(eslint@8.56.0)
|
||||
eslint-plugin-yml: 1.11.0(eslint@8.56.0)
|
||||
eslint-processor-vue-blocks: 0.1.1(@vue/compiler-sfc@3.3.12)(eslint@8.56.0)
|
||||
eslint-processor-vue-blocks: 0.1.1(@vue/compiler-sfc@3.3.13)(eslint@8.56.0)
|
||||
globals: 13.24.0
|
||||
jsonc-eslint-parser: 2.4.0
|
||||
local-pkg: 0.5.0
|
||||
|
@ -3323,7 +3323,7 @@ packages:
|
|||
|
||||
/@types/katex@0.16.7:
|
||||
resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==}
|
||||
dev: true
|
||||
dev: false
|
||||
|
||||
/@types/linkify-it@3.0.5:
|
||||
resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==}
|
||||
|
@ -3992,6 +3992,7 @@ packages:
|
|||
magic-string: 0.30.5
|
||||
postcss: 8.4.32
|
||||
source-map-js: 1.0.2
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-sfc@3.3.13:
|
||||
resolution: {integrity: sha512-DQVmHEy/EKIgggvnGRLx21hSqnr1smUS9Aq8tfxiiot8UR0/pXKHN9k78/qQ7etyQTFj5em5nruODON7dBeumw==}
|
||||
|
@ -4012,6 +4013,7 @@ packages:
|
|||
dependencies:
|
||||
'@vue/compiler-dom': 3.3.12
|
||||
'@vue/shared': 3.3.12
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-ssr@3.3.13:
|
||||
resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==}
|
||||
|
@ -4050,6 +4052,7 @@ packages:
|
|||
'@vue/shared': 3.3.12
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.5
|
||||
dev: false
|
||||
|
||||
/@vue/reactivity-transform@3.3.13:
|
||||
resolution: {integrity: sha512-oWnydGH0bBauhXvh5KXUy61xr9gKaMbtsMHk40IK9M4gMuKPJ342tKFarY0eQ6jef8906m35q37wwA8DMZOm5Q==}
|
||||
|
@ -6200,13 +6203,13 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-processor-vue-blocks@0.1.1(@vue/compiler-sfc@3.3.12)(eslint@8.56.0):
|
||||
/eslint-processor-vue-blocks@0.1.1(@vue/compiler-sfc@3.3.13)(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-9+dU5lU881log570oBwpelaJmOfOzSniben7IWEDRYQPPWwlvaV7NhOtsTuUWDqpYT+dtKKWPsgz4OkOi+aZnA==}
|
||||
peerDependencies:
|
||||
'@vue/compiler-sfc': ^3.3.0
|
||||
eslint: ^8.50.0
|
||||
dependencies:
|
||||
'@vue/compiler-sfc': 3.3.12
|
||||
'@vue/compiler-sfc': 3.3.13
|
||||
eslint: 8.56.0
|
||||
dev: true
|
||||
|
||||
|
@ -11285,7 +11288,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-plugin-pages@0.32.0(@vue/compiler-sfc@3.3.12)(vite@5.0.10):
|
||||
/vite-plugin-pages@0.32.0(@vue/compiler-sfc@3.3.13)(vite@5.0.10):
|
||||
resolution: {integrity: sha512-OxS3n0zUo5wsfgNCAuw2FiG/KD1ipgQV+2Flst4RyeI2iPv+m0YueVq+nx41k5NOWJj/zhqEas6I0b7HXveXjA==}
|
||||
peerDependencies:
|
||||
'@vue/compiler-sfc': ^2.7.0 || ^3.0.0
|
||||
|
@ -11295,7 +11298,7 @@ packages:
|
|||
optional: true
|
||||
dependencies:
|
||||
'@types/debug': 4.1.12
|
||||
'@vue/compiler-sfc': 3.3.12
|
||||
'@vue/compiler-sfc': 3.3.13
|
||||
debug: 4.3.4(supports-color@8.1.1)
|
||||
deep-equal: 2.2.3
|
||||
extract-comments: 1.1.0
|
||||
|
|
Loading…
Reference in New Issue