-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-search.xml
39 lines (18 loc) · 8.01 KB
/
local-search.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
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>个人博客搭建--hexo-github</title>
<link href="/2023/03/27/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA-hexo-github/"/>
<url>/2023/03/27/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA-hexo-github/</url>
<content type="html"><![CDATA[<h3 id="1、准备环境"><a href="#1、准备环境" class="headerlink" title="1、准备环境"></a>1、准备环境</h3><ul><li>node.js</li><li>git</li><li>github账号</li></ul><h3 id="2、测试环境"><a href="#2、测试环境" class="headerlink" title="2、测试环境"></a>2、测试环境</h3><figure class="highlight plaintext"><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><code class="hljs git">git -version<br>node -v<br>npm -v<br></code></pre></td></tr></table></figure><h3 id="3、安装hexo全局框架"><a href="#3、安装hexo全局框架" class="headerlink" title="3、安装hexo全局框架"></a>3、安装hexo全局框架</h3><figure class="highlight plaintext"><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><code class="hljs git">npm install -g hexo-cli<br>#验证<br>hexo -v<br></code></pre></td></tr></table></figure><h3 id="4、开始搭建博客"><a href="#4、开始搭建博客" class="headerlink" title="4、开始搭建博客"></a>4、开始搭建博客</h3><figure class="highlight mipsasm"><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><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs mipsasm">mkdir <span class="hljs-keyword">blog</span><br><span class="hljs-keyword"></span>cd <span class="hljs-keyword">blog</span><br><span class="hljs-keyword"></span><span class="hljs-comment">#初始化</span><br>hexo init<br><span class="hljs-keyword">dir</span><br><span class="hljs-keyword"></span><span class="hljs-comment">#启动服务,本地查看localhost:4000</span><br>hexo s<br><span class="hljs-comment">#ctrl + c 退出</span><br><span class="hljs-comment">#清理一下</span><br>hexo clean<br><span class="hljs-comment">#生成</span><br>hexo g<br><span class="hljs-comment">#安装Github博客工具</span><br>npm <span class="hljs-keyword">install </span>--save hexo-deployer-git<br></code></pre></td></tr></table></figure><h3 id="5、Github新建仓库"><a href="#5、Github新建仓库" class="headerlink" title="5、Github新建仓库"></a>5、Github新建仓库</h3><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs jboss-cli">仓库名要求:用户名<span class="hljs-string">.github.io</span><br></code></pre></td></tr></table></figure><h3 id="6、-config-yml配置文件"><a href="#6、-config-yml配置文件" class="headerlink" title="6、_config.yml配置文件"></a>6、_config.yml配置文件</h3><figure class="highlight yml"><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><code class="hljs yml"><span class="hljs-attr">deploy:</span><br> <span class="hljs-attr">type:</span> <span class="hljs-string">git</span><br> <span class="hljs-attr">repository:</span> <span class="hljs-string">https://github.com/用户名/用户名.github.io</span><br> <span class="hljs-attr">branch:</span> <span class="hljs-string">main</span><br></code></pre></td></tr></table></figure><h3 id="7、自定义博客主题"><a href="#7、自定义博客主题" class="headerlink" title="7、自定义博客主题"></a>7、自定义博客主题</h3><p><a href="https://hexo.io/themes/">Themes | Hexo</a></p><figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs crmsh">git <span class="hljs-keyword">clone</span> <span class="hljs-title">url</span><br></code></pre></td></tr></table></figure><figure class="highlight avrasm"><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><code class="hljs avrasm">配置文件_config.yml<br><span class="hljs-symbol">themes:</span> 主题名称<br>保存退出<br></code></pre></td></tr></table></figure><h3 id="8、部署"><a href="#8、部署" class="headerlink" title="8、部署"></a>8、部署</h3><figure class="highlight jboss-cli"><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></pre></td><td class="code"><pre><code class="hljs jboss-cli">hexo clean <br>hexo g<br>hexo s<br><span class="hljs-comment">#主题过度到远端github上</span><br>hexo g -d<br><span class="hljs-comment">#访问</span><br>用户名<span class="hljs-string">.github.io</span><br></code></pre></td></tr></table></figure>]]></content>
<tags>
<tag>hexo</tag>
</tags>
</entry>
<entry>
<title>Hello World</title>
<link href="/2023/03/27/hello-world/"/>
<url>/2023/03/27/hello-world/</url>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">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">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">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><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">$ hexo new <span class="hljs-string">"My New Post"</span><br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">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><code class="hljs bash">$ hexo server<br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">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><code class="hljs bash">$ hexo generate<br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">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><code class="hljs bash">$ hexo deploy<br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
</entry>
</search>