violet留言板

详见:信笺样式留言板

  1. [BlogRoot]运行指令
1
npm install hexo-butterfly-envelope --save
  1. 在站点配置文件_config.yml主题配置文件_config.butterfly.yml添加以下配置项
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# envelope_comment  
# see https://akilar.top/posts/e2d3c450/
envelope_comment:
enable: true #控制开关
custom_pic:
cover: https://npm.elemecdn.com/hexo-butterfly-envelope/lib/violet.jpg #信笺头部图片
line: https://npm.elemecdn.com/hexo-butterfly-envelope/lib/line.png #信笺底部图片
beforeimg: https://npm.elemecdn.com/hexo-butterfly-envelope/lib/before.png # 信封前半部分
afterimg: https://npm.elemecdn.com/hexo-butterfly-envelope/lib/after.png # 信封后半部分
message: #信笺正文,多行文本,写法如下
- 有什么想问的?
- 有什么想说的?
- 有什么想吐槽的?
- 哪怕是有什么想吃的,都可以告诉我哦~
bottom: 自动书记人偶竭诚为您服务! #仅支持单行文本
height: #1050px,信封划出的高度
path: #【可选】comments 的路径名称。默认为 comments,生成的页面为 comments/index.html
front_matter: #【可选】comments页面的 front_matter 配置
title: 留言板
comments: true
  1. 留言板入口

注意上面的 path 路径默认是 /comments/index.xml,我们可以在菜单栏中但单独创建一个留言板入口

留言板的图标可以从 Fontawesome中获得,注意路径为/comments/

1
2
3
4
5
6
7
8
9
10
11
12
13
#导航栏
menu:  
  首页: / || fas fa-home  
  归档: /archives/ || fas fa-archive  
  标签: /tags/ || fas fa-tags  
  分类: /categories/ || fas fa-folder-open  
  娱乐||fa fa-heartbeat:  
    音乐: /music/ || fas fa-music  
    照片: /gallery/ || fas fa-images  
    电影: /movies/ || fas fa-video
  留言: /comments/ || fas fa-envelope-open-text  
  友链: /link/ || fas fa-link  
  关于: /about/ || fas fa-heart
  1. 再次清理,启动项目即可
1
hexo cl; hexo s