-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.xml
80 lines (38 loc) · 23.1 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>主题写作容器</title>
<link href="/xiaoo.github.io/2022/07/27/%E4%B8%BB%E9%A2%98%E5%86%99%E4%BD%9C%E5%AE%B9%E5%99%A8/"/>
<url>/xiaoo.github.io/2022/07/27/%E4%B8%BB%E9%A2%98%E5%86%99%E4%BD%9C%E5%AE%B9%E5%99%A8/</url>
<content type="html"><![CDATA[<h2 id="一、Tip-容器"><a href="#一、Tip-容器" class="headerlink" title="一、Tip 容器"></a>一、Tip 容器</h2><h3 id="1、默认样式"><a href="#1、默认样式" class="headerlink" title="1、默认样式"></a>1、默认样式</h3><figure class="highlight js"><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">::: tip</span><br><span class="line">默认提示容器</span><br><span class="line">:::</span><br></pre></td></tr></table></figure><p>:::tip<br>默认提示容器<br>:::</p><h3 id="2、自定义标题"><a href="#2、自定义标题" class="headerlink" title="2、自定义标题"></a>2、自定义标题</h3><figure class="highlight js"><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">::: tip 唐诗三百首</span><br><span class="line">床前明月光,疑是地上霜</span><br><span class="line">:::</span><br></pre></td></tr></table></figure><p>:::tip 唐诗三百首<br>床前明月光,疑是地上霜<br>:::</p><hr><h1 id="二、Warning-容器"><a href="#二、Warning-容器" class="headerlink" title="二、Warning 容器"></a>二、Warning 容器</h1><figure class="highlight js"><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">::: warning</span><br><span class="line">警示容器</span><br><span class="line">:::</span><br></pre></td></tr></table></figure><p>:::warning<br>警示容器<br>:::</p><hr><h1 id="三、Warning-容器"><a href="#三、Warning-容器" class="headerlink" title="三、Warning 容器"></a>三、Warning 容器</h1><figure class="highlight js"><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 class="title class_">Danger</span></span><br><span class="line">危险容器</span><br><span class="line">:::</span><br></pre></td></tr></table></figure><p>:::danger<br>危险容器<br>:::</p><hr><h1 id="四、Details-容器"><a href="#四、Details-容器" class="headerlink" title="四、Details 容器"></a>四、Details 容器</h1><figure class="highlight js"><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></pre></td><td class="code"><pre><span class="line">:::details <span class="title class_">Click</span> to see more</span><br><span class="line"></span><br><span class="line"><span class="title class_">Fusce</span> rutrum venenatis eros <span class="keyword">in</span> hendrerit. <span class="title class_">Pellentesque</span> habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. <span class="title class_">Nullam</span> eget risus egestas, aliquet ipsum sed, volutpat tortor. <span class="title class_">Proin</span> finibus tortor ac mauris finibus rutrum. <span class="title class_">Nullam</span> tincidunt arcu eu urna ullamcorper, eu ultricies turpis ornare. <span class="title class_">Morbi</span> id sollicitudin orci. <span class="title class_">Proin</span> lobortis vehicula nibh a ornare. <span class="title class_">Cras</span> sodales eu ligula quis fermentum. <span class="title class_">Proin</span> eu ultrices leo, quis iaculis justo. <span class="title class_">Sed</span> dictum, nulla sit amet imperdiet commodo, libero sapien semper justo, ut lobortis elit nunc vitae ante. <span class="title class_">Nullam</span> lobortis odio quam, ac condimentum elit posuere vitae. <span class="title class_">Sed</span> ornare, odio et rutrum varius, lorem eros gravida urna, <span class="keyword">in</span> pharetra sapien justo non magna.</span><br><span class="line"></span><br><span class="line">- details content</span><br><span class="line">- details <span class="keyword">new</span> line</span><br><span class="line"></span><br><span class="line"><span class="string">``</span><span class="string">`javascript</span></span><br><span class="line"><span class="string">console.log('hello world')</span></span><br><span class="line"><span class="string">:::</span></span><br></pre></td></tr></table></figure><h4 id="关闭状态"><a href="#关闭状态" class="headerlink" title="关闭状态"></a>关闭状态</h4><img src="https://aurora.tridiamond.tech/images/screenshots/detail.png"><h4 id="展开状态"><a href="#展开状态" class="headerlink" title="展开状态"></a>展开状态</h4><img src="https://aurora.tridiamond.tech/images/screenshots/detail-opened.png">]]></content>
<categories>
<category> 博客 </category>
<category> Hexo </category>
<category> 主题 </category>
</categories>
<tags>
<tag> Hexo </tag>
<tag> 主题 </tag>
</tags>
</entry>
<entry>
<title>Hexo + Github 搭建</title>
<link href="/xiaoo.github.io/2022/07/27/hexo%E6%90%AD%E5%BB%BA/"/>
<url>/xiaoo.github.io/2022/07/27/hexo%E6%90%AD%E5%BB%BA/</url>
<content type="html"><![CDATA[<h1 id="hexo-coding博客搭建"><a href="#hexo-coding博客搭建" class="headerlink" title="hexo + coding博客搭建"></a>hexo + coding博客搭建</h1><h3 id="前期准备"><a href="#前期准备" class="headerlink" title="前期准备"></a>前期准备</h3><h5 id="一、安装Git"><a href="#一、安装Git" class="headerlink" title="一、安装Git"></a>一、安装Git</h5><ul><li>官网:</li><li>验证安装:<code>git -v</code></li></ul><h5 id="二、安装-Node-js"><a href="#二、安装-Node-js" class="headerlink" title="二、安装 Node.js"></a>二、安装 Node.js</h5><ul><li>官网:</li><li>验证安装:<code>node -v</code> & <code>npm -v</code></li></ul><h5 id="三、安装-cnpm"><a href="#三、安装-cnpm" class="headerlink" title="三、安装 cnpm"></a>三、安装 cnpm</h5><h4 id="node-js切换淘宝源"><a href="#node-js切换淘宝源" class="headerlink" title="node.js切换淘宝源"></a><strong>node.js切换淘宝源</strong></h4><h5 id="方法一:设置淘宝镜像源"><a href="#方法一:设置淘宝镜像源" class="headerlink" title="方法一:设置淘宝镜像源"></a>方法一:设置淘宝镜像源</h5><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">npm config <span class="built_in">set</span> registry https://registry.npm.taobao.org</span><br><span class="line">npm config get registry</span><br></pre></td></tr></table></figure><h5 id="方法二:安装淘宝镜像源"><a href="#方法二:安装淘宝镜像源" class="headerlink" title="方法二:安装淘宝镜像源"></a>方法二:安装淘宝镜像源</h5><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 cnpm --registry=https://registry.npm.taobao.org</span><br></pre></td></tr></table></figure><p>安装淘宝源后可以用cnpm代替npm命令,这里我们选择方法一。</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cnpm -v #检查 cnpm 版本 </span><br></pre></td></tr></table></figure><blockquote><p>[!tip] 成功样式<br>C:\Users\Administrator>cnpm -v<br><a href="mailto:cnpm@8.2.0">cnpm@8.2.0</a> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\lib\parse_argv.js)<br><a href="mailto:npm@8.13.2">npm@8.13.2</a> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\index.js)<br><a href="mailto:node@18.5.0">node@18.5.0</a> (C:\Program Files\nodejs\node.exe)<br><a href="mailto:npminstall@6.4.0">npminstall@6.4.0</a> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\index.js)<br>prefix=C:\Users\Administrator\AppData\Roaming\npm<br>win32 x64 10.0.19042<br>registry=<a href="https://registry.npmmirror.com/">https://registry.npmmirror.com</a></p></blockquote><h3 id="hexo环境搭建"><a href="#hexo环境搭建" class="headerlink" title="hexo环境搭建"></a>hexo环境搭建</h3><h4 id="四、安装-hexo"><a href="#四、安装-hexo" class="headerlink" title="四、安装 hexo"></a>四、安装 hexo</h4><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cnpm install -g hexo-cli</span><br></pre></td></tr></table></figure><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo -v <span class="comment">//查看hexo版本 </span></span><br></pre></td></tr></table></figure><h5 id="五、初始化"><a href="#五、初始化" class="headerlink" title="五、初始化"></a>五、初始化</h5><ol><li>在任意地方创建空文件夹,<code>shift + 右键</code>选择 <code>Git js Here</code></li></ol><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo init</span><br></pre></td></tr></table></figure><h5 id="六、本地生成、浏览"><a href="#六、本地生成、浏览" class="headerlink" title="六、本地生成、浏览"></a>六、本地生成、浏览</h5><figure class="highlight js"><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><span class="line">hexo clean #清理 </span><br><span class="line"></span><br><span class="line">hexo g #生成 </span><br><span class="line"></span><br><span class="line">hexo s #启动本地博客服务 </span><br><span class="line"></span><br><span class="line">#ctrl + C 断开浏览</span><br></pre></td></tr></table></figure><h3 id="部署"><a href="#部署" class="headerlink" title="部署"></a>部署</h3><h5 id="七、部署Coding"><a href="#七、部署Coding" class="headerlink" title="七、部署Coding"></a>七、部署Coding</h5><p>*将Coding仓库创建完成后进行一下操作:</p><ol><li><p>在<code>自己博客</code>文件夹下安装 Git 部署插件</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cnpm install --save hexo-deployer-git</span><br></pre></td></tr></table></figure><blockquote><p>[!tip] 成功<br>C:\Users\TZ>cnpm install –save hexo-deployer-git<br>√ Installed 1 packages<br>√ Linked 52 latest versions<br>√ Run 0 scripts<br>√ All packages installed (53 packages installed from npm registry, used 2s(network 2s), speed 308.4KB/s, json 2(32.1KB), tarball 701.29KB, manifests cache hit 51, etag hit 51 / miss 2)</p></blockquote></li><li><p>设置 Git 账号与邮箱(<em>账号邮箱自定义,邮箱用 coding 邮箱)</em></p><figure class="highlight js"><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">git config --<span class="variable language_">global</span> user.<span class="property">name</span> <span class="string">"Your Name"</span></span><br><span class="line">git config --<span class="variable language_">global</span> user.<span class="property">email</span> <span class="string">"your [email protected]"</span></span><br></pre></td></tr></table></figure></li><li><p>查看用户名和邮箱</p><figure class="highlight js"><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">git config user.<span class="property">name</span></span><br><span class="line">git config user.<span class="property">email</span></span><br></pre></td></tr></table></figure></li><li><p>生成 SSH 秘钥</p><figure class="highlight js"><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><span class="line">ssh-keygen -t rsa -C <span class="string">"[email protected]"</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//一路回车出现这个即可</span></span><br><span class="line">+---[<span class="variable constant_">RSA</span> <span class="number">3072</span>]----+</span><br><span class="line">| . oo . B@|</span><br><span class="line">| . . .. . ++=|</span><br><span class="line">| . . . . oo+|</span><br><span class="line">| . . .<span class="property">B</span>*|</span><br><span class="line">| . S . ..=*|</span><br><span class="line">| . . o. =oo|</span><br><span class="line">| . . o... + +o|</span><br><span class="line">| o . o. + o .|</span><br><span class="line">| . oo...E. |</span><br><span class="line">+----[<span class="title class_">SHA256</span>]-----+</span><br></pre></td></tr></table></figure></li><li><p>将 SSH 秘钥添加到 Coding 账号内<br> ![[Pasted image 20220709183303.png]]</p></li><li><p>接下来输入</p><figure class="highlight js"><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></pre></td><td class="code"><pre><span class="line">ssh -T git@git.<span class="property">coding</span>.<span class="property">net</span></span><br><span class="line"><span class="comment">// ssh -T [email protected]</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 输入`yes` 然后提示。。。表示成功</span></span><br><span class="line"><span class="comment">// Hi tzblog! You've successfully authenticated, but GitHub does not provide shell access.</span></span><br></pre></td></tr></table></figure></li><li><p>在博客文件夹中打开<code>_config.yml</code>,将最后一段替换成:</p><figure class="highlight js"><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="attr">deploy</span>:</span><br><span class="line"> - <span class="attr">type</span>: git</span><br><span class="line"> <span class="attr">repo</span>:</span><br><span class="line"> <span class="attr">coding</span>: <span class="attr">https</span>:<span class="comment">//e.coding.net/tzxyz/myweb/tzxyz.git</span></span><br><span class="line"> <span class="attr">github</span>: <span class="attr">https</span>:<span class="comment">//github.com/tzblog/tzblog.github.io.git</span></span><br><span class="line"> <span class="attr">branch</span>: master</span><br></pre></td></tr></table></figure></li><li><p>一键三连</p><figure class="highlight js"><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">hexo clean #清理 </span><br><span class="line">hexo g -d #生成+部署</span><br><span class="line"></span><br><span class="line">#在coding仓库上可看到文件则表示成功!!!!!!!</span><br></pre></td></tr></table></figure></li></ol><h3 id="安装主题"><a href="#安装主题" class="headerlink" title="安装主题"></a>安装主题</h3><blockquote><p>[!tip] Hexo-theme-async<br>仓库地址:<a href="https://github.com/MaLuns/hexo-theme-async.git">https://github.com/MaLuns/hexo-theme-async.git</a><br>浏览地址:<a href="https://www.imalun.com/">https://www.imalun.com/</a></p></blockquote><h5 id="八、下载主题"><a href="#八、下载主题" class="headerlink" title="八、下载主题"></a>八、下载主题</h5><ol><li>在博客文件夹下<figure class="highlight js"><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">cd tzsky <span class="comment">/*进入博客文件夹*/</span></span><br><span class="line"></span><br><span class="line">npm install --save hexo-renderer-less hexo-renderer-ejs hexo-wordcount</span><br></pre></td></tr></table></figure></li><li>进入博客的主题文件夹<code>themes</code><figure class="highlight js"><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">cd themes <span class="comment">//进入博客的主题文件夹</span></span><br><span class="line"></span><br><span class="line">git clone <span class="attr">https</span>:<span class="comment">//github.com/MaLuns/hexo-theme-async.git</span></span><br></pre></td></tr></table></figure></li><li>打开博客文件夹下的<code>_config.yml</code>文件,将<figure class="highlight js"><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></pre></td><td class="code"><pre><span class="line"><span class="attr">theme</span>: <span class="string">"默认"</span></span><br><span class="line"></span><br><span class="line">↓ 更改为</span><br><span class="line"></span><br><span class="line"><span class="attr">theme</span>: <span class="title class_">Hexo</span>-theme-<span class="keyword">async</span></span><br></pre></td></tr></table></figure></li></ol>]]></content>
<categories>
<category> 博客 </category>
<category> Hexo </category>
<category> 填坑 </category>
</categories>
<tags>
<tag> Hexo </tag>
</tags>
</entry>
<entry>
<title>文章模板</title>
<link href="/xiaoo.github.io/2022/07/25/hello-world/"/>
<url>/xiaoo.github.io/2022/07/25/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><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">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">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">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/one-command-deployment.html">Deployment</a></p><mark class="hl-label red">红色</mark> <mark class="hl-label green">绿色</mark> <mark class="hl-label orange">橙色</mark> <mark class="hl-label default">灰色</mark> <mark class="hl-label blue">蓝色</mark> <hr><div class="timeline red"><div class='timeline-item headline'><div class='timeline-item-title'><div class='item-circle'><p>2022</p></div></div></div><div class='timeline-item'><div class='timeline-item-title'><div class='item-circle'><p>01-02</p></div></div><div class='timeline-item-content'><p>这是测试页面</p></div></div><div class='timeline-item'><div class='timeline-item-title'><div class='item-circle'><p>01-02</p></div></div><div class='timeline-item-content'><p>这是测试页面</p></div></div></div><div class="timeline blue"><div class='timeline-item headline'><div class='timeline-item-title'><div class='item-circle'><p>2022</p></div></div></div><div class='timeline-item'><div class='timeline-item-title'><div class='item-circle'></div></div><div class='timeline-item-content'><p>这是测试页面</p></div></div></div>]]></content>
</entry>
</search>