{"id":18958,"date":"2024-11-19T16:12:05","date_gmt":"2024-11-19T08:12:05","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18958\/"},"modified":"2024-11-19T16:12:05","modified_gmt":"2024-11-19T08:12:05","slug":"%e6%95%99%e4%bd%a0%e5%b0%86hexo%e9%83%a8%e7%bd%b2%e5%88%b0github%e4%b8%8a","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18958\/","title":{"rendered":"\u6559\u4f60\u5c06Hexo\u90e8\u7f72\u5230Github\u4e0a"},"content":{"rendered":"<p>hexo\u662f\u4e00\u79cd\u7b80\u5355\u5b9e\u7528\u7684\u9759\u6001\u535a\u5ba2\u751f\u6210\u5668\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u5feb\u901f\u521b\u5efa\u535a\u5ba2\uff0c\u5b83\u652f\u6301\u591a\u79cd\u4e3b\u9898\u3001\u63d2\u4ef6\uff0c\u53ef\u4ee5\u8f7b\u677e\u5904\u7406 markdown\u3001\u4ee3\u7801\u9ad8\u4eae\u7b49\u5e38\u89c1\u9700\u6c42\u3002\u5728\u7f16\u5199\u5b8c\u535a\u5ba2\u540e\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5176\u90e8\u7f72\u5230\u4e92\u8054\u7f51\u4e0a\u5c55\u793a\u7ed9\u66f4\u591a\u4eba\u89c2\u770b\uff0c\u800cgithub\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u6765\u8be6\u7ec6\u8bb2\u89e3\u4e00\u4e0b\u5982\u4f55\u5c06 hexo \u90e8\u7f72\u5230 github \u4e0a\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u521b\u5efa\u4e00\u4e2a Github \u4ed3\u5e93<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u524d\u5f80 Github \u5b98\u7f51\u521b\u5efa\u4e00\u4e2a\u4ed3\u5e93\uff0c\u547d\u540d\u683c\u5f0f\u4ee5\u201c\u7528\u6237\u540d.github.io\u201d\u4e3a\u51c6\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5 Git<\/p>\n<p>\u5728\u90e8\u7f72\u4e4b\u524d\uff0c\u5148\u786e\u4fdd\u672c\u5730\u5df2\u7ecf\u5b89\u88c5\u4e86 Git\uff0c\u5982\u679c\u6ca1\u6709\u53ef\u4ee5\u5728\u5b98\u7f51\u8fdb\u884c\u4e0b\u8f7d\u5b89\u88c5\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u521d\u59cb\u5316 Hexo<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u5728\u672c\u5730\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u5982\u201cblog\u201d\uff0c\u4ee5\u4fbf\u5b58\u653e Hexo \u7684\u6240\u6709\u6587\u4ef6\u548c\u76ee\u5f55\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u521d\u59cb\u5316\uff1a<\/p>\n<pre>hexo init blog<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u547d\u4ee4\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cblog\u201d\u7684\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u5305\u542b\u4e86 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u3002<\/p>\n<p>\u7b2c\u56db\u6b65\uff1a\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u5728 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u4e0b\uff0c\u6709\u4e00\u4e2a\u540d\u4e3a\u201c_config.yml\u201d\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u6b64\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\u914d\u7f6e\u3002\u4fee\u6539\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre># Site\ntitle: your-blog-title\nsubtitle: your-blog-subtitle\ndescription: your-blog-description\nkeywords: your-blog-keywords\nauthor: your-name\nlanguage: zh-CN\ntimezone: Asia\/Shanghai\n\n# URL\nurl: https:\/\/your-username.github.io\nroot: \/\n\n# Deployment\ndeploy:\n  type: git\n  repository: https:\/\/github.com\/your-username\/your-username.github.io.git\n  branch: master<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5176\u4e2d\u7684\u201cyour-blog-title\u201d\u3001\u201cyour-blog-subtitle\u201d\u7b49\u5185\u5bb9\u9700\u8981\u6539\u4e3a\u4f60\u81ea\u5df1\u535a\u5ba2\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u7b2c\u4e94\u6b65\uff1a\u5b89\u88c5\u4f9d\u8d56\u9879<\/p>\n<p>\u5728 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u4e0b\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u4f9d\u8d56\u9879\uff1a<\/p>\n<pre>npm install<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7b2c\u516d\u6b65\uff1a\u751f\u6210\u9759\u6001\u6587\u4ef6<\/p>\n<p>\u5728 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u4e0b\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u751f\u6210\u9759\u6001\u6587\u4ef6\uff1a<\/p>\n<pre>hexo clean &amp;&amp; hexo g<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u4f1a\u751f\u6210\u4e00\u4e2a\u201cpublic\u201d\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u6240\u6709\u7684\u9759\u6001\u6587\u4ef6\u3002<\/p>\n<p>\u7b2c\u4e03\u6b65\uff1a\u5c06\u9759\u6001\u6587\u4ef6\u63d0\u4ea4\u5230 Github<\/p>\n<p>\u5728 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u4e0b\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06\u9759\u6001\u6587\u4ef6\u63d0\u4ea4\u5230 Github\uff1a<\/p>\n<pre>hexo d<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u4f1a\u628a\u201cpublic\u201d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u9759\u6001\u6587\u4ef6\u4e0a\u4f20\u5230 Github \u4e0a\u3002<\/p>\n<p>\u7b2c\u516b\u6b65\uff1a\u8bbf\u95ee\u535a\u5ba2<\/p>\n<p>\u6700\u540e\uff0c\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u4ee5\u4e0b\u7f51\u5740\uff0c\u5373\u53ef\u8bbf\u95ee\u535a\u5ba2\uff1a<\/p>\n<pre>https:\/\/your-username.github.io<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u81f3\u6b64\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06 Hexo \u90e8\u7f72\u5230 Github \u4e0a\u5b8c\u6210\u3002\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\uff0c\u5982\u679c\u6211\u4eec\u4fee\u6539\u4e86\u535a\u5ba2\u5185\u5bb9\uff0c\u53ea\u9700\u8981\u518d\u6b21\u6267\u884c\u7b2c\u516d\u6b65\u548c\u7b2c\u4e03\u6b65\u7684\u547d\u4ee4\uff0c\u5373\u53ef\u5c06\u66f4\u65b0\u540e\u7684\u535a\u5ba2\u63d0\u4ea4\u5230 Github \u4e0a\u3002\u8fd9\u79cd\u65b9\u5f0f\u5341\u5206\u7b80\u5355\u65b9\u4fbf\uff0c\u9002\u5408\u4e8e\u4e2a\u4eba\u535a\u5ba2\u7684\u5feb\u901f\u642d\u5efa\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u6559\u4f60\u5c06Hexo\u90e8\u7f72\u5230Github\u4e0a\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>hexo\u662f\u4e00\u79cd\u7b80\u5355\u5b9e\u7528\u7684\u9759\u6001\u535a\u5ba2\u751f\u6210\u5668\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u5feb\u901f\u521b\u5efa\u535a\u5ba2\uff0c\u5b83\u652f\u6301\u591a\u79cd\u4e3b\u9898\u3001\u63d2\u4ef6\uff0c\u53ef\u4ee5\u8f7b\u677e\u5904\u7406 markdown\u3001\u4ee3\u7801\u9ad8\u4eae\u7b49\u5e38\u89c1\u9700\u6c42\u3002\u5728\u7f16\u5199\u5b8c\u535a\u5ba2\u540e\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5176\u90e8\u7f72\u5230\u4e92\u8054\u7f51\u4e0a\u5c55\u793a\u7ed9\u66f4\u591a\u4eba\u89c2\u770b\uff0c\u800cgithub\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u6765\u8be6\u7ec6\u8bb2\u89e3\u4e00\u4e0b\u5982\u4f55\u5c06 hexo \u90e8\u7f72\u5230 github \u4e0a\u3002 \u7b2c\u4e00\u6b65\uff1a\u521b\u5efa\u4e00\u4e2a Github \u4ed3\u5e93 \u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u524d\u5f80 Github \u5b98\u7f51\u521b\u5efa\u4e00\u4e2a\u4ed3\u5e93\uff0c\u547d\u540d\u683c\u5f0f\u4ee5\u201c\u7528\u6237\u540d.github.io\u201d\u4e3a\u51c6\u3002 \u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5 Git \u5728\u90e8\u7f72\u4e4b\u524d\uff0c\u5148\u786e\u4fdd\u672c\u5730\u5df2\u7ecf\u5b89\u88c5\u4e86 Git\uff0c\u5982\u679c\u6ca1\u6709\u53ef\u4ee5\u5728\u5b98\u7f51\u8fdb\u884c\u4e0b\u8f7d\u5b89\u88c5\u3002 \u7b2c\u4e09\u6b65\uff1a\u521d\u59cb\u5316 Hexo \u63a5\u4e0b\u6765\uff0c\u5728\u672c\u5730\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u5982\u201cblog\u201d\uff0c\u4ee5\u4fbf\u5b58\u653e Hexo \u7684\u6240\u6709\u6587\u4ef6\u548c\u76ee\u5f55\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u521d\u59cb\u5316\uff1a hexo init blog \u767b\u5f55\u540e\u590d\u5236 \u6b64\u547d\u4ee4\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cblog\u201d\u7684\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u5305\u542b\u4e86 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u3002 \u7b2c\u56db\u6b65\uff1a\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6 \u5728 Hexo \u7684\u57fa\u7840\u76ee\u5f55\u4e0b\uff0c\u6709\u4e00\u4e2a\u540d\u4e3a\u201c_config.yml\u201d\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u6b64\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\u914d\u7f6e\u3002\u4fee\u6539\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a # Site title: your-blog-title subtitle: your-blog-subtitle description: your-blog-description keywords: your-blog-keywords author: your-name language: zh-CN timezone: Asia\/Shanghai # URL url: https:\/\/your-username.github.io root: \/ # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-18958","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=18958"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18958\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}