How to hide posts in hexo
How to hide posts in hexo
Sometimes, we want to keep certain posts invisible to the public, but still traceable in the source folder for later use.
Move files to _drafts folder
One way for doing that is to move a certain post to _drafts folder. Per default, hexo will not render and generate files in _drafts folder. Later one can use this command to publish it back to _posts folder.
1 | $ hexo publish [layout] <title> |
Use hexo-hide-post plugin
Installation
Another solution is to install this plugin from github: hexo-hide-post
1 | $ npm install hexo-hide-posts --save |
Configuration
After installation, add configurations in your _config.yml file.
1 | # hexo-hide-posts |
e.g. Set filter to secret, so you can use secret: true in front-matter instead.
Usage
Add meta information to the front matter of your post accordingly, e.g.
1 | --- |