Skip to content

Commit

Permalink
Site updated: 2024-07-25 11:28:26
Browse files Browse the repository at this point in the history
  • Loading branch information
seekstar committed Jul 25, 2024
1 parent 41185d5 commit 85c023e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
29 changes: 19 additions & 10 deletions 2021/02/28/hexo-tree主题-使用笔记/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8095,13 +8095,22 @@ <h2 id="开启评论统计访问量"><a href="#开启评论统计访问量">¶</
<span id="cb15-12"><a href="#cb15-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">avatar</span><span class="kw">:</span><span class="at"> retro</span></span></code></pre></div>
<p>然后预览一下,可以看到每篇文章下面多出了评论输入框,文章开头多了访问量</p>
<p>注意,评论和访问量都是以博客的url作为key的,所以如果博客的url变了(如重命名),那评论和访问量都会清空。要是可以在创建博文的时候生成一个类似uuid的东西,然后以uuid作为key就好了(我为什么这么菜)。</p>
<h2 id="邮件提醒"><a href="#邮件提醒"></a> 邮件提醒</h2>
<p>官方文档:<a target="_blank" rel="noopener" href="https://valine.js.org/notify.html" class="uri">https://valine.js.org/notify.html</a></p>
<p>但是官方文档里推荐的<a target="_blank" rel="noopener" href="https://github.com/zhaojun1998/Valine-Admin" class="uri">https://github.com/zhaojun1998/Valine-Admin</a>看起来已经无人维护了,部署会出错:</p>
<pre class="text"><code>build failed: npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net npm WARN deprecated formidable@1</code></pre>
<p>而且这个repo连issue都没有。</p>
<p>修复方法:<a target="_blank" rel="noopener" href="https://github.com/DesertsP/Valine-Admin/issues/151" class="uri">https://github.com/DesertsP/Valine-Admin/issues/151</a></p>
<p>也可以直接用这个:<a target="_blank" rel="noopener" href="https://github.com/Druadach/Valine-Admin" class="uri">https://github.com/Druadach/Valine-Admin</a></p>
<p>按照readme里的步骤部署即可。</p>
<p>环境变量里可以指定<code>TO_EMAIL</code>,提醒邮件就会发送给这个邮箱。如果不指定<code>TO_EMAIL</code>,提醒邮件是发送给<code>SMTP_USER</code></p>
<h2 id="修改底部版权开始年份"><a href="#修改底部版权开始年份"></a>
修改底部版权开始年份</h2>
<p><code>_config.tree.yml</code>里的<code>siteStartYear: 2019</code>修改成你想要的年份。结束年份会自己计算出来。</p>
<h2 id="更改网站图标"><a href="#更改网站图标"></a> 更改网站图标</h2>
<p>将自己的网站图标(文件名不要跟默认的<code>favicon.ico</code>相同)放进<code>source</code>文件夹里。假如文件名是<code>seekstar.ico</code>,那么就可以通过<code>https://博客网站/seekstar.ico</code>访问到这个图标。然后更改<code>_config.tree.yml</code></p>
<div class="sourceCode" id="cb16"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="co"># 改成自己的图标文件名,比如 /seekstar.ico</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="fu">favicon</span><span class="kw">:</span><span class="at"> /favicon.ico</span></span></code></pre></div>
<div class="sourceCode" id="cb17"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="co"># 改成自己的图标文件名,比如 /seekstar.ico</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="fu">favicon</span><span class="kw">:</span><span class="at"> /favicon.ico</span></span></code></pre></div>
<p>即可让网站使用新的网站图标。</p>
<h2 id="将渲染器更换为hexo-renderer-pandoc"><a href="#将渲染器更换为hexo-renderer-pandoc"></a> 将渲染器更换为<a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo-renderer-pandoc">hexo-renderer-pandoc</a></h2>
<p>默认的渲染器是<code>hexo-renderer-marked</code>,没有语法高亮,而且有BUG,行内代码有时候会被处理成行间代码,然后全乱了。所以需要更换渲染器。<a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo-renderer-markdown-it">hexo-renderer-markdown-it</a>比较流行,但是不支持Latex风格的数学公式。所以这里把渲染器换成<a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo-renderer-pandoc">hexo-renderer-pandoc</a></p>
Expand All @@ -8110,8 +8119,8 @@ <h2 id="将渲染器更换为hexo-renderer-pandoc"><a href="#将渲染器更换
npm uninstall hexo-renderer-marked
npm install hexo-renderer-pandoc --save</code></pre>
<p>更换渲染器之后要在<code>_config.yml</code>中把默认的highlight关掉,才能使用新的渲染器提供的highlight:</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode yml"><code class="sourceCode yaml"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="fu">highlight</span><span class="kw">:</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">enable</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span></code></pre></div>
<div class="sourceCode" id="cb19"><pre class="sourceCode yml"><code class="sourceCode yaml"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">highlight</span><span class="kw">:</span></span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">enable</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span></code></pre></div>
<p>注意这里要把之前的预览<code>ctrl+c</code>关掉,然后重新<code>hexo g &amp;&amp; hexo s</code>才能生效。</p>
<p>然后就可以开启对Latex风格的公式的支持了:<a href="/2021/11/16/hexo%E6%94%AF%E6%8C%81latex%E9%A3%8E%E6%A0%BC%E7%9A%84%E5%85%AC%E5%BC%8F%E7%BC%96%E8%BE%91/" title="Hexo支持Latex风格的公式编辑">Hexo支持Latex风格的公式编辑</a></p>
<h2 id="写博客"><a href="#写博客"></a> 写博客</h2>
Expand Down Expand Up @@ -8160,14 +8169,14 @@ <h3 id="折叠部分文字"><a href="#折叠部分文字">¶</a> 折叠部分文
<p><a target="_blank" rel="noopener" href="https://github.com/fletchto99/hexo-sliding-spoiler" class="uri">https://github.com/fletchto99/hexo-sliding-spoiler</a></p>
<h3 id="保留代码块中的tab"><a href="#保留代码块中的tab"></a>
保留代码块中的tab</h3>
<div class="sourceCode" id="cb26"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="fu">pandoc</span><span class="kw">:</span></span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">extra</span><span class="kw">:</span></span>
<span id="cb26-3"><a href="#cb26-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">preserve-tabs</span><span class="kw">:</span><span class="co"> # note this colon!!</span></span></code></pre></div>
<div class="sourceCode" id="cb27"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="fu">pandoc</span><span class="kw">:</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">extra</span><span class="kw">:</span></span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">preserve-tabs</span><span class="kw">:</span><span class="co"> # note this colon!!</span></span></code></pre></div>
<p>然后<code>hexo clean &amp;&amp; hexo g</code>使其生效。</p>
<p>默认tab宽度是8。可以在<code>themes/tree/source/css/main.css</code>里改成4:</p>
<div class="sourceCode" id="cb27"><pre class="sourceCode css"><code class="sourceCode css"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a>pre{</span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">tab-size</span>: <span class="dv">4</span><span class="op">;</span></span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<div class="sourceCode" id="cb28"><pre class="sourceCode css"><code class="sourceCode css"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a>pre{</span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">tab-size</span>: <span class="dv">4</span><span class="op">;</span></span>
<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>来源:<a target="_blank" rel="noopener" href="https://matrix4f.com/Web/FrontEnd/tabsize/" class="uri">https://matrix4f.com/Web/FrontEnd/tabsize/</a></p>
<p>如果发现即使清了cache
tab宽度仍然是4的话,检查<code>public/css/main.css</code>是不是新版本,如果不是的话把<code>public</code>文件夹删了重新生成:</p>
Expand Down
2 changes: 1 addition & 1 deletion sitemap.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://seekstar.github.io/2021/02/28/hexo-tree%E4%B8%BB%E9%A2%98-%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/
https://seekstar.github.io/2024/07/24/zed%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/
https://seekstar.github.io/2024/07/24/%E5%85%8D%E5%AF%86%E7%A0%81%E7%94%A8https%E5%8D%8F%E8%AE%AEclone-private-github-repo/
https://seekstar.github.io/2022/10/05/git%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/
Expand All @@ -8,7 +9,6 @@ https://seekstar.github.io/2022/10/08/%E5%85%8D%E5%90%AF%E5%8A%A8%E7%9B%98%E5%AE
https://seekstar.github.io/2023/11/17/%E9%85%8D%E8%89%B2/
https://seekstar.github.io/2020/03/22/python%E4%B8%AA%E4%BA%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/
https://seekstar.github.io/2020/03/12/latex%E4%B8%AA%E4%BA%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/
https://seekstar.github.io/2021/02/28/hexo-tree%E4%B8%BB%E9%A2%98-%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/
https://seekstar.github.io/tags/index.html
https://seekstar.github.io/2022/06/04/vscode%E7%BB%88%E7%AB%AF%E5%AD%97%E7%AC%A6%E9%97%B4%E8%B7%9D%E5%BE%88%E5%A4%A7/
https://seekstar.github.io/2020/04/11/vscode%E8%B0%83%E8%AF%95%E5%A4%9A%E8%BF%9B%E7%A8%8B%E5%BA%94%E7%94%A8/
Expand Down
26 changes: 13 additions & 13 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://seekstar.github.io/2021/02/28/hexo-tree%E4%B8%BB%E9%A2%98-%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/</loc>

<lastmod>2024-07-25</lastmod>

<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>

<url>
<loc>https://seekstar.github.io/2024/07/24/zed%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/</loc>

Expand Down Expand Up @@ -91,15 +100,6 @@
<priority>0.6</priority>
</url>

<url>
<loc>https://seekstar.github.io/2021/02/28/hexo-tree%E4%B8%BB%E9%A2%98-%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/</loc>

<lastmod>2024-07-15</lastmod>

<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>

<url>
<loc>https://seekstar.github.io/tags/index.html</loc>

Expand Down Expand Up @@ -5944,29 +5944,29 @@

<url>
<loc>https://seekstar.github.io/</loc>
<lastmod>2024-07-24</lastmod>
<lastmod>2024-07-25</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>


<url>
<loc>https://seekstar.github.io/tags/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</loc>
<lastmod>2024-07-24</lastmod>
<lastmod>2024-07-25</lastmod>
<changefreq>weekly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>https://seekstar.github.io/tags/%E8%BD%AC%E8%BD%BD/</loc>
<lastmod>2024-07-24</lastmod>
<lastmod>2024-07-25</lastmod>
<changefreq>weekly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>https://seekstar.github.io/tags/RocksDB/</loc>
<lastmod>2024-07-24</lastmod>
<lastmod>2024-07-25</lastmod>
<changefreq>weekly</changefreq>
<priority>0.2</priority>
</url>
Expand Down

0 comments on commit 85c023e

Please sign in to comment.