How to encrypt your post

Check here to preview the encrypt style: https://dyingdown.github.io/2020/08/11/How-to-encrypt-your-post/

Sometimes we want to write something that we don’t want all the web users to read. And the way we add password at <head> is no safe. So we can use hexo plugin hexo-blog-encrypt to set password for our post.

Install

Use npm to install.

npm install hexo-blog-encrypt

Use yarn to install

yarn add hexo-blog-encrypt

Settings

In your root _config.yml file, add these:

# encrypt plugin
encrypt:
  enable: true
  default_abstract: 这是一篇加密文章,内容可能是个人日常吐槽或者特殊技术分享。如果你确实想看,请与我联系。非亲友团勿扰。
  default_message: 输入密码,查看文章。

Default abstract is the default description of your post. And default message is the default message that shows before the input frame.

Or, you can set it in every post.

keywords: 博客文章密码
password: 123456
message: 密码:123456
abstract: xxxxxx
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值