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

主题好好看! #29

Open
liaries3 opened this issue Jun 14, 2021 · 11 comments
Open

主题好好看! #29

liaries3 opened this issue Jun 14, 2021 · 11 comments

Comments

@liaries3
Copy link

主题好好看!就是文档不太全,有些bug不会搞😧

@liaries3
Copy link
Author

Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin.
这个要在哪儿设置一下吗

@DreamStar1996
Copy link

DreamStar1996 commented Jun 15, 2021

参考我的。。。。反馈

@liaries3
Copy link
Author

参考我的。 反馈。

昨天参考过你那个了。现在这个我也不知道有没有影响,说确保已加载Autoloader插件

@DreamStar1996
Copy link

不会影响的,如果担心出现影响的话,可以回退旧的版本

@liaries3
Copy link
Author

不会影响的,如果担心出现影响的话,可以退回旧版本

那就行,多谢大哥

@liaries3
Copy link
Author

不会影响的,如果担心出现影响的话,可以回退旧的版本

大哥,低版本咋换,我想试试

@DreamStar1996
Copy link

1、卸载node_modules 或者 npm uninstall js-yaml(推荐第二种)
2、然后npm install [email protected] 安装旧的版本

@liaries3
Copy link
Author

1、卸载node_modules 或者 npm uninstall js-yaml(推荐第二种)
2、然后npm install [email protected] 安装旧的版本

那个搜索的插件我想换本地搜索的那个要怎么换

@DreamStar1996
Copy link

@geraintlyu
Copy link

Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin.
这个要在哪儿设置一下吗

这是因为这个主题使用prismjs来实现代码美化,但是要想让prismjs自动识别出所需要美化的是哪一种语言就需要在用到一个Autoloader plugin来实现自动识别。这是prismjs的官方解决
下面是具体的解决方法,希望能够帮到你:

  1. 编辑<hexo_blog root>/node_modules/prismjs/prism.js文件,点击这个连接所在网页下面的DOWNLOAD JS按钮,将下载的文件的内容替换到 <hexo_blog root>/node_modules/prismjs/prism.js文件中
# 如果你是用的是Linux OS, 你可以这样做
vim <hexo_blog root>/node_modules/prismjs/prism.js
# 然后将原有的内容删除,将点击DOWNLOAD JS按钮下载的网页,记得`:wq`

# 如果你是用的是windows,那你就直接把下载的prism.js文件,替换原来的文件就可以了

2.重新hexo g或者hexo s应该就不会报错了

@jiankychen
Copy link

Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin.
这个要在哪儿设置一下吗

这是因为这个主题使用prismjs来实现代码美化,但是要想让prismjs自动识别出所需要美化的是哪一种语言就需要在用到一个Autoloader plugin来实现自动识别。这是prismjs的官方解决 下面是具体的解决方法,希望能够帮到你:

  1. 编辑<hexo_blog root>/node_modules/prismjs/prism.js文件,点击这个连接所在网页下面的DOWNLOAD JS按钮,将下载的文件的内容替换到 <hexo_blog root>/node_modules/prismjs/prism.js文件中
# 如果你是用的是Linux OS, 你可以这样做
vim <hexo_blog root>/node_modules/prismjs/prism.js
# 然后将原有的内容删除,将点击DOWNLOAD JS按钮下载的网页,记得`:wq`

# 如果你是用的是windows,那你就直接把下载的prism.js文件,替换原来的文件就可以了

2.重新hexo g或者hexo s应该就不会报错了

如果博客采用了 hexo-renderer-multi-markdown-it 插件的话,似乎应该是替换 <hexo_blog root>/node_modules/hexo-renderer-multi-markdown-it\node_modules\prismjs 路径下的 prism.js 文件

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

4 participants