静态博客加密插件:hexo-blog-encrypt,搭配此插件你可以写一些私密博客,通过密码验证的方式让人不能随意浏览。

安装:

1
npm install hexo-blog-encrtpt

用法:

文章头添加关键字password即可设置文章访问密码

1
2
3
4
5
---
title: Hello World
date: 2016-03-30 21:18:02
password: hello
---

高级用法:

1
2
3
4
5
6
7
8
---
title: Hello World
date: 2016-03-30 21:12:21
password: hello
abstract: Here's something encrypted, password is required to continue reading.
message: Hey, password is required here.
wrong_pass_message: Oh, this is an invalid password. Check and try again, please.
---
  • abstract:用于设置加密文章显示的摘要。
  • message:输入密码提示。
  • wrong_pass_message: 输入错误提示。