{"id":1942,"date":"2017-09-05T14:38:39","date_gmt":"2017-09-05T06:38:39","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1942"},"modified":"2017-09-05T14:38:39","modified_gmt":"2017-09-05T06:38:39","slug":"hexo-%e5%91%bd%e4%bb%a4%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1942","title":{"rendered":"hexo \u547d\u4ee4\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"<p>\n\t\u6211\u4f7f\u7528 hexo \u5728 github \u4e0a\u642d\u5efa\u4e86\u4e00\u4e2a\u514d\u8d39\u7684\u535a\u5ba2\u3002\u4e1a\u4f59\u8349\u4e0a\u9762\u7684\u529f\u80fd\u90fd\u53ef\u4ee5\u4f7f\u7528 hexo \u5b9e\u73b0\u3002\n<\/p>\n<p>\n\t\u4f7f\u7528 hexo + next \u4e3b\u9898\uff0c\u642d\u5efa\u7684\u535a\u5ba2\u6548\u679c\u7c7b\u4f3c\u4e0b\u56fe\u6240\u793a\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Hexo + Next \u9759\u6001\u535a\u5ba2\u6548\u679c\" src=\"http:\/\/img.bbs.csdn.net\/upload\/201709\/05\/1504592493_25922.jpg\" style=\"width: 1000px;height: 618px\" \/>\n<\/p>\n<p>\n\t\u672c\u6587\u7684\u91cd\u70b9\u4e0d\u662f<a href=\"http:\/\/www.jianshu.com\/p\/61987cec0fad\" name=\"GitHub+Hexo+Next\u642d\u5efa\u514d\u8d39\u72ec\u7acb\u4e2a\u4eba\u535a\u5ba2\" target=\"_blank\" title=\"GitHub+Hexo+Next\u642d\u5efa\u514d\u8d39\u72ec\u7acb\u4e2a\u4eba\u535a\u5ba2\">\u4ecb\u7ecd\u5982\u4f55\u642d\u5efa<\/a>\uff0c\u800c\u662f\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 hexo \u547d\u4ee4\u3002\n<\/p>\n<h2>\n\t\u5b89\u88c5\u547d\u4ee4<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nnpm install hexo -g #\u5b89\u88c5  \r\nnpm update hexo -g #\u5347\u7ea7  \r\nhexo init #\u521d\u59cb\u5316<\/pre>\n<h2>\n\t\u5feb\u901f\u7b80\u5199<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo n &quot;\u6211\u7684\u535a\u5ba2&quot; == hexo new &quot;\u6211\u7684\u535a\u5ba2&quot; #\u65b0\u5efa\u6587\u7ae0\r\nhexo p == hexo publish\r\nhexo g == hexo generate#\u751f\u6210\r\nhexo s == hexo server #\u542f\u52a8\u670d\u52a1\u9884\u89c8\r\nhexo d == hexo deploy#\u90e8\u7f72<\/pre>\n<h2>\n\t\u90e8\u7f72<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo server #Hexo \u4f1a\u76d1\u89c6\u6587\u4ef6\u53d8\u52a8\u5e76\u81ea\u52a8\u66f4\u65b0\uff0c\u60a8\u65e0\u987b\u91cd\u542f\u670d\u52a1\u5668\u3002\r\nhexo server -s #\u9759\u6001\u6a21\u5f0f\r\nhexo server -p 5000 #\u66f4\u6539\u7aef\u53e3\r\nhexo server -i 192.168.1.1 #\u81ea\u5b9a\u4e49 IP\r\nhexo clean #\u6e05\u9664\u7f13\u5b58 \u7f51\u9875\u6b63\u5e38\u60c5\u51b5\u4e0b\u53ef\u4ee5\u5ffd\u7565\u6b64\u6761\u547d\u4ee4\r\nhexo g #\u751f\u6210\u9759\u6001\u7f51\u9875\r\nhexo d #\u5f00\u59cb\u90e8\u7f72<\/pre>\n<h2>\n\t\u76d1\u89c6\u6587\u4ef6\u53d8\u52a8<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo generate #\u4f7f\u7528 Hexo \u751f\u6210\u9759\u6001\u6587\u4ef6\u5feb\u901f\u800c\u4e14\u7b80\u5355\r\nhexo generate --watch #\u76d1\u89c6\u6587\u4ef6\u53d8\u52a8\r\n#\u5b8c\u6210\u540e\u90e8\u7f72\r\n#\u4e24\u4e2a\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u76f8\u540c\u7684\r\nhexo generate --deploy\r\nhexo deploy --generate\r\nhexo deploy -g\r\nhexo server -g<\/pre>\n<h2>\n\t\u8349\u7a3f<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo publish [layout] &lt;title&gt;<\/pre>\n<h2>\n\t\u6a21\u7248<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo new &quot;postName&quot; #\u65b0\u5efa\u6587\u7ae0\r\nhexo new page &quot;pageName&quot; #\u65b0\u5efa\u9875\u9762\r\nhexo generate #\u751f\u6210\u9759\u6001\u9875\u9762\u81f3public\u76ee\u5f55\r\nhexo server #\u5f00\u542f\u9884\u89c8\u8bbf\u95ee\u7aef\u53e3\uff08\u9ed8\u8ba4\u7aef\u53e34000\uff0c&#039;ctrl + c&#039;\u5173\u95edserver\uff09\r\nhexo deploy #\u5c06.deploy\u76ee\u5f55\u90e8\u7f72\u5230GitHub\r\nhexo new [layout] &lt;title&gt;\r\nhexo new photo &quot;My Gallery&quot;\r\nhexo new &quot;Hello World&quot; --lang tw<\/pre>\n<h2>\n\t\u6587\u7ae0\u76f8\u5173\u5c5e\u6027<br \/>\n<\/h2>\n<pre class=\"brush:plain;\">\r\ntitle: \u4f7f\u7528Hexo\u642d\u5efa\u4e2a\u4eba\u535a\u5ba2\r\nlayout: post\r\ndate: 2014-03-03 19:07:43\r\ncomments: true\r\ncategories: Blog\r\ntags: [Hexo]\r\nkeywords: Hexo, Blog\r\ndescription: \u66ae\u8272\u5306\u5306\u53bb\uff0c\u97f3\u6d88\u5c18\u4e5f\u65e0\r\n\u6a21\u7248\uff08Scaffold\uff09\r\nhexo new photo &quot;My Gallery&quot;<\/pre>\n<h2>\n\t\u5199\u4f5c<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo new page &lt;title&gt;\r\nhexo new post &lt;title&gt;<\/pre>\n<pre class=\"brush:plain;\">\r\n\u53d8\u91cf\t   \u63cf\u8ff0\r\n:title\t\u6807\u9898\r\n:year\t\u5efa\u7acb\u7684\u5e74\u4efd\uff084 \u4f4d\u6570\uff09\r\n:month\t\u5efa\u7acb\u7684\u6708\u4efd\uff082 \u4f4d\u6570\uff09\r\n:i_month\t\u5efa\u7acb\u7684\u6708\u4efd\uff08\u53bb\u6389\u5f00\u5934\u7684\u96f6\uff09\r\n:day\t\u5efa\u7acb\u7684\u65e5\u671f\uff082 \u4f4d\u6570\uff09\r\n:i_day\t\u5efa\u7acb\u7684\u65e5\u671f\uff08\u53bb\u6389\u5f00\u5934\u7684\u96f6\uff09<\/pre>\n<h2>\n\t\u63a8\u9001\u5230github\u4e0a<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nhexo n #\u5199\u6587\u7ae0\r\nhexo g #\u751f\u6210\r\nhexo d #\u90e8\u7f72 #\u53ef\u4e0ehexo g\u5408\u5e76\u4e3a hexo d -g<\/pre>\n<p>\n\t\u4ee5\u4e0a\u5c31\u662f\u4e3b\u8981\u548c\u5e38\u7528\u7684 hexo \u547d\u4ee4\u3002\u6ca1\u5fc5\u8981\u6b7b\u8bb0\uff0c\u6d3b\u7528\u5373\u53ef\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1942\">hexo \u547d\u4ee4\u4f7f\u7528\u6559\u7a0b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6211\u4f7f\u7528 hexo \u5728 github \u4e0a\u642d\u5efa\u4e86\u4e00\u4e2a\u514d\u8d39\u7684\u535a\u5ba2\u3002\u4e1a\u4f59\u8349\u4e0a\u9762\u7684\u529f\u80fd\u90fd\u53ef\u4ee5\u4f7f\u7528 hexo \u5b9e\u73b0\u3002 \u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,6],"tags":[1438,1460,1437,1439],"class_list":["post-1942","post","type-post","status-publish","format-standard","hentry","category-ndisdevelop","category-yyzt","tag-git","tag-git-","tag-github","tag-hexo"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1942"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1942\/revisions"}],"predecessor-version":[{"id":1943,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1942\/revisions\/1943"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}