Install hexo-cli
Init Blog
1 2
| hexo init <folder> npm install
|
set theme
下载 最新 release 版本 (opens new window)解压到 themes 目录,并将解压出的文件夹重命名为 fluid。
修改blog中的 _config.yml
1 2
| theme: fluid language: zh-CN
|
清理
创建页面的多种方法
1 2 3 4
| hexo new "blog title" hexo new page --path about/me "About me" hexo new page about #创建一个 source/about/me.md 文件,同时 Front Matter 中的 title 为 "About me"
|
生成静态文件
1
| hexo generate 简写为`hexo g`
|
启动服务 server
1 2
| hexo server 简写为 `hexo s` http://localhost:4000/
|
放至图片的方法
- 在
source
目录中可添加images
目录,将图片放至此处
- 在随后使用
hexo g
生成的public
静态文件中会将images
目录拷贝过来
- 在markdown中使用
 进行图片引用
PS: 以_
开头的文件夹或文件不会被拷贝, source中与hexo模板中的同名文件夹内容会被合并
links
https://hexo.io/zh-cn/docs/commands