This is my first post with Hexo/Github. Welcome to the new world! I hope you can easily get your owned blog ready with this post.
Welcome to Hexo! To check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Install and setup hexo for your blog
搭建系统使用的 npm, node, git 版本信息。
➜ hexo git --version |
Install hexo and hexo-cli
全局安装hexo和hexo-clinpm install -g hexo
npm install -g hexo-cli
Initial your blog with hexo
使用hexo初始化博客系统cd hexo
hexo init
Install hexo plugins
Hexo 支持众多的插件。具体设置可以参考Hexo Deployment。
# install plugin for deployment |
Install theme and enable it
Hexo缺省的主题是landscape。这里我们安装使用了另外一个主题Anisina。
git clone https://github.com/Haojen/hexo-theme-Anisina.git themes/Anisina |
Generate static documents and start local server to preview them.
hexo g |
Deploy to github
hexo d |
Hexo short commands
hexo s == hexo server |
Quick Start
Create a new post
$ hexo new "My New Post" |
More info: Writing
Run server
$ hexo server |
More info: Server
Generate static files
$ hexo generate |
More info: Generating
Deploy to remote sites
$ hexo deploy |
More info: Deployment
Refer to:
- https://hexo.io/zh-cn/
- https://www.zhihu.com/question/20962496
- https://www.cnblogs.com/liuxianan/p/build-blog-website-by-hexo-github.html
- https://github.com/haojen/hexo-theme-Anisina