hexo blog tool

  1. Environment requirement
  2. Install hexo
  3. Commands
  4. Configure
  5. Theme
  6. Deploy
  7. Permalinks

Full doc

Environment requirement

  • nodejs
  • git

Install hexo

npm install -g hexo-cli

Commands

Init project

hexo init <folder>
cd <folder>
npm install

New page(about me)

hexo new page --path about/me "About me"

New post

hexo new post "post name"

Generate
Generates static files.

hexo generate
hexo g

Clean

hexo Clean

Deploy

hexo d
hexo deploy

Serve local

hexo server

http://localhost:4000/

Configure

All configuration in _config.yml

url: url of you blog website
theme: theme you want to use
deploy:
type: git
repo: git@github.com: user/user.github.io.git
branch: master

Theme

refer to theme

Deploy

Command line

hexo Clean
hexo generate
hexo deploy

Travis:
https://hexo.io/docs/github-pages

To create a multi-language site, you can modify the new_post_name and permalink settings like this:

new_post_name: :lang/:title.md
permalink: :lang/:title/

When you create a new post, the post will be saved to:

hexo new "Hello World" --lang tw
# => source/_posts/tw/Hello-World.md

and the URL will be:

http://localhost:4000/tw/hello-world/

Please respect copyright, feel free to leave comment for any mistake or confusion. 转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论。

文章标题(Title):hexo blog tool

文章字数(Word count):178

本文作者(Author):Siyuan Qiu

发布时间(Post Date):2019-11-01, 19:44:01

最后更新(Last updated):2020-02-07, 18:55:28

原始链接(Source link):https://qiusiyuan.github.io/hexo-blog-tool/en/

版权声明(License): "署名-非商用-相同方式共享 4.0 (CC BY-NC-SA 4.0)"

目录 Index