hexo daily command
create a new page or article.
1 | hexo new [layout] <title> |
most useful command hexo new post [title]
.
Layout | Path | content |
---|---|---|
post |
source/_posts |
blog article |
page |
source |
new page at top |
draft |
source/_drafts |
article draft |
The default filename of the .md
markdown file will be the title.
You can change the default filename by editing the new_post_name
setting under the _config.yml
of the blog.
You can add the following element to prefix your filename. For example, :year-:month-:day-:title.md
.
delete all the cache and static file.
1 | hexo clean |
use after install a new plugins or having new setting.
generate static file.
1 | hexo g |
deploy the static file.
1 | hexo d |
deploy instantly after generate statoc file.
1 | hexo g -d |
localhost to preview the blog.
1 | hexo s |
backup the blog to git.
1 | git add . |
used plugins
hexo-generator-search
A search function for the blog. You can check the original on GitHub.
install like this. Go to the root of your blog.
1 | npm install hexo-generator-search --save |
enable like this. Edit you blog _config.yml
.
1 | search: |
hexo-blog-encrypt
A plugins to encrypt your post. Only password holder can read you article.
check the original on GitHub.
install like this. Go to the root of your blog.
1 | npm install hexo-blog-encrypt |
enable like this. Edit you blog article.
1 |
|