-
参考 dumi 如何支持对 Swift、C#、Kotlin 等语言的语法高亮?,使用 我尝试使用 尝试过程: ╭─felix at FelixMacBookPro in ~/Downloads/doc 24-07-28 - 15:43:01
╰─○ npx create-dumi
✔ Pick template type › Static Site
✔ Pick NPM client › pnpm
✔ Input project name …
✔ Input project description … A static site based on dumi
✔ Input project author (Name <email@example.com>) … 选择了 // .dumi/global.ts
import Prism from 'prism-react-renderer/prism';
(typeof global !== 'undefined' ? global : window).Prism = Prism;
require('prismjs/components/prism-kotlin');
require('prismjs/components/prism-csharp'); 看上去如下图 这样会报错 我尝试安装了 页面能展示了,但是语法高亮没有生效 期待能帮帮我,自带的 |
Beta Was this translation helpful? Give feedback.
Answered by
GuoDapeng
Jul 31, 2024
Replies: 2 comments
-
我憨批了……,我看了一下 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
GuoDapeng
-
我也实验了一下,发现kotlin 不能正常显示 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我憨批了……,我看了一下
dumi
包,发现"prism-react-renderer": "^1.3.5",
这个,原来我用的版本不对,换成 1.3.5 就好了。