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