插件安装
需要安装 hexo-blog-encrypt 插件,命令如下:
1
|
$ npm install --save hexo-blog-encrypt
|
开启加密插件
1
2
3
|
# Security
encrypt: # hexo-blog-encrypt
enable: true
|
给文章加密
1
2
3
4
5
6
7
|
---
title: Hexo文章加密访问
date: 2019-08-31
password: such a poor dog
abstract: Welcome to my blog, enter password to read.
message: password is such a poor dog
---
|
- password: 是该博客加密使用的密码
- abstract: 是该博客的摘要,会显示在博客的列表页
- message: 这个是博客查看时,密码输入框上面的描述性文字