大部分都是從官網複製粘貼,會持續更新web
此後會寫一篇,修改Hexo主題的教程,或者Hexo工做流程剖析json
. ├── _config.yml ├── package.json ├── scaffolds ├── source | ├── _drafts | └── _posts └── themes
package.json { "name": "hexo-site", "version": "0.0.0", "private": true, "hexo": { "version": "" }, "dependencies": { "hexo": "^3.0.0", "hexo-generator-archive": "^0.1.0", "hexo-generator-category": "^0.1.0", "hexo-generator-index": "^0.1.0", "hexo-generator-tag": "^0.1.0", "hexo-renderer-ejs": "^0.1.0", "hexo-renderer-stylus": "^0.2.0", "hexo-renderer-marked": "^0.2.4", "hexo-server": "^0.1.2" } }
Scaffold folder. When you create a new post, Hexo bases the new file on the scaffold.bash
Source folder. This is where you put your site’s content. Hexo ignores hidden files and files or folders whose names are prefixed with _ (underscore) - except the _posts folder. Renderable files (e.g. Markdown, HTML) will be processed and put into the public folder, while other files will simply be copied.hexo
Theme folder. Hexo generates a static website by combining the site contents with the theme.ide
$ hexo new [layout] <title>
Creates a new article. If no layout is provided, Hexo will use the default_layout from _config.yml. If the title contains spaces, surround it with quotation marks.post
$ hexo generate
Generates static files.this
-d, --deploy Deploy after generation finishes -w, --watch Watch file changes
$ hexo publish [layout] <filename>
Publishes a draft.spa
$ hexo server
Starts a local server. By default, this is at http://localhost:4000/.code
-p, --port Override default port -s, --static Only serve static files -l, --log Enable logger. Override logger format.
$ hexo deploy
Deploys your website.orm
-g, --generate Generate before deployment
$ hexo render <file1> [file2] ...
Renders files.
-o, --output Output destination
$ hexo migrate
Migrates content from other blog systems.
$ hexo clean
Cleans the cache file (db.json) and generated files (public).
$ hexo list <type>
Lists all routes.
$ hexo version
Displays version information.
$ hexo --config custom.yml
Uses a custom config file (instead of _config.yml).
$ hexo --draft
Displays draft posts (stored in the source/_drafts folder).
$ hexo --cwd /path/to/cwd
Customizes the path of current working directory.