KeJunMao / jekyll-theme-mdui

🍷A Jekyll theme based on MDUI
https://stoic-minsky-d7bb8b.netlify.app/
MIT License
171 stars 72 forks source link

请问如何增加支持高亮的语言? #51

Closed moi-mo closed 4 years ago

moi-mo commented 4 years ago

I certify that I have first consulted (check all with "x")


I'm submitting a (check one with "x")

请问如何增加prism支持语言……是直接在/data/site.yml里面新加上吗?这样的话并没有渲染……
我的site.yml 包含并没有被渲染的c++代码的文章

KeJunMao commented 4 years ago

你好,原理就是根据 components 的值引入对应 js.

按照你想要的写了个例子:

prism:
  themes: prism-solarizedlight
  components:
    - bash
    - python
    - c
    - cpp

推荐你在这里,浏览器搜索,然后输入 components/prism-[语言] 来检查是否有支持!

🥳

moi-mo commented 4 years ago

那应该是把cpp写成c++了吧…x 谢谢!