{"id":1053,"date":"2019-10-23T16:15:56","date_gmt":"2019-10-23T08:15:56","guid":{"rendered":"http:\/\/iqotom.com\/?p=1053"},"modified":"2019-10-28T09:42:38","modified_gmt":"2019-10-28T01:42:38","slug":"%e5%88%a9%e7%94%a8github-pages%e5%85%8d%e8%b4%b9%e5%88%9b%e5%bb%ba%e4%b8%aa%e4%ba%ba%e5%8d%9a%e5%ae%a2","status":"publish","type":"post","link":"http:\/\/iqotom.com\/?p=1053","title":{"rendered":"\u5229\u7528GitHub Pages\u514d\u8d39\u521b\u5efa\u4e2a\u4eba\u535a\u5ba2"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u642d\u5efa\u73af\u5883\uff1aWindows10\uff0c\u9700\u8981\u5b89\u88c5 GitBash\u3001Nodejs \uff0c\u65b9\u6cd5\u8bf7\u81ea\u884c\u641c\u7d22\u5427<\/h3>\n\n\n\n<p>1\u3001\u53bbgithub\u5b98\u7f51\u6ce8\u518c\u8d26\u53f7https:\/\/github.com<\/p>\n\n\n\n<p>2\u3001\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u2795\u53f7\uff0cCreate a new repository\uff0c\u521b\u5efa\u9879\u76ee<\/p>\n\n\n\n<p>3\u3001\u5efa\u7acb\u4e0e\u4f60\u7528\u6237\u540d\u5bf9\u5e94\u7684\u4ed3\u5e93\uff0c\u4ed3\u5e93\u540d\u5fc5\u987b\u4e3a[username.github.io]\uff0c\u56fa\u5b9a\u5199\u6cd5<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"440\" height=\"79\" src=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_01.png\" alt=\"\" class=\"wp-image-1055\" srcset=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_01.png?v=1585627912 440w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_01-300x54.png?v=1585627912 300w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><figcaption>\u4ed3\u5e93\u540d\u4e0e\u7528\u6237\u540d\u4e00\u6837<\/figcaption><\/figure><\/div>\n\n\n\n<p>4\u3001\u5b89\u88c5\u597dGit\u540e\u6253\u5f00\uff0c\u8f93\u5165ssh-keygen -t rsa -C \u201cgithub\u8d26\u53f7\u90ae\u7bb1\u201d\uff0c\u8fde\u7eed\u56de\u8f66\u4e24\u6b21\uff0c\u751f\u6210key<\/p>\n\n\n\n<p>5\u3001\u6253\u5f00\u7528\u6237\u76ee\u5f55\u751f\u6210\u7684<code>C:\\Users\\16838\\.ssh\\id_rsa.pub<\/code>\uff0c\u590d\u5236key\uff0c\u4e3a\u9879\u76ee\u6dfb\u52a0ssh key<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"439\" src=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_02-1024x439.png\" alt=\"\" class=\"wp-image-1056\" srcset=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_02-1024x439.png?v=1585627911 1024w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_02-300x129.png?v=1585627911 300w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_02-768x329.png?v=1585627911 768w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_02-660x283.png?v=1585627911 660w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_02.png?v=1585627911 1064w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>ssh keys<\/figcaption><\/figure><\/div>\n\n\n\n<p>6\u3001\u6d4b\u8bd5\u662f\u5426\u672c\u673a\u4e0egit\u8fde\u63a5<br>ssh -T <a href=\"mailto:git@github.com\">git@github.com<\/a>\uff0c\u5982\u679c\u8f93\u51fa<code>You've successfully authenticated, but GitHub does not provide shell access.<\/code>\u8868\u793aSSH\u5df2\u914d\u7f6e\u6210\u529f<\/p>\n\n\n\n<p>7\u3001\u914d\u7f6e\u8d26\u53f7\u90ae\u7bb1<br>git config \u2013global user.name \u201c github \u7528\u6237\u540d \u201d<br>git config \u2013global user.email \u201c github \u6ce8\u518c\u90ae\u7bb1 \u201d<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e0b\u8f7d\u914d\u7f6eHEXO<\/h3>\n\n\n\n<p>\u4f7f\u7528npm\u5b89\u88c5hexo\uff0c\u53ef\u4ee5\u5728gitbash\u91cc\u9762\u8f93\u5165<\/p>\n\n\n\n<ol><li>npm install -g hexo-cli<\/li><li>hexo init blog<\/li><li>cd blog<\/li><li>npm install <\/li><\/ol>\n\n\n\n<p> \u8f93\u5165hexo server\u5f00\u542fhexo\u670d\u52a1\uff0c\u6d4f\u89c8\u5668\u8f93\u5165localhost:4000\uff0c\u80fd\u770b\u5230hexo hello world\u5373\u8868\u793a\u53ef\u4ee5\u4f7f\u7528Hexo\u4e86 <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"87\" src=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_03.png\" alt=\"\" class=\"wp-image-1057\" srcset=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_03.png?v=1585627910 524w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_03-300x50.png?v=1585627910 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><figcaption>hexo s<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u88c5NEXT\u4e3b\u9898<\/h3>\n\n\n\n<ol><li>$ git clone https:\/\/github.com\/iissnan\/hexo-theme-next themes\/next<\/li><li>\u6253\u5f00\u7ad9\u70b9\u914d\u7f6e\u6587\u4ef6_config.yml\uff0c\u627e\u5230theme\u5b57\u6bb5\uff0c\u5c06\u4e4b\u6539\u4e3anext<\/li><li>\u6253\u5f00\u4e3b\u9898\u914d\u7f6e\u6587\u4ef6\uff0c\u5c06scheme\u6539\u6210Pisces<\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"932\" height=\"350\" src=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_04.png\" alt=\"\" class=\"wp-image-1058\" srcset=\"http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_04.png?v=1585627909 932w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_04-300x113.png?v=1585627909 300w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_04-768x288.png?v=1585627909 768w, http:\/\/iqotom.com\/wp-content\/uploads\/2019\/10\/githubpages_04-660x248.png?v=1585627909 660w\" sizes=\"(max-width: 932px) 100vw, 932px\" \/><figcaption>github next<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u63d0\u4ea4\u7ad9\u70b9<\/h3>\n\n\n\n<p>\u4fee\u6539\u7ad9\u70b9\u914d\u7f6e\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ed3\u5e93\u5730\u5740<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deploy:\n- type: git\n  repository: git@github.com:bestminipc\/bestminipc.github.io.git\n  branch: master<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5hexo \u63d2\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install hexo-deployer-git \u2013save<\/code><\/pre>\n\n\n\n<p>\u7ad9\u70b9\u6839\u76ee\u5f55\u6267\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hexo clean\nhexo g -d<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u642d\u5efa\u73af\u5883\uff1aWindows10\uff0c\u9700\u8981\u5b89\u88c5 GitBash\u3001Nodejs \uff0c\u65b9\u6cd5\u8bf7\u81ea\u884c\u641c\u7d22\u5427 1\u3001\u53bbgithub\u5b98\u2026 <span class=\"read-more\"><a href=\"http:\/\/iqotom.com\/?p=1053\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":1054,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86],"tags":[88,87],"_links":{"self":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1053"}],"collection":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1053"}],"version-history":[{"count":2,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1053\/revisions"}],"predecessor-version":[{"id":1082,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1053\/revisions\/1082"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/media\/1054"}],"wp:attachment":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1053"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}