Files
WarlockFish.github.io/atom.xml

156 lines
44 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Warlock Fish</title>
<subtitle>Welcome To Here</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://warlockfish.xyz/"/>
<updated>2017-11-22T12:52:47.812Z</updated>
<id>http://warlockfish.xyz/</id>
<author>
<name>Warlock Fish</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>ubuntu强制清除垃圾回收站</title>
<link href="http://warlockfish.xyz/2017/11/22/ubuntu%E5%BC%BA%E5%88%B6%E6%B8%85%E9%99%A4%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%AB%99/"/>
<id>http://warlockfish.xyz/2017/11/22/ubuntu强制清除垃圾回收站/</id>
<published>2017-11-22T12:38:23.000Z</published>
<updated>2017-11-22T12:52:47.812Z</updated>
<content type="html"><![CDATA[<h1 id="强制清除垃圾回收站"><a href="#强制清除垃圾回收站" class="headerlink" title="强制清除垃圾回收站"></a>强制清除垃圾回收站</h1><a id="more"></a><h2 id="问题"><a href="#问题" class="headerlink" title="问题"></a>问题</h2><p>我遇到了无法在Ubuntu 16.04中清空回收站的问题。我右键回收站图标并选择清空回收站,就像我一直做的那样。我看到进度条显示删除文件中过了一段时间。但是它停止了,垃圾站中有些文件删除了,但有些文件还是没有删除。在看了文件夹后原来没有权限。</p><h2 id="方案"><a href="#方案" class="headerlink" title="方案"></a>方案</h2><p>Ubuntu 16.04的回收站路径为</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="variable">$HOME</span>/.<span class="built_in">local</span>/share/Trash/</div></pre></td></tr></table></figure><p>然后用以下命令即可清空回收站</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo rm -fr <span class="variable">$HOME</span>/.<span class="built_in">local</span>/share/Trash/files/*</div></pre></td></tr></table></figure>]]></content>
<summary type="html">
&lt;h1 id=&quot;强制清除垃圾回收站&quot;&gt;&lt;a href=&quot;#强制清除垃圾回收站&quot; class=&quot;headerlink&quot; title=&quot;强制清除垃圾回收站&quot;&gt;&lt;/a&gt;强制清除垃圾回收站&lt;/h1&gt;
</summary>
<category term="linux" scheme="http://warlockfish.xyz/categories/linux/"/>
<category term="unbuntu" scheme="http://warlockfish.xyz/tags/unbuntu/"/>
<category term="linux垃圾站" scheme="http://warlockfish.xyz/tags/linux%EF%BC%8C%E5%9E%83%E5%9C%BE%E7%AB%99/"/>
</entry>
<entry>
<title>ubuntu配置</title>
<link href="http://warlockfish.xyz/2017/10/29/ubuntu%E9%85%8D%E7%BD%AE/"/>
<id>http://warlockfish.xyz/2017/10/29/ubuntu配置/</id>
<published>2017-10-29T13:55:50.000Z</published>
<updated>2017-10-31T08:31:35.062Z</updated>
<content type="html"><![CDATA[<h1 id="ubuntu16-04安装后配置"><a href="#ubuntu16-04安装后配置" class="headerlink" title="ubuntu16.04安装后配置"></a>ubuntu16.04安装后配置</h1><a id="more"></a><h2 id="0-更新源"><a href="#0-更新源" class="headerlink" title="0.更新源"></a>0.更新源</h2><p>更换阿里云的源<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted</span></div><div class="line"></div><div class="line"><span class="comment"># See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to</span></div><div class="line"><span class="comment"># newer versions of the distribution.</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted</span></div><div class="line"></div><div class="line"><span class="comment">## Major bug fix updates produced after the final release of the</span></div><div class="line"><span class="comment">## distribution.</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted</span></div><div class="line"></div><div class="line"><span class="comment">## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu</span></div><div class="line"><span class="comment">## team. Also, please note that software in universe WILL NOT receive any</span></div><div class="line"><span class="comment">## review or updates from the Ubuntu security team.</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial universe</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe</span></div><div class="line"></div><div class="line"><span class="comment">## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu</span></div><div class="line"><span class="comment">## team, and may not be under a free licence. Please satisfy yourself as to</span></div><div class="line"><span class="comment">## your rights to use the software. Also, please note that software in</span></div><div class="line"><span class="comment">## multiverse WILL NOT receive any review or updates from the Ubuntu</span></div><div class="line"><span class="comment">## security team.</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse</span></div><div class="line"></div><div class="line"><span class="comment">## N.B. software from this repository may not have been tested as</span></div><div class="line"><span class="comment">## extensively as that contained in the main release, although it includes</span></div><div class="line"><span class="comment">## newer versions of some applications which may provide useful features.</span></div><div class="line"><span class="comment">## Also, please note that software in backports WILL NOT receive any review</span></div><div class="line"><span class="comment">## or updates from the Ubuntu security team.</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse</div><div class="line"><span class="comment"># deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse</span></div><div class="line"></div><div class="line"><span class="comment">## Uncomment the following two lines to add software from Canonical's</span></div><div class="line"><span class="comment">## 'partner' repository.</span></div><div class="line"><span class="comment">## This software is not part of Ubuntu, but is offered by Canonical and the</span></div><div class="line"><span class="comment">## respective vendors as a service to Ubuntu users.</span></div><div class="line"><span class="comment"># deb http://archive.canonical.com/ubuntu xenial partner</span></div><div class="line"><span class="comment"># deb-src http://archive.canonical.com/ubuntu xenial partner</span></div><div class="line"></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted</div><div class="line"><span class="comment"># deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe</div><div class="line"><span class="comment"># deb-src http://security.ubuntu.com/ubuntu xenial-security universe</span></div><div class="line">deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse</div><div class="line"><span class="comment"># deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse</span></div></pre></td></tr></table></figure></p><p>list文件在<code>/etc/apt/sources.list</code>下</p><p>然后更新源和软件<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo apt-get update</div><div class="line">sudo apt-get dist-upgrade</div></pre></td></tr></table></figure></p><h2 id="1-更换显卡驱动"><a href="#1-更换显卡驱动" class="headerlink" title="1.更换显卡驱动"></a>1.更换显卡驱动</h2><p><img src="/photo/驱动01.png" alt="显卡更换"></p><p>ubuntu上有nvidia的驱动</p><h2 id="2-同步时间"><a href="#2-同步时间" class="headerlink" title="2.同步时间"></a>2.同步时间</h2><p>使用双系统时间不同,故要使用<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo timedatectl <span class="built_in">set</span>-local-rtc 1</div></pre></td></tr></table></figure></p><h2 id="3-安装软件"><a href="#3-安装软件" class="headerlink" title="3.安装软件"></a>3.安装软件</h2><h3 id="3-1-删除亚马逊链接"><a href="#3-1-删除亚马逊链接" class="headerlink" title="3.1 删除亚马逊链接"></a>3.1 删除亚马逊链接</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get remove unity-webapps-common</div></pre></td></tr></table></figure><h3 id="3-2-安装vim"><a href="#3-2-安装vim" class="headerlink" title="3.2 安装vim"></a>3.2 安装vim</h3><pre><code>sudo apt-get install vim</code></pre><h3 id="3-3-安装git和vpnc"><a href="#3-3-安装git和vpnc" class="headerlink" title="3.3 安装git和vpnc"></a>3.3 安装git和vpnc</h3><pre><code>sudo apt-get install vpnc git</code></pre><h3 id="3-4-安装ExFat文件系统驱动"><a href="#3-4-安装ExFat文件系统驱动" class="headerlink" title="3.4 安装ExFat文件系统驱动"></a>3.4 安装ExFat文件系统驱动</h3><p>Ubuntu默认不支持exFat文件系统的挂载需要手动安装exfat的支持</p><pre><code>sudo apt-get install exfat-fuse</code></pre><h3 id="3-5-修复分区"><a href="#3-5-修复分区" class="headerlink" title="3.5 修复分区"></a>3.5 修复分区</h3><pre><code>sudo ntfsfix /dev/sda8</code></pre><h3 id="3-6安装atom"><a href="#3-6安装atom" class="headerlink" title="3.6安装atom"></a>3.6安装atom</h3><p>官网下载最新版本 <a href="https://atom.io/" target="_blank" rel="external">atom</a></p><h3 id="3-7-uget-aria2下载工具"><a href="#3-7-uget-aria2下载工具" class="headerlink" title="3.7 uget+aria2下载工具"></a>3.7 uget+aria2下载工具</h3><p>安装uget和aria2<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install uget aria2</div></pre></td></tr></table></figure></p><p>配置</p><p> a.打开uget。</p><p> b.打开界面的编辑—&gt;设置—&gt;插件插件匹配顺序aria2 。</p><p> c.打开界面的分类—&gt;默认一般设置。调整最大连接数建议在5)。设置一下下载文件夹。</p><p>在火狐中使用Flashgot扩展就可以。</p><h3 id="3-8-安装shadowsocks-qt5"><a href="#3-8-安装shadowsocks-qt5" class="headerlink" title="3.8 安装shadowsocks-qt5"></a>3.8 安装shadowsocks-qt5</h3><ul><li>添加源安装</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">sudo add-apt-repository ppa:hzwhuang/ss-qt5</div><div class="line">sudo apt-get update</div><div class="line">sudo apt-get install shadowsocks-qt5</div></pre></td></tr></table></figure><h3 id="3-9-安装wine-TIM"><a href="#3-9-安装wine-TIM" class="headerlink" title="3.9 安装wine/TIM"></a>3.9 安装wine/TIM</h3><p>使用 wine staging 开发版本的 wine )安装详细教程 <a href="https://wine-staging.com/installation.html" target="_blank" rel="external">https://wine-staging.com/installation.html</a><br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">sudo dpkg --add-architecture i386</div><div class="line"><span class="comment">#add the repository:</span></div><div class="line">wget -nc https://dl.winehq.org/wine-builds/Release.key</div><div class="line">sudo apt-key add Release.key</div><div class="line">sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/</div><div class="line"><span class="comment">#install</span></div><div class="line">sudo apt-get update</div><div class="line">sudo apt-get install --install-recommends winehq-staging</div></pre></td></tr></table></figure></p><p>去qq官网下载<a href="http://office.qq.com/" target="_blank" rel="external">TIM</a> 我使用的是TIM1.2。</p><p>安装wine后 ,命令执行<code>winecfg</code>然后会安装一些插件选择安装它们。然后拷贝windows字体不安装字体会使一些字无法查看。</p><p>windows字体在c\windows\fonts</p><p>把这个目录下字体全部复制到wine下的设置目录下</p><p>~/.wine/drive_c/windows/Fonts/</p><p>重载所有wine的配置<code>wineboot</code><br>再次打开wine <code>winecfg</code>配置如图</p><p><img src="/photo/wine设置.png" alt="wine 设置"></p><p>然后重启一下wine <code>wineboot</code> 。安装tim时使用Wine Windows Program Loader 打开TIM。然后就是windows下安装程序——点点点。</p><p>备注此方法有个bug 当TIM打开讨论组时会是TIM崩溃。</p><p>建立桌面快捷方式<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line">[Desktop Entry]</div><div class="line">Encoding=UTF-8</div><div class="line">Version=1.2</div><div class="line">Name[en_US]=TIM</div><div class="line">Name[zh_CN]=腾讯TIM</div><div class="line">Exec=env LC_ALL=zh_CN.utf8 wine /home/h/.wine/drive_c/Program\ Files\ \(x86\)/Tencent/TIM/Bin/TIM.exe</div><div class="line">Icon=/home/h/we/electronic-wechat-linux-x64/photo/TIM.ico</div><div class="line">Terminal=<span class="literal">false</span></div><div class="line">NoDisplay=<span class="literal">false</span></div><div class="line">StartupNotify=<span class="literal">true</span></div><div class="line">Type=Application</div><div class="line">Categories=Network;InstantMessaging;</div></pre></td></tr></table></figure></p><h3 id="3-10-安装electronic-wechat"><a href="#3-10-安装electronic-wechat" class="headerlink" title="3.10 安装electronic-wechat"></a>3.10 安装electronic-wechat</h3><p>项目在 <a href="https://github.com/geeeeeeeeek/electronic-wechat" target="_blank" rel="external">github</a> 上 。<br>我使用源码安装失败了npm总是出错不知为什么。如果你使用源码安装成功请求教最后使用安装版见此 <a href="https://github.com/geeeeeeeeek/electronic-wechat/releases" target="_blank" rel="external">https://github.com/geeeeeeeeek/electronic-wechat/releases</a></p><p>在桌面上建立图标<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line">[Desktop Entry]</div><div class="line">Encoding=UTF-8</div><div class="line">Name=微信</div><div class="line">Comment=electronic-wechat</div><div class="line">Exec=/home/h/we/electronic-wechat-linux-x64/electronic-wechat</div><div class="line">Icon=/home/h/we/electronic-wechat-linux-x64/photo/icon.png</div><div class="line">Terminal=<span class="literal">false</span></div><div class="line">StartupNotify=<span class="literal">true</span></div><div class="line">Type=Application</div><div class="line">Categories=Application</div></pre></td></tr></table></figure></p><h3 id="3-11-安装最新的python3"><a href="#3-11-安装最新的python3" class="headerlink" title="3.11 安装最新的python3"></a>3.11 安装最新的python3</h3><p>首先下载最新的python版本这个在python官网上下载<a href="https://www.python.org/downloads/" target="_blank" rel="external">python官网</a></p><p>解压 进入其目录<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">./configure</div><div class="line">make</div><div class="line">make install</div></pre></td></tr></table></figure></p><p>安装完后检查二进制文件的位置<br><figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">which python3</div><div class="line">python3 -V <span class="comment">#V是大写的</span></div></pre></td></tr></table></figure></p><h3 id="3-12安装最新版本的npm-和-nodejs"><a href="#3-12安装最新版本的npm-和-nodejs" class="headerlink" title="3.12安装最新版本的npm 和 nodejs"></a>3.12安装最新版本的npm 和 nodejs</h3><p>首先安装npm和 nodejs<br><figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install nodejs-legacy</div><div class="line">suao apt-get install npm</div></pre></td></tr></table></figure></p><p>ubuntu上安装时npm和nodejs都是低版本。</p><ul><li><p>升级npm</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo npm install npm -g</div></pre></td></tr></table></figure></li><li><p>升级node.js</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo npm install -g n</div><div class="line">sudo n stable</div></pre></td></tr></table></figure></li></ul><h2 id="4-gnome3的安装和配置"><a href="#4-gnome3的安装和配置" class="headerlink" title="4.gnome3的安装和配置"></a>4.gnome3的安装和配置</h2><ul><li><p>安装gnome</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install gnome</div></pre></td></tr></table></figure></li><li><p>arc主题<br>在github上的项目 <a href="https://github.com/horst3180/arc-theme" target="_blank" rel="external">horst3180/arc-theme</a></p></li><li><p>Papirus图标<br>github上项目<a href="https://github.com/PapirusDevelopmentTeam/papirus-icon-theme" target="_blank" rel="external">PapirusDevelopmentTeam/papirus-icon-theme</a></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">sudo add-apt-repository ppa:papirus/papirus</div><div class="line">sudo apt-get update</div><div class="line">sudo apt-get install papirus-icon-theme</div></pre></td></tr></table></figure></li></ul>]]></content>
<summary type="html">
&lt;h1 id=&quot;ubuntu16-04安装后配置&quot;&gt;&lt;a href=&quot;#ubuntu16-04安装后配置&quot; class=&quot;headerlink&quot; title=&quot;ubuntu16.04安装后配置&quot;&gt;&lt;/a&gt;ubuntu16.04安装后配置&lt;/h1&gt;
</summary>
<category term="ubuntu 安装" scheme="http://warlockfish.xyz/categories/ubuntu-%E5%AE%89%E8%A3%85/"/>
<category term="教程" scheme="http://warlockfish.xyz/tags/%E6%95%99%E7%A8%8B/"/>
<category term="ubuntu" scheme="http://warlockfish.xyz/tags/ubuntu/"/>
</entry>
<entry>
<title>github+hexo 搭建博客</title>
<link href="http://warlockfish.xyz/2017/10/15/github-hexo-%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2/"/>
<id>http://warlockfish.xyz/2017/10/15/github-hexo-搭建博客/</id>
<published>2017-10-15T15:04:53.000Z</published>
<updated>2017-10-29T13:54:08.715Z</updated>
<content type="html"><![CDATA[<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=439915614&auto=0&height=66"></iframe><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p> 本文章讲述如何利用 <a href="https://github.com/" target="_blank" rel="external">github pages</a> 和 <a href="https://hexo.io/" target="_blank" rel="external">hexo</a> 建博客</p><a id="more"></a><h2 id="准备环境"><a href="#准备环境" class="headerlink" title="准备环境"></a>准备环境</h2><ul><li>有一个github账号没有的话去 github <a href="https://github.com/" target="_blank" rel="external">https://github.com/</a> 注册一个;</li><li>安装node.js、npm</li><li>安装git</li><li>安装hexo</li></ul><p>本文所使用的环境:</p><ul><li>ubuntu 16.04</li><li>node.js 8.6.0</li><li>git 2.7.4</li><li>hexo 3.3.9</li></ul><h1 id="搭建github博客"><a href="#搭建github博客" class="headerlink" title="搭建github博客"></a>搭建github博客</h1><h2 id="创建仓库"><a href="#创建仓库" class="headerlink" title="创建仓库"></a>创建仓库</h2><p>在注册完github帐号后新建一个名为<code>用户名.github.io</code>的仓库比如说如果你的github用户名是test那么你就新建<code>test.github.io</code>的仓库(必须是你的用户名,其它名称无效),将来你的网站访问地址就是 <a href="http://test.github.io" target="_blank" rel="external">http://test.github.io</a> 。</p><p><img src="/photo/注册1.png" alt=""></p><p>由此可见每一个github账户最多只能创建一个这样可以直接使用域名访问的仓库。</p><p>几个注意的地方:</p><ol><li>注册的邮箱一定要验证,否则不会成功;</li><li>仓库名字必须是:<code>username.github.io</code>,其中<code>username</code>是你的用户名;</li></ol><p>创建成功后,默认会在你这个仓库里生成一些示例页面,以后你的网站所有代码都是放在这个仓库里啦。</p><h2 id="node-js-amp-amp-npm-安装"><a href="#node-js-amp-amp-npm-安装" class="headerlink" title="node.js&amp;&amp;npm 安装"></a>node.js&amp;&amp;npm 安装</h2><ul><li>node官网 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <v> <a href="https://nodejs.org/en/" target="_blank" rel="external">https://nodejs.org/en/</a></v></li><li>npm官网 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<v> <a href="https://www.npmjs.com" target="_blank" rel="external">https://www.npmjs.com</a></v></li></ul><p>ubuntu下安装</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install nodejs &amp;&amp; npm</div></pre></td></tr></table></figure><h2 id="git-安装"><a href="#git-安装" class="headerlink" title="git 安装"></a>git 安装</h2><ul><li><p>git官网下载 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<v> <a href="https://git-scm.com/downloads/" target="_blank" rel="external">https://git-scm.com/downloads/</a></v></p><p>Windows: <v>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://windows.github.com/" target="_blank" rel="external">https://windows.github.com/</a></v></p><p>Mac: <v>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://mac.github.com" target="_blank" rel="external">https://mac.github.com</a></v></p></li></ul><p>其实ubuntu下直接安装就好:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install git</div></pre></td></tr></table></figure><h1 id="配置SSH-key"><a href="#配置SSH-key" class="headerlink" title="配置SSH key"></a>配置SSH key</h1><p>为什么要配置这个呢因为你提交代码肯定要拥有你的github权限才可以但是直接使用用户名和密码太不安全了所以我们使用ssh key来解决本地和服务器的连接问题。</p><p>用git bash执行如下命令</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">cd</span> ~/. ssh <span class="comment">#检查本机已存在的ssh密钥</span></div></pre></td></tr></table></figure><p>如果提示No such file or directory 说明你是第一次使用git。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">ssh-keygen -t rsa -C <span class="string">"邮件地址"</span></div></pre></td></tr></table></figure><p>然后连续3次回车最终会生成一个文件在用户目录下打开用户目录找到<code>.ssh\id_rsa.pub</code>文件记事本打开并复制里面的内容打开你的github主页进入个人设置 -&gt; SSH and GPG keys -&gt; New SSH key</p><p><img src="http://image.liuxianan.com/201608/20160818_143914_495_9084.png" alt=""></p><p>将刚复制的内容粘贴到key那里title随便填保存。</p><h2 id="测试是否成功"><a href="#测试是否成功" class="headerlink" title="测试是否成功"></a>测试是否成功</h2><p> $ ssh -T git@github.com # 注意邮箱地址不改</p><p>如果提示<code>Are you sure you want to continue connecting (yes/no)?</code>输入yes然后会看到</p><blockquote><p>Hi liuxianan! Youve successfully authenticated, but GitHub does not provide shell access.</p></blockquote><p>看到这个信息说明SSH已配置成功</p><p>此时你还需要配置:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ git config --global user.name <span class="string">"liuxianan"</span>// 你的github用户名非昵称</div><div class="line">$ git config --global user.email <span class="string">"xxx@qq.com"</span>// 填写你的github注册邮箱</div></pre></td></tr></table></figure><p>配置完之后输入:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ git config --list <span class="comment">#查看已设配置</span></div></pre></td></tr></table></figure><p>查看usernameemail是否正确</p><h1 id="使用hexo写博客"><a href="#使用hexo写博客" class="headerlink" title="使用hexo写博客"></a>使用hexo写博客</h1><h2 id="hexo简介"><a href="#hexo简介" class="headerlink" title="hexo简介"></a>hexo简介</h2><p>Hexo是一个简单、快速、强大的基于 Github Pages 的博客发布工具支持Markdown格式有众多优秀插件和主题。</p><p>官网: <a href="http://hexo.io" target="_blank" rel="external">http://hexo.io</a><br>github: <a href="https://github.com/hexojs/hexo" target="_blank" rel="external">https://github.com/hexojs/hexo</a></p><h2 id="原理"><a href="#原理" class="headerlink" title="原理"></a>原理</h2><p>由于github pages存放的都是静态文件博客存放的不只是文章内容还有文章列表、分类、标签、翻页等动态内容假如每次写完一篇文章都要手动更新博文目录和相关链接信息相信谁都会疯掉所以hexo所做的就是将这些md文件都放在本地每次写完文章后调用写好的命令来批量完成相关页面的生成然后再将有改动的页面提交到github。</p><h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install -g hexo</div></pre></td></tr></table></figure><h2 id="初始化"><a href="#初始化" class="headerlink" title="初始化"></a>初始化</h2><p>在电脑的某个地方新建一个名为hexo的文件夹名字可以随便取<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">cd</span> ~/hexo/</div><div class="line">$ hexo init <span class="comment">#初始化文件夹</span></div><div class="line">$ npm install <span class="comment">#安装包</span></div></pre></td></tr></table></figure></p><p>hexo安装成功后hexo文件夹目录为</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">.</div><div class="line">├── _config.yml // 网站的配置信息,你可以在此配置大部分的参数。</div><div class="line">├── package.json</div><div class="line">├── scaffolds // 模板文件夹。当你新建文章时Hexo会根据scaffold来建立文件。</div><div class="line">├── source // 存放用户资源的地方</div><div class="line">| ├── _drafts</div><div class="line">| └── _posts</div><div class="line">└── themes // 存放网站的主题。Hexo会根据主题来生成静态页面</div></pre></td></tr></table></figure><p>具体内容可见<a href="https://hexo.io/zh-cn/docs/setup.html" target="_blank" rel="external">hexo建站</a></p><p>然后输入下面:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ hexo g <span class="comment"># 生成public文件夹浏览器访问资源</span></div><div class="line">$ hexo s <span class="comment"># 启动服务</span></div></pre></td></tr></table></figure></p><p>执行以上命令之后hexo就会在public文件夹生成相关html文件这些文件将来都是要提交到github去的</p><p><code>hexo s</code>是开启本地预览服务,打开浏览器访问 <a href="http://localhost:4000" target="_blank" rel="external">http://localhost:4000</a> 即可看到内容很多人会碰到浏览器一直在转圈但是就是加载不出来的问题一般情况下是因为端口占用的缘故因为4000这个端口太常见了解决端口冲突问题请参考这篇文章</p><p><a href="http://blog.liuxianan.com/windows-port-bind.html" target="_blank" rel="external">http://blog.liuxianan.com/windows-port-bind.html</a></p><p>第一次初始化的时候hexo已经帮我们写了一篇名为 Hello World 的文章,默认的主题比较丑,打开时就是这个样子:</p><p><img src="/photo/2017.10.15.22.1.png" alt=""></p><h2 id="配对ssr"><a href="#配对ssr" class="headerlink" title="配对ssr"></a>配对ssr</h2><p>打开<code>~\Hexo</code> 文件夹中的<code>_config.yml</code>文件,填写内容<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># Deployment</span></div><div class="line"><span class="comment">## Docs: https://hexo.io/docs/deployment.html</span></div><div class="line">deploy:</div><div class="line"> <span class="built_in">type</span>: git</div><div class="line"> repository: git@github.com:WarlockFish/WarlockFish.github.io.git <span class="comment">#填入你的github链接我填的是我的</span></div><div class="line"> branch: master</div></pre></td></tr></table></figure></p><h2 id="修改主题"><a href="#修改主题" class="headerlink" title="修改主题"></a>修改主题</h2><p>默认主题很丑,可以来替换一个好看点的主题。这是 <a href="https://hexo.io/themes/" target="_blank" rel="external">官方主题</a> 链接</p><p>我使用的是 <a href="https://github.com/iissnan/hexo-theme-next" target="_blank" rel="external">next</a> .<br>喜欢使用可以安装:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ git <span class="built_in">clone</span> https://github.com/iissnan/hexo-theme-next themes/next</div></pre></td></tr></table></figure></p><p>记住要在hexo目录中执行上面指令。</p><p>修改<code>hexo</code>目录中的<code>_config.yml</code>中的<code>theme: landscape</code>改为<code>theme: next</code>,保存退出,<br>然后执行<code>hexo g</code>来重新生成文件。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># Extensions</span></div><div class="line"><span class="comment">## Plugins: https://hexo.io/plugins/</span></div><div class="line"><span class="comment">## Themes: https://hexo.io/themes/</span></div><div class="line">theme: next</div></pre></td></tr></table></figure></p><h2 id="写博客"><a href="#写博客" class="headerlink" title="写博客"></a>写博客</h2><p>在<code>hexo</code>下</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">hexo n <span class="string">"name of the new post"</span></div></pre></td></tr></table></figure><p>在<code>~/hexo/source/_posts</code>下会生成一份博客Hexo使用MarkDown写作语法。写完后可以使用<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">hexo g</div><div class="line">hexo s</div></pre></td></tr></table></figure></p><p>然后可以在本地访问 <a href="http://localhost:4000" target="_blank" rel="external">http://localhost:4000</a> 查看效果,便于更改</p><h2 id="更新Github"><a href="#更新Github" class="headerlink" title="更新Github"></a>更新Github</h2><p>进入目录<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">cd</span> ./hexo</div><div class="line">$ hexo g <span class="comment">#编译本地内容</span></div><div class="line">$ hexo d <span class="comment">#上传到github上</span></div></pre></td></tr></table></figure></p><p>这样就发布成功了,可以在网络上访问了。</p><p>谢谢阅读!!</p>]]></content>
<summary type="html">
&lt;iframe frameborder=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; width=&quot;330&quot; height=&quot;86&quot; src=&quot;//music.163.com/outchain/player?type=2&amp;id=439915614&amp;auto=0&amp;height=66&quot;&gt;&lt;/iframe&gt;
&lt;h1 id=&quot;前言&quot;&gt;&lt;a href=&quot;#前言&quot; class=&quot;headerlink&quot; title=&quot;前言&quot;&gt;&lt;/a&gt;前言&lt;/h1&gt;&lt;p&gt; 本文章讲述如何利用 &lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;github pages&lt;/a&gt;&lt;a href=&quot;https://hexo.io/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;hexo&lt;/a&gt; 建博客&lt;/p&gt;
</summary>
<category term="github + hexo" scheme="http://warlockfish.xyz/categories/github-hexo/"/>
<category term="new" scheme="http://warlockfish.xyz/tags/new/"/>
<category term="hexo" scheme="http://warlockfish.xyz/tags/hexo/"/>
<category term="github pages" scheme="http://warlockfish.xyz/tags/github-pages/"/>
<category term="教程" scheme="http://warlockfish.xyz/tags/%E6%95%99%E7%A8%8B/"/>
<category term="配置" scheme="http://warlockfish.xyz/tags/%E9%85%8D%E7%BD%AE/"/>
</entry>
<entry>
<title>my-first-blog</title>
<link href="http://warlockfish.xyz/2017/10/07/my-first-blog/"/>
<id>http://warlockfish.xyz/2017/10/07/my-first-blog/</id>
<published>2017-10-07T14:03:57.000Z</published>
<updated>2017-10-08T05:19:56.791Z</updated>
<content type="html"><![CDATA[<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=28138493&auto=0&height=66"></iframe><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>使用github pages服务搭建博客的好处有</p><ol><li><p>全是静态文件,访问速度快;</p></li><li><p>免费方便,不用花一分钱就可以搭建一个自由的个人博客,不需要服务器不需要后台;</p><a id="more"></a></li><li><p>可以随意绑定自己的域名不仔细看的话根本看不出来你的网站是基于github的</p></li><li><p>数据绝对安全基于github的版本管理想恢复到哪个历史版本都行</p></li><li><p>博客内容可以轻松打包、转移、发布到其它平台;</p></li><li><p>等等;</p></li></ol><p><img src="/photo/train.jpg" alt=""></p>]]></content>
<summary type="html">
&lt;iframe frameborder=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; width=&quot;330&quot; height=&quot;86&quot; src=&quot;//music.163.com/outchain/
player?type=2&amp;id=28138493&amp;auto=0&amp;height=66&quot;&gt;&lt;/iframe&gt;
&lt;h1 id=&quot;前言&quot;&gt;&lt;a href=&quot;#前言&quot; class=&quot;headerlink&quot; title=&quot;前言&quot;&gt;&lt;/a&gt;前言&lt;/h1&gt;&lt;p&gt;使用github pages服务搭建博客的好处有&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;全是静态文件,访问速度快;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;免费方便,不用花一分钱就可以搭建一个自由的个人博客,不需要服务器不需要后台;&lt;/p&gt;
</summary>
<category term="github pages" scheme="http://warlockfish.xyz/categories/github-pages/"/>
<category term="new" scheme="http://warlockfish.xyz/tags/new/"/>
<category term="github pages" scheme="http://warlockfish.xyz/tags/github-pages/"/>
<category term="静态网站" scheme="http://warlockfish.xyz/tags/%E9%9D%99%E6%80%81%E7%BD%91%E7%AB%99/"/>
</entry>
<entry>
<title>Hello World</title>
<link href="http://warlockfish.xyz/2017/10/07/hello-world/"/>
<id>http://warlockfish.xyz/2017/10/07/hello-world/</id>
<published>2017-10-07T02:00:00.000Z</published>
<updated>2017-10-07T11:36:42.405Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">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="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</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><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">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><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">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><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">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><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>]]></content>
<summary type="html">
&lt;p&gt;Welcome to &lt;a href=&quot;https://hexo.io/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;Hexo&lt;/a&gt;! This is your very first post. Check &lt;a href=&quot;https://hexo.
</summary>
<category term="hello world" scheme="http://warlockfish.xyz/tags/hello-world/"/>
</entry>
</feed>