ORIGIN

How to encrypt your post

Blog 1 min174 words

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.

1
npm install hexo-blog-encrypt

Use yarn to install

1
yarn add hexo-blog-encrypt

Settings

In your root _config.yml file, add these:

1
2
3
4
5
# 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.

1
2
3
4
keywords: 博客文章密码
password: 123456
message: 密码:123456
abstract: xxxxxx
TOP
COMMENT
  • ABOUT
  • |
o_oyao
  The Jigsaw puzzle is incomplete with even one missing piece. And I want to be the last piece to make the puzzle complete.
Like my post?
Default QR Code
made with ❤️ by o_oyao
©o_oyao 2019-2024

|