Hexo操作

常规使用

1. 定位到即将使用的文件夹

1
$ cd /Users/yukizhong/Dropbox/02_Coding/Local_Blog

2. Create a new post

1
$ hexo new "My New Post"

More info: Writing

3. Generate static files

1
$ hexo generate

More info: Generating

4. Deploy to remote sites

1
$ hexo deploy

More info: Deployment

Run server

1
$ hexo server

More info: Server

文档使用细节

1. Add multiple tags

在文档开头定义中:

1
tags: [tag1, tag2, tag3]

2. Locate the Category

将Blog放在Python下:

1
category: Python

详细指南

https://madongqiang2201.github.io/2016/07/21/Mac%E4%B8%8BHexo%EF%BC%8Bgithub-pages%E6%90%AD%E5%BB%BA%E9%9D%99%E6%80%81%E5%8D%9A%E5%AE%A2/

出现的问题

1. hexo s Error

Error: Port 4000 has been used. Try other port instead.

Command: sudo hexo s -p 5000

2. 上传失败 hexo d

ERROR

1
fatal: unable to access 'https://github.com/.../': Could not resolve host: github.com

问题:不该用代理的时候用了代理,最简单粗暴:断了VPN