Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexo 的 prism 与 highlight 支持 #28

Closed
yuzijiangorz opened this issue May 15, 2020 · 2 comments
Closed

hexo 的 prism 与 highlight 支持 #28

yuzijiangorz opened this issue May 15, 2020 · 2 comments

Comments

@yuzijiangorz
Copy link

我建议,除了Hexo-prism-plugin外,还能用回highlight.js

highlight.js虽然会拖慢机子的运行速度。

但hexo-prism-plugin对C++的不友好,我深有体会

hexo-prism-plugin关于无法渲染C++的问题。issue大大小小提了三个。

可hexo-prism-plugin的作者给出的回答是

这个在我的机子上就有用。

建议你看一下官方文档,我们是支持C++的

啊,要不然你们就用C来渲染C++吧

而且在17,18年后好像也不怎么维护了。issue也不回了。

搞得我真想口吐芬芳

issue1

issue2

issue3

@YunYouJun
Copy link
Owner

关于 hexo-prism-plugin 的确许久不再维护,我之所以仍然在使用它,是因为我打算在 Hexo 5.0 发布后,直接使用 Hexo 内置的 Prism。

Hexo 5.0 Roadmap 确定会原生支持 Prism hexojs/hexo#4002 (comment)


关于 C++ 高亮,请尝试使用 cpp

我的 C++ 代码测试正常。

image

https://www.yunyoujun.cn/note/opengl-with-macos/#Progress

@YunYouJun YunYouJun changed the title 提个建议 hexo 的 prism 与 highlight 支持 May 15, 2020
@YunYouJun
Copy link
Owner

现已适配 hexo 5.0 原生 prismjs 代码高亮,可移除 hexo-prism-plugin。
使用 CDN 方式加载 prism 样式,同时还可为亮暗模式设置不同模式的代码高亮主题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants