Hexo添加emoji

1)安装markdown-it

$ npm un hexo-renderer-marked –save

$ npm i hexo-renderer-markdown-it –save

1545487774698.png
1545487774698.png

2)安装markdown-it-emoji插件

找到对应下的目录:
G:\zhgv.github.io\node_modules\hexo-renderer-markdown-it

1545487976116.png
1545487976116.png

1545488037385.png
1545488037385.png

3)配置_config.yml文件

在hexo的配置文件下添加markdown-it配置代码:

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 #用emoji插件
anchors:
level: 2
collisionSuffix: 'v'
permalink: true
permalinkClass: header-anchor
permalinkSymbol: ¶

测试

😂😊😜😘😭