最近刚刚上手Hexo, 对于有些问题还比较生疏, 对于如题所示, 相信你可能看到它之前已经焦头烂额, 不知如何是好. 我耗费老长时间找到一篇博文, 我的问题已经成功解决, 我把它记录下来, 揣进我终于在互联网搭建成功的简陋的「小屋」里, 也分享给读者们! 我们现在开始吧😀
解决方法
使用命令
1 2
| npm un hexo-renderer-marked --save npm i hexo-renderer-markdown-it --save
|
添加到站点配置文件(即_config.yml文件)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| # Markdown-it config ## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki markdown: render: html: true xhtmlOut: false breaks: true linkify: true typographer: true quotes: '“”‘’' plugins: - markdown-it-abbr - markdown-it-footnote - markdown-it-ins - markdown-it-sub - markdown-it-sup - markdown-it-emoji # add emoji anchors: level: 2 collisionSuffix: 'v' permalink: true permalinkClass: header-anchor permalinkSymbol: ¶
|
注:第一条命令为卸载插件,第二条命令是安装新的插件(个人的说法)
Ta-da! 如同施了魔法一般, 大功告成!
后记
最重要的是自己学会解决问题, 自己去找到答案, 提高「搜商」, 在茫茫互联网中快速找到自己想要的信息. 也写给自己.