Readme
Readme
Git clone1
$ git clone xxx
Installation:
1 | $ npm install hexo -g #-g表示全局安装, npm默认为当前项目安装 |
博文会自动生成在博客目录下source/_posts\postName.md
1 | #文件自动生成格式: |
新建post之后会生成同名文件夹1
2
3#文件夹:
|-postName/
-postName.md
post文件夹为同名文件,作为assert folder使用
添加图片:
- 复制图片文件到postName/下
- 在post中插入代码
1
2
3
4
5
6{ }
or more
{ }
{ }
{ }
执行hexo g 后生成文件在public/下,可以部署到服务器
其他命令:1
2
3
4
5
6
7
8
9
10
11
12
13
14$ hexo [option]
clean Removed generated files and cache.
config Get or set configurations.
deploy Deploy your website.
generate Generate static files.
help Get help on a command.
init Create a new Hexo folder.
list List the information of the site
migrate Migrate your site from other system to Hexo.
new Create a new post.
publish Moves a draft post from _drafts to _posts folder.
render Render files with renderer plugins.
server Start the server.
version Display version information.
如果出现如下问题:1
2
3{ [Error: Cannot find module ‘./build/Release/DTraceProviderBindings’] code: ‘MODULE_NOT_FOUND’ }
{ [Error: Cannot find module ‘./build/default/DTraceProviderBindings’] code: ‘MODULE_NOT_FOUND’ }
{ [Error: Cannot find module ‘./build/Debug/DTraceProviderBindings’] code: ‘MODULE_NOT_FOUND’ }
Try to install with —no-optional option.1
$ npm install hexo —no-optional