Skip to content

Commit febbe3b

Browse files
committed
updated config to support math
Signed-off-by: PRavaga <[email protected]>
1 parent d92ae6a commit febbe3b

File tree

3 files changed

+129
-2
lines changed

3 files changed

+129
-2
lines changed

docusaurus.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const lightCodeTheme = require("prism-react-renderer/themes/github");
22
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
3+
const math = require("remark-math");
4+
const katex = require("rehype-katex");
35

46
const config = {
57
title: "Zano Docs",
@@ -23,6 +25,8 @@ const config = {
2325
{
2426
docs: {
2527
sidebarPath: require.resolve("./sidebars.js"),
28+
remarkPlugins: [math],
29+
rehypePlugins: [katex],
2630
},
2731
theme: {
2832
customCss: require.resolve("./src/css/custom.css"),
@@ -31,6 +35,16 @@ const config = {
3135
],
3236
],
3337

38+
stylesheets: [
39+
{
40+
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
41+
type: "text/css",
42+
integrity:
43+
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
44+
crossorigin: "anonymous",
45+
},
46+
],
47+
3448
themeConfig: {
3549
image: "img/zano_dev_meta.png",
3650
navbar: {

package-lock.json

+111-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
"@docusaurus/preset-classic": "2.4.1",
1919
"@mdx-js/react": "^1.6.22",
2020
"clsx": "^1.2.1",
21+
"hast-util-is-element": "^1.1.0",
2122
"prism-react-renderer": "^1.3.5",
2223
"react": "^17.0.2",
23-
"react-dom": "^17.0.2"
24+
"react-dom": "^17.0.2",
25+
"rehype-katex": "^5.0.0",
26+
"remark-math": "^3.0.1"
2427
},
2528
"devDependencies": {
2629
"@docusaurus/module-type-aliases": "2.4.1"

0 commit comments

Comments
 (0)