blinkfox / hexo-theme-matery

A beautiful hexo blog theme with material design and responsive design.一个基于材料设计和响应式设计而成的全面、美观的Hexo主题。国内访问:http://blinkfox.com
https://blinkfox.github.io/
Apache License 2.0
5.23k stars 1.25k forks source link

代码块高亮好像不支持hexo 7.0.0 #898

Closed MrAriten closed 9 months ago

MrAriten commented 10 months ago

我在7.0.0版本下捣鼓了半天,最后是在hexo init命令执行的时候,因为网络问题没有用到最新的hexo-starter,而hexo-starter在上周从6.3.0更新到了7.0.0版本的hexp

INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git fatal: unable to access 'https://github.com/hexojs/hexo-starter.git/': Recv failure: Connection was reset WARN git clone failed. Copying data instead

阴差阳错安装了6.3.0的hexo,代码块才能高亮

Talljack commented 10 months ago
image

我的 7.0.0代码显示也有问题,按照文档配置的

image
MrAriten commented 10 months ago
image

我的 7.0.0代码显示也有问题,按照文档配置的

image

你hexo init的时候不要联网就行了,这样就不会安装最新的hexo

zhszstudy commented 10 months ago

我也是7.0版本,降级就好了

#全局卸载
npm uninstall hexo-cli -g
#重装
npm install -g hexo-cli@4.2.0
#查看版本
hexo version
#清除缓存
hexo clean
#运行
hexo serve
Talljack commented 10 months ago

嗯嗯 已经降级到6.3了

zhszstudy commented 10 months ago

嗯嗯 已经降级到6.3了

好家伙,刚评论完就回复,,

Nan-ying commented 10 months ago

我也是7.0版本,降级就好了

#全局卸载
npm uninstall hexo-cli -g
#重装
npm install -g hexo-cli@4.2.0
#查看版本
hexo version
#清除缓存
hexo clean
#运行
hexo serve

这个好像还是安装的7.0.0版本,请问怎么降级呀,官网一直推荐的最新版本

Nan-ying commented 10 months ago

我也是7.0版本,降级就好了

#全局卸载
npm uninstall hexo-cli -g
#重装
npm install -g hexo-cli@4.2.0
#查看版本
hexo version
#清除缓存
hexo clean
#运行
hexo serve

这个好像还是安装的7.0.0版本,请问怎么降级呀,官网一直推荐的最新版本

解决了,直接将hexo init生成的文件中的package.json中的hexo版本修改一下即可降级

"dependencies": {
  "hexo": "^7.0.0", // 这里改成6.3.0
  "hexo-generator-archive": "^2.0.0",
  "hexo-generator-category": "^2.0.0",
  "hexo-generator-index": "^3.0.0",
  "hexo-generator-tag": "^2.0.0",
  "hexo-renderer-ejs": "^2.0.0",
  "hexo-renderer-marked": "^6.0.0",
  "hexo-renderer-stylus": "^3.0.0",
  "hexo-server": "^3.0.0",
  "hexo-theme-landscape": "^1.0.0"
}
A-caibird commented 9 months ago

我也是7.0版本,降级就好了

#全局卸载
npm uninstall hexo-cli -g
#重装
npm install -g hexo-cli@4.2.0
#查看版本
hexo version
#清除缓存
hexo clean
#运行
hexo serve

这个有效的,解决了感谢

moyin1004 commented 9 months ago

https://github.com/hexojs/hexo/issues/5283 @Talljack @936127241 @MrAriten @Nan-ying @A-caibird 7.0新增配置项就可以了

syntax_highlighter: prismjs
marcos-boy commented 9 months ago

hexojs/hexo#5283 @Talljack @936127241 @MrAriten @Nan-ying @A-caibird 7.0新增配置项就可以了

syntax_highlighter: prismjs

折腾一天,原来是版本问题,已解决,感谢!

A-caibird commented 9 months ago

hexojs/hexo#5283 @Talljack @936127241 @MrAriten @Nan-ying @A-caibird 7.0新增配置项就可以了

syntax_highlighter: prismjs

折腾一天,原来是版本问题,已解决,感谢!

感谢,设置了一下就好了

levi5611 commented 5 months ago

hexojs/hexo#5283 @Talljack @936127241 @MrAriten @Nan-ying @A-caibird 7.0新增配置项就可以了

syntax_highlighter: prismjs

感谢感谢,一下就行了