{"id":233,"date":"2021-01-19T00:45:38","date_gmt":"2021-01-18T15:45:38","guid":{"rendered":"https:\/\/chen.za.net\/?p=233"},"modified":"2021-01-19T16:11:32","modified_gmt":"2021-01-19T07:11:32","slug":"note","status":"publish","type":"post","link":"https:\/\/chen.za.net\/?p=233","title":{"rendered":"hexo\u5efa\u7ad9\u7b14\u8bb0"},"content":{"rendered":"<p>\u5b66\u4e60\u7b14\u8bb0\uff012020\u5e742\u67085\u65e513\u70b913\u5206<br \/>\n&#8212; #\u5b89\u88c5Nodejs<br \/>\nnode -v #\u67e5\u770bnode\u7248\u672c<br \/>\nnpm -v #\u67e5\u770bnpm\u7248\u672c<br \/>\nnpm install -g cnpm &#8211;registry=http:\/\/registry.npm.taobao.org #\u5b89\u88c5\u6dd8\u5b9d\u7684cnpm \u7ba1\u7406\u5668<br \/>\ncnpm -v #\u67e5\u770bcnpm\u7248\u672c<br \/>\ncnpm install -g hexo-cli #\u5b89\u88c5hexo\u6846\u67b6<br \/>\nhexo -v #\u67e5\u770bhexo\u7248\u672c<br \/>\nmkdir blog #\u521b\u5efablog\u76ee\u5f55<br \/>\ncd blog #\u8fdb\u5165blog\u76ee\u5f55<br \/>\nsudo hexo init #\u751f\u6210\u535a\u5ba2 \u521d\u59cb\u5316\u535a\u5ba2<br \/>\nhexo s #\u542f\u52a8\u672c\u5730\u535a\u5ba2\u670d\u52a1<br \/>\nhttp:\/\/localhost:4000\/ #\u672c\u5730\u8bbf\u95ee\u5730\u5740<br \/>\nhexo n &#8220;\u6211\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0&#8221; #\u521b\u5efa\u65b0\u7684\u6587\u7ae0<br \/>\n#\u8fd4\u56deblog\u76ee\u5f55<br \/>\nhexo clean #\u6e05\u7406<br \/>\nhexo g #\u751f\u6210<br \/>\n#Github\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4ed3\u5e93 YourGithubName.github.io<br \/>\ncnpm install &#8211;save hexo-deployer-git #\u5728blog\u76ee\u5f55\u4e0b\u5b89\u88c5git\u90e8\u7f72\u63d2\u4ef6<br \/>\n&#8212;-<br \/>\n#\u914d\u7f6e_config.yml<br \/>\n&#8212;&#8211;<br \/>\n# Deployment<br \/>\n## Docs: https:\/\/hexo.io\/docs\/deployment.html<br \/>\ndeploy:<br \/>\ntype: git<br \/>\nrepo: https:\/\/github.com\/YourGithubName\/YourGithubName.github.io.git<br \/>\nbranch: master<br \/>\n&#8212;&#8211;<br \/>\nhexo d #\u90e8\u7f72\u5230Github\u4ed3\u5e93\u91cc<br \/>\nhttps:\/\/YourGithubName.github.io\/ #\u8bbf\u95ee\u8fd9\u4e2a\u5730\u5740\u53ef\u4ee5\u67e5\u770b\u535a\u5ba2<\/p>\n<p>git clone https:\/\/github.com\/litten\/hexo-theme-yilia.git themes\/yilia #\u4e0b\u8f7dyilia\u4e3b\u9898\u5230\u672c\u5730<\/p>\n<p>#\u4fee\u6539hexo\u6839\u76ee\u5f55\u4e0b\u7684 _config.yml \u6587\u4ef6 \uff1a theme: yilia<\/p>\n<p>hexo c #\u6e05\u7406\u4e00\u4e0b<br \/>\nhexo g #\u751f\u6210<br \/>\nhexo d #\u90e8\u7f72\u5230\u8fdc\u7a0bGithub\u4ed3\u5e93<br \/>\nhttps:\/\/YourGithubName.github.io\/ #\u67e5\u770b\u535a\u5ba2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b66\u4e60\u7b14\u8bb0\uff012020\u5e742\u67085\u65e513\u70b913\u5206 &#8212; #\u5b89\u88c5Nodejs node -v #\u67e5\u770bnode\u7248 [&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-233","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/posts\/233","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=233"}],"version-history":[{"count":0,"href":"https:\/\/chen.za.net\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions"}],"wp:attachment":[{"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chen.za.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}