{"id":130,"date":"2020-05-01T16:10:37","date_gmt":"2020-05-01T07:10:37","guid":{"rendered":"https:\/\/chen.za.net\/?p=130"},"modified":"2020-05-01T16:12:13","modified_gmt":"2020-05-01T07:12:13","slug":"hexo-commands","status":"publish","type":"post","link":"https:\/\/chen.za.net\/?p=130","title":{"rendered":"Hexo \u547d\u4ee4"},"content":{"rendered":"<h2 id=\"init\" class=\"article-heading\">init<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo init [folder]<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u65b0\u5efa\u4e00\u4e2a\u7f51\u7ad9\u3002\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\u00a0<code>folder<\/code>\u00a0\uff0cHexo \u9ed8\u8ba4\u5728\u76ee\u524d\u7684\u6587\u4ef6\u5939\u5efa\u7acb\u7f51\u7ad9\u3002<\/p>\n<h2 id=\"new\" class=\"article-heading\">new<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo new [layout] &lt;title&gt;<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u65b0\u5efa\u4e00\u7bc7\u6587\u7ae0\u3002\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\u00a0<code>layout<\/code>\u00a0\u7684\u8bdd\uff0c\u9ed8\u8ba4\u4f7f\u7528\u00a0<a href=\"https:\/\/hexo.io\/zh-cn\/docs\/configuration\">_config.yml<\/a>\u00a0\u4e2d\u7684\u00a0<code>default_layout<\/code>\u00a0\u53c2\u6570\u4ee3\u66ff\u3002\u5982\u679c\u6807\u9898\u5305\u542b\u7a7a\u683c\u7684\u8bdd\uff0c\u8bf7\u4f7f\u7528\u5f15\u53f7\u62ec\u8d77\u6765\u3002<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo new <span class=\"string\">\"post title with whitespace\"<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<table>\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-p<\/code>,\u00a0<code>--path<\/code><\/td>\n<td>\u81ea\u5b9a\u4e49\u65b0\u6587\u7ae0\u7684\u8def\u5f84<\/td>\n<\/tr>\n<tr>\n<td><code>-r<\/code>,\u00a0<code>--replace<\/code><\/td>\n<td>\u5982\u679c\u5b58\u5728\u540c\u540d\u6587\u7ae0\uff0c\u5c06\u5176\u66ff\u6362<\/td>\n<\/tr>\n<tr>\n<td><code>-s<\/code>,\u00a0<code>--slug<\/code><\/td>\n<td>\u6587\u7ae0\u7684 Slug\uff0c\u4f5c\u4e3a\u65b0\u6587\u7ae0\u7684\u6587\u4ef6\u540d\u548c\u53d1\u5e03\u540e\u7684 URL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cHexo \u4f1a\u4f7f\u7528\u6587\u7ae0\u7684\u6807\u9898\u6765\u51b3\u5b9a\u6587\u7ae0\u6587\u4ef6\u7684\u8def\u5f84\u3002\u5bf9\u4e8e\u72ec\u7acb\u9875\u9762\u6765\u8bf4\uff0cHexo \u4f1a\u521b\u5efa\u4e00\u4e2a\u4ee5\u6807\u9898\u4e3a\u540d\u5b57\u7684\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u653e\u7f6e\u4e00\u4e2a\u00a0<code>index.md<\/code>\u00a0\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u00a0<code>--path<\/code>\u00a0\u53c2\u6570\u6765\u8986\u76d6\u4e0a\u8ff0\u884c\u4e3a\u3001\u81ea\u884c\u51b3\u5b9a\u6587\u4ef6\u7684\u76ee\u5f55\uff1a<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">hexo new page --path about\/me <span class=\"string\">\"About me\"<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u4ee5\u4e0a\u547d\u4ee4\u4f1a\u521b\u5efa\u4e00\u4e2a\u00a0<code>source\/about\/me.md<\/code>\u00a0\u6587\u4ef6\uff0c\u540c\u65f6 Front Matter \u4e2d\u7684 title \u4e3a\u00a0<code>\"About me\"<\/code><\/p>\n<p>\u6ce8\u610f\uff01title \u662f\u5fc5\u987b\u6307\u5b9a\u7684\uff01\u5982\u679c\u4f60\u8fd9\u4e48\u505a\u5e76\u4e0d\u80fd\u8fbe\u5230\u4f60\u7684\u76ee\u7684\uff1a<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">hexo new page --path about\/me<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u6b64\u65f6 Hexo \u4f1a\u521b\u5efa\u00a0<code>source\/_posts\/about\/me.md<\/code>\uff0c\u540c\u65f6\u00a0<code>me.md<\/code>\u00a0\u7684 Front Matter \u4e2d\u7684 title \u4e3a\u00a0<code>\"page\"<\/code>\u3002\u8fd9\u662f\u56e0\u4e3a\u5728\u4e0a\u8ff0\u547d\u4ee4\u4e2d\uff0chexo-cli \u5c06\u00a0<code>page<\/code>\u00a0\u89c6\u4e3a\u6307\u5b9a\u6587\u7ae0\u7684\u6807\u9898\u3001\u5e76\u91c7\u7528\u9ed8\u8ba4\u7684\u00a0<code>layout<\/code>\u3002<\/p>\n<h2 id=\"generate\" class=\"article-heading\">generate<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo generate<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u751f\u6210\u9759\u6001\u6587\u4ef6\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9009\u9879<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-d<\/code>,\u00a0<code>--deploy<\/code><\/td>\n<td>\u6587\u4ef6\u751f\u6210\u540e\u7acb\u5373\u90e8\u7f72\u7f51\u7ad9<\/td>\n<\/tr>\n<tr>\n<td><code>-w<\/code>,\u00a0<code>--watch<\/code><\/td>\n<td>\u76d1\u89c6\u6587\u4ef6\u53d8\u52a8<\/td>\n<\/tr>\n<tr>\n<td><code>-b<\/code>,\u00a0<code>--bail<\/code><\/td>\n<td>\u751f\u6210\u8fc7\u7a0b\u4e2d\u5982\u679c\u53d1\u751f\u4efb\u4f55\u672a\u5904\u7406\u7684\u5f02\u5e38\u5219\u629b\u51fa\u5f02\u5e38<\/td>\n<\/tr>\n<tr>\n<td><code>-f<\/code>,\u00a0<code>--force<\/code><\/td>\n<td>\u5f3a\u5236\u91cd\u65b0\u751f\u6210\u6587\u4ef6<br \/>\nHexo \u5f15\u5165\u4e86\u5dee\u5206\u673a\u5236\uff0c\u5982\u679c\u00a0<code>public<\/code>\u00a0\u76ee\u5f55\u5b58\u5728\uff0c\u90a3\u4e48\u00a0<code>hexo g<\/code>\u00a0\u53ea\u4f1a\u91cd\u65b0\u751f\u6210\u6539\u52a8\u7684\u6587\u4ef6\u3002<br \/>\n\u4f7f\u7528\u8be5\u53c2\u6570\u7684\u6548\u679c\u63a5\u8fd1\u00a0<code>hexo clean &amp;&amp; hexo generate<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,\u00a0<code>--concurrency<\/code><\/td>\n<td>\u6700\u5927\u540c\u65f6\u751f\u6210\u6587\u4ef6\u7684\u6570\u91cf\uff0c\u9ed8\u8ba4\u65e0\u9650\u5236<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8be5\u547d\u4ee4\u53ef\u4ee5\u7b80\u5199\u4e3a<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo g<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"publish\" class=\"article-heading\">publish<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo publish [layout] &lt;filename&gt;<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u53d1\u8868\u8349\u7a3f\u3002<\/p>\n<h2 id=\"server\" class=\"article-heading\">server<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo server<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u542f\u52a8\u670d\u52a1\u5668\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8bbf\u95ee\u7f51\u5740\u4e3a\uff1a\u00a0<code>http:\/\/localhost:4000\/<\/code>\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9009\u9879<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-p<\/code>,\u00a0<code>--port<\/code><\/td>\n<td>\u91cd\u8bbe\u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td><code>-s<\/code>,\u00a0<code>--static<\/code><\/td>\n<td>\u53ea\u4f7f\u7528\u9759\u6001\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,\u00a0<code>--log<\/code><\/td>\n<td>\u542f\u52a8\u65e5\u8bb0\u8bb0\u5f55\uff0c\u4f7f\u7528\u8986\u76d6\u8bb0\u5f55\u683c\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"deploy\" class=\"article-heading\">deploy<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo deploy<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u90e8\u7f72\u7f51\u7ad9\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-g<\/code>,\u00a0<code>--generate<\/code><\/td>\n<td>\u90e8\u7f72\u4e4b\u524d\u9884\u5148\u751f\u6210\u9759\u6001\u6587\u4ef6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8be5\u547d\u4ee4\u53ef\u4ee5\u7b80\u5199\u4e3a\uff1a<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo d<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"render\" class=\"article-heading\">render<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo render &lt;file1&gt; [file2] ...<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u6e32\u67d3\u6587\u4ef6\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-o<\/code>,\u00a0<code>--output<\/code><\/td>\n<td>\u8bbe\u7f6e\u8f93\u51fa\u8def\u5f84<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"migrate\" class=\"article-heading\">migrate<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo migrate &lt;<span class=\"built_in\">type<\/span>&gt;<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u4ece\u5176\u4ed6\u535a\u5ba2\u7cfb\u7edf\u00a0<a href=\"https:\/\/hexo.io\/zh-cn\/docs\/migration\">\u8fc1\u79fb\u5185\u5bb9<\/a>\u3002<\/p>\n<h2 id=\"clean\" class=\"article-heading\">clean<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo clean<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u6e05\u9664\u7f13\u5b58\u6587\u4ef6 (<code>db.json<\/code>) \u548c\u5df2\u751f\u6210\u7684\u9759\u6001\u6587\u4ef6 (<code>public<\/code>)\u3002<\/p>\n<p>\u5728\u67d0\u4e9b\u60c5\u51b5\uff08\u5c24\u5176\u662f\u66f4\u6362\u4e3b\u9898\u540e\uff09\uff0c\u5982\u679c\u53d1\u73b0\u60a8\u5bf9\u7ad9\u70b9\u7684\u66f4\u6539\u65e0\u8bba\u5982\u4f55\u4e5f\u4e0d\u751f\u6548\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u8fd0\u884c\u8be5\u547d\u4ee4\u3002<\/p>\n<h2 id=\"list\" class=\"article-heading\">list<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo list &lt;<span class=\"built_in\">type<\/span>&gt;<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u5217\u51fa\u7f51\u7ad9\u8d44\u6599\u3002<\/p>\n<h2 id=\"version\" class=\"article-heading\">version<\/h2>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo version<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u663e\u793a Hexo \u7248\u672c\u3002<\/p>\n<h2 id=\"\u9009\u9879\" class=\"article-heading\">\u9009\u9879<\/h2>\n<h3 id=\"\u5b89\u5168\u6a21\u5f0f\" class=\"article-heading\">\u5b89\u5168\u6a21\u5f0f<\/h3>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo --safe<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u5728\u5b89\u5168\u6a21\u5f0f\u4e0b\uff0c\u4e0d\u4f1a\u8f7d\u5165\u63d2\u4ef6\u548c\u811a\u672c\u3002\u5f53\u60a8\u5728\u5b89\u88c5\u65b0\u63d2\u4ef6\u906d\u9047\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u5b89\u5168\u6a21\u5f0f\u91cd\u65b0\u6267\u884c\u3002<\/p>\n<h3 id=\"\u8c03\u8bd5\u6a21\u5f0f\" class=\"article-heading\">\u8c03\u8bd5\u6a21\u5f0f<\/h3>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo --debug<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u5728\u7ec8\u7aef\u4e2d\u663e\u793a\u8c03\u8bd5\u4fe1\u606f\u5e76\u8bb0\u5f55\u5230\u00a0<code>debug.log<\/code>\u3002\u5f53\u60a8\u78b0\u5230\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u7528\u8c03\u8bd5\u6a21\u5f0f\u91cd\u65b0\u6267\u884c\u4e00\u6b21\uff0c\u5e76\u00a0<a href=\"https:\/\/github.com\/hexojs\/hexo\/issues\/new\" target=\"_blank\" rel=\"noopener external nofollow noreferrer\">\u63d0\u4ea4\u8c03\u8bd5\u4fe1\u606f\u5230 GitHub<\/a>\u3002<\/p>\n<h3 id=\"\u7b80\u6d01\u6a21\u5f0f\" class=\"article-heading\">\u7b80\u6d01\u6a21\u5f0f<\/h3>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo --silent<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u9690\u85cf\u7ec8\u7aef\u4fe1\u606f\u3002<\/p>\n<h3 id=\"\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\" class=\"article-heading\">\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84<\/h3>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\"><span class=\"comment\"># \u4f7f\u7528 custom.yml \u4ee3\u66ff\u9ed8\u8ba4\u7684 _config.yml<\/span><\/span>\r\n<span class=\"line\">$ hexo server --config custom.yml<\/span>\r\n\r\n<span class=\"line\"><span class=\"comment\"># \u4f7f\u7528 custom.yml \u548c custom2.json\uff0c\u5176\u4e2d custom2.json \u4f18\u5148\u7ea7\u66f4\u9ad8<\/span><\/span>\r\n<span class=\"line\">$ hexo generate --config custom.yml,custom2.json,custom3.yml<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u6307\u5b9a\u8fd9\u4e2a\u53c2\u6570\u540e\u5c06\u4e0d\u518d\u4f7f\u7528\u9ed8\u8ba4\u7684\u00a0<code>_config.yml<\/code>\u3002<br \/>\n\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a YAML \u6216 JSON \u6587\u4ef6\u7684\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u9017\u53f7\u5206\u9694\uff08\u65e0\u7a7a\u683c\uff09\u7684\u591a\u4e2a YAML \u6216 JSON \u6587\u4ef6\u7684\u8def\u5f84\u3002\u4f8b\u5982\uff1a<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\"><span class=\"comment\"># \u4f7f\u7528 custom.yml \u4ee3\u66ff\u9ed8\u8ba4\u7684 _config.yml<\/span><\/span>\r\n<span class=\"line\">$ hexo server --config custom.yml<\/span>\r\n\r\n<span class=\"line\"><span class=\"comment\"># \u4f7f\u7528 custom.yml, custom2.json \u548c custom3.yml\uff0c\u5176\u4e2d custom3.yml \u4f18\u5148\u7ea7\u6700\u9ad8\uff0c\u5176\u6b21\u662f custom2.json<\/span><\/span>\r\n<span class=\"line\">$ hexo generate --config custom.yml,custom2.json,custom3.yml<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u5f53\u4f60\u6307\u5b9a\u4e86\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6\u4ee5\u540e\uff0cHexo \u4f1a\u6309\u987a\u5e8f\u5c06\u8fd9\u90e8\u5206\u914d\u7f6e\u6587\u4ef6\u5408\u5e76\u6210\u4e00\u4e2a\u00a0<code>_multiconfig.yml<\/code>\u3002\u5982\u679c\u9047\u5230\u91cd\u590d\u7684\u914d\u7f6e\uff0c\u6392\u5728\u540e\u9762\u7684\u6587\u4ef6\u7684\u914d\u7f6e\u4f1a\u8986\u76d6\u6392\u5728\u524d\u9762\u7684\u6587\u4ef6\u7684\u914d\u7f6e\u3002\u8fd9\u4e2a\u539f\u5219\u9002\u7528\u4e8e\u4efb\u610f\u6570\u91cf\u3001\u4efb\u610f\u6df1\u5ea6\u7684 YAML \u548c JSON \u6587\u4ef6\u3002<\/p>\n<h3 id=\"\u663e\u793a\u8349\u7a3f\" class=\"article-heading\">\u663e\u793a\u8349\u7a3f<\/h3>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo --draft<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u663e\u793a\u00a0<code>source\/_drafts<\/code>\u00a0\u6587\u4ef6\u5939\u4e2d\u7684\u8349\u7a3f\u6587\u7ae0\u3002<\/p>\n<h3 id=\"\u81ea\u5b9a\u4e49-CWD\" class=\"article-heading\">\u81ea\u5b9a\u4e49 CWD<\/h3>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ hexo --cwd \/path\/to\/cwd<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u81ea\u5b9a\u4e49\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff08Current working directory\uff09\u7684\u8def\u5f84\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>init $ hexo init [folder] \u65b0\u5efa\u4e00\u4e2a\u7f51\u7ad9\u3002\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\u00a0folder\u00a0\uff0cHexo \u9ed8\u8ba4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=130"}],"version-history":[{"count":0,"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions"}],"wp:attachment":[{"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}