doc: document
This commit is contained in:
parent
d3dc123efe
commit
cae4b409dc
|
@ -257,7 +257,7 @@
|
||||||
<p><a target="_blank" rel="noopener" href="https://baidu.com/">https://baidu.com</a></p>
|
<p><a target="_blank" rel="noopener" href="https://baidu.com/">https://baidu.com</a></p>
|
||||||
<p><a target="_blank" rel="noopener" href="http://www.this-anchor-link.com/">锚点链接</a> </p>
|
<p><a target="_blank" rel="noopener" href="http://www.this-anchor-link.com/">锚点链接</a> </p>
|
||||||
<p><a href="mailto:test.test@gmail.com">mailto:test.test@gmail.com</a></p>
|
<p><a href="mailto:test.test@gmail.com">mailto:test.test@gmail.com</a></p>
|
||||||
<p>GFM a-tail link <a target="_blank" rel="noopener" href="https://my.oschina.net/u/3691274">@pandao</a> 邮箱地址自动链接 <a href="mailto:test.test@gmail.com">test.test@gmail.com</a> <a href="mailto:www@vip.qq.com">www@vip.qq.com</a></p>
|
<p>GFM a-tail link <a target="_blank" rel="noopener" href="https://my.oschina.net/u/3691274">@pandao</a> 邮箱地址自动链接 <a href="mailto:test.test@gmail.com">test.test@gmail.com</a> <a href="mailto:www@vip.qq.com">www@vip.qq.com</a></p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>@pandao</p>
|
<p>@pandao</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
|
@ -245,7 +245,8 @@
|
||||||
<span class="token comment"># 在此处设置您的网站url</span>
|
<span class="token comment"># 在此处设置您的网站url</span>
|
||||||
<span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//mozzie.cn<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
<span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//mozzie.cn<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
<h2 id="国际化切换"><a href="#国际化切换" class="headerlink" title="国际化切换"></a>国际化切换</h2><pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">language</span><span class="token punctuation">:</span> en<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
<h2 id="语言"><a href="#语言" class="headerlink" title="语言"></a>语言</h2><p>你可以在 <code>hexo-theme-linear/languages</code> 中找到不同的语言文件,如果想切换语言,在配置文件中,填入 <code>yml</code> 的文件名</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">language</span><span class="token punctuation">:</span> en<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
||||||
|
|
||||||
<h2 id="文章语法高亮"><a href="#文章语法高亮" class="headerlink" title="文章语法高亮"></a>文章语法高亮</h2><p>关闭hexo默认的highlight.js语法高亮</p>
|
<h2 id="文章语法高亮"><a href="#文章语法高亮" class="headerlink" title="文章语法高亮"></a>文章语法高亮</h2><p>关闭hexo默认的highlight.js语法高亮</p>
|
||||||
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">highlight</span><span class="token punctuation">:</span>
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">highlight</span><span class="token punctuation">:</span>
|
||||||
|
@ -431,7 +432,7 @@ hexo algolia<span aria-hidden="true" class="line-numbers-rows"><span></span><spa
|
||||||
<span>Catalog</span>
|
<span>Catalog</span>
|
||||||
</p>
|
</p>
|
||||||
<!-- 文章toc -->
|
<!-- 文章toc -->
|
||||||
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo-%E5%AE%89%E8%A3%85%E4%B8%BB%E9%A2%98"><span class="toc-number">1.</span> <span class="toc-text">Hexo 安装主题</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%8E%B7%E5%8F%96-Linear"><span class="toc-number">1.1.</span> <span class="toc-text">获取 Linear</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#hexo%E9%85%8D%E7%BD%AE"><span class="toc-number">2.</span> <span class="toc-text">hexo配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE"><span class="toc-number">2.1.</span> <span class="toc-text">基础配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9B%BD%E9%99%85%E5%8C%96%E5%88%87%E6%8D%A2"><span class="toc-number">2.2.</span> <span class="toc-text">国际化切换</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E8%AF%AD%E6%B3%95%E9%AB%98%E4%BA%AE"><span class="toc-number">2.3.</span> <span class="toc-text">文章语法高亮</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Linear%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE"><span class="toc-number">3.</span> <span class="toc-text">Linear主题配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB%E5%9B%BE%E6%A0%87"><span class="toc-number">3.1.</span> <span class="toc-text">文章分类图标</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%AB%99%E5%9B%BE%E6%A0%87-favicon"><span class="toc-number">3.2.</span> <span class="toc-text">网站图标 favicon</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#ICP%E5%A4%87%E6%A1%88%E5%8F%B7"><span class="toc-number">3.3.</span> <span class="toc-text">ICP备案号</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A6%96%E9%A1%B5%E5%BA%95%E9%83%A8%E6%96%87%E5%AD%97"><span class="toc-number">3.4.</span> <span class="toc-text">首页底部文字</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E7%89%88%E6%9D%83%E7%94%B3%E6%98%8E"><span class="toc-number">3.5.</span> <span class="toc-text">文章版权申明</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#katex-%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F"><span class="toc-number">3.6.</span> <span class="toc-text">katex 数学公式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#mermaid-%E6%B5%81%E7%A8%8B%E5%9B%BE"><span class="toc-number">3.7.</span> <span class="toc-text">mermaid 流程图</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#valine-%E6%96%87%E7%AB%A0%E8%AF%84%E8%AE%BA"><span class="toc-number">3.8.</span> <span class="toc-text">valine 文章评论</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#algolia%E6%90%9C%E7%B4%A2"><span class="toc-number">4.</span> <span class="toc-text">algolia搜索</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E5%86%8C-amp-%E8%8E%B7%E5%8F%96-Key"><span class="toc-number">4.1.</span> <span class="toc-text">注册 & 获取 Key</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85-hexo-algoliasearch"><span class="toc-number">4.2.</span> <span class="toc-text">安装 hexo-algoliasearch</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8-algolia"><span class="toc-number">4.3.</span> <span class="toc-text">使用 algolia</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%F0%9F%87%A8%F0%9F%87%B3-%E5%92%8C%E9%A3%8E%E5%A4%A9%E6%B0%94-Widget"><span class="toc-number">5.</span> <span class="toc-text">🇨🇳 和风天气 Widget</span></a></li></ol>
|
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo-%E5%AE%89%E8%A3%85%E4%B8%BB%E9%A2%98"><span class="toc-number">1.</span> <span class="toc-text">Hexo 安装主题</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%8E%B7%E5%8F%96-Linear"><span class="toc-number">1.1.</span> <span class="toc-text">获取 Linear</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#hexo%E9%85%8D%E7%BD%AE"><span class="toc-number">2.</span> <span class="toc-text">hexo配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE"><span class="toc-number">2.1.</span> <span class="toc-text">基础配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%AF%AD%E8%A8%80"><span class="toc-number">2.2.</span> <span class="toc-text">语言</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E8%AF%AD%E6%B3%95%E9%AB%98%E4%BA%AE"><span class="toc-number">2.3.</span> <span class="toc-text">文章语法高亮</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Linear%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE"><span class="toc-number">3.</span> <span class="toc-text">Linear主题配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB%E5%9B%BE%E6%A0%87"><span class="toc-number">3.1.</span> <span class="toc-text">文章分类图标</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%AB%99%E5%9B%BE%E6%A0%87-favicon"><span class="toc-number">3.2.</span> <span class="toc-text">网站图标 favicon</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#ICP%E5%A4%87%E6%A1%88%E5%8F%B7"><span class="toc-number">3.3.</span> <span class="toc-text">ICP备案号</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A6%96%E9%A1%B5%E5%BA%95%E9%83%A8%E6%96%87%E5%AD%97"><span class="toc-number">3.4.</span> <span class="toc-text">首页底部文字</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E7%89%88%E6%9D%83%E7%94%B3%E6%98%8E"><span class="toc-number">3.5.</span> <span class="toc-text">文章版权申明</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#katex-%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F"><span class="toc-number">3.6.</span> <span class="toc-text">katex 数学公式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#mermaid-%E6%B5%81%E7%A8%8B%E5%9B%BE"><span class="toc-number">3.7.</span> <span class="toc-text">mermaid 流程图</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#valine-%E6%96%87%E7%AB%A0%E8%AF%84%E8%AE%BA"><span class="toc-number">3.8.</span> <span class="toc-text">valine 文章评论</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#algolia%E6%90%9C%E7%B4%A2"><span class="toc-number">4.</span> <span class="toc-text">algolia搜索</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E5%86%8C-amp-%E8%8E%B7%E5%8F%96-Key"><span class="toc-number">4.1.</span> <span class="toc-text">注册 & 获取 Key</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85-hexo-algoliasearch"><span class="toc-number">4.2.</span> <span class="toc-text">安装 hexo-algoliasearch</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8-algolia"><span class="toc-number">4.3.</span> <span class="toc-text">使用 algolia</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%F0%9F%87%A8%F0%9F%87%B3-%E5%92%8C%E9%A3%8E%E5%A4%A9%E6%B0%94-Widget"><span class="toc-number">5.</span> <span class="toc-text">🇨🇳 和风天气 Widget</span></a></li></ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -221,7 +221,169 @@
|
||||||
|
|
||||||
<!-- 渲染文章内容 -->
|
<!-- 渲染文章内容 -->
|
||||||
<article><p><a href="https://mozzie.cn/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">🇨🇳 中文文档</a></p>
|
<article><p><a href="https://mozzie.cn/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">🇨🇳 中文文档</a></p>
|
||||||
<h1 id="Configuration"><a href="#Configuration" class="headerlink" title="Configuration"></a>Configuration</h1><p>continued…😁</p>
|
<h1 id="Hexo-安装主题"><a href="#Hexo-安装主题" class="headerlink" title="Hexo 安装主题"></a>Hexo 安装主题</h1><p>Installing a <code>Hexo</code> theme is straightforward. Simply copy the <code>Hexo-theme-linear</code> directory to the <code>themes</code> directory, and then modify the theme configuration in <code>Hexo</code>‘s <code>_config.yml</code>.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token comment"># Locate the theme setting</span>
|
||||||
|
<span class="token key atrule">theme</span><span class="token punctuation">:</span> hexo<span class="token punctuation">-</span>theme<span class="token punctuation">-</span>linear<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Acquiring-Linear"><a href="#Acquiring-Linear" class="headerlink" title="Acquiring Linear"></a>Acquiring Linear</h2><ul>
|
||||||
|
<li>Visit <a target="_blank" rel="noopener" href="https://github.com/17px/hexo-theme-linear/tree/main">Linear’s code repository</a> to stay updated on the latest theme developments.</li>
|
||||||
|
<li>Download <code>hexo-theme-linear.zip</code> from the <a target="_blank" rel="noopener" href="https://github.com/17px/hexo-theme-linear/releases">releases page</a>.</li>
|
||||||
|
<li>Extract it into your site’s <code>themes</code> directory.</li>
|
||||||
|
<li>Enable it in Hexo’s <code>_config.yml</code>.</li>
|
||||||
|
</ul>
|
||||||
|
<h1 id="Hexo-Configuration"><a href="#Hexo-Configuration" class="headerlink" title="Hexo Configuration"></a>Hexo Configuration</h1><p>Adjust settings in <code>Hexo</code>‘s <code>_config.yml</code>.</p>
|
||||||
|
<h2 id="Basic-Configuration"><a href="#Basic-Configuration" class="headerlink" title="Basic Configuration"></a>Basic Configuration</h2><pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token comment"># Website title</span>
|
||||||
|
<span class="token key atrule">title</span><span class="token punctuation">:</span> 17px blog
|
||||||
|
<span class="token comment"># Sidebar header</span>
|
||||||
|
<span class="token key atrule">subtitle</span><span class="token punctuation">:</span> <span class="token string">"Mozzie"</span>
|
||||||
|
<span class="token comment"># HTML meta description for SEO</span>
|
||||||
|
<span class="token key atrule">description</span><span class="token punctuation">:</span> <span class="token string">""</span>
|
||||||
|
<span class="token comment"># HTML meta keywords for SEO</span>
|
||||||
|
<span class="token key atrule">keywords</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token comment"># Copyright text displaying author's name</span>
|
||||||
|
<span class="token key atrule">author</span><span class="token punctuation">:</span> Mozzie
|
||||||
|
|
||||||
|
<span class="token comment"># Set your website URL here</span>
|
||||||
|
<span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//mozzie.cn<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Language-Switch"><a href="#Language-Switch" class="headerlink" title="Language Switch"></a>Language Switch</h2><p>You can find different language files in <code>hex theme liner/languages</code>. If you want to switch languages, fill in the file name of <code>yml</code> in the <code>_config.yml</code> file</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">language</span><span class="token punctuation">:</span> en<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Code-Highlighting"><a href="#Code-Highlighting" class="headerlink" title="Code Highlighting"></a>Code Highlighting</h2><p>Disable Hexo’s default highlight.js syntax highlighting.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">highlight</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>
|
||||||
|
<span class="token key atrule">line_number</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">auto_detect</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>
|
||||||
|
<span class="token key atrule">tab_replace</span><span class="token punctuation">:</span> <span class="token string">""</span>
|
||||||
|
<span class="token key atrule">wrap</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">hljs</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>
|
||||||
|
|
||||||
|
<span class="token key atrule">prismjs</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">preprocess</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">line_number</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">line_threshold</span><span class="token punctuation">:</span> <span class="token number">0</span>
|
||||||
|
<span class="token key atrule">tab_replace</span><span class="token punctuation">:</span> <span class="token string">""</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h1 id="Linear-Theme-Configuration"><a href="#Linear-Theme-Configuration" class="headerlink" title="Linear Theme Configuration"></a>Linear Theme Configuration</h1><p>💡 The following settings are based on the <code>_config.yml</code> under <code>hexo-theme-linear</code>.</p>
|
||||||
|
<h2 id="Post-Category-Icons"><a href="#Post-Category-Icons" class="headerlink" title="Post Category Icons"></a>Post Category Icons</h2><p>In sequence, set the <code>svg</code> icons. You can get a wide variety of icons at <a target="_blank" rel="noopener" href="https://www.xicons.org/">xicon</a>.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">postCategoryIcons</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token punctuation">-</span> <svg<span class="token punctuation">></span><span class="token punctuation">...</span></svg<span class="token punctuation">></span>
|
||||||
|
<span class="token punctuation">-</span> <svg<span class="token punctuation">></span><span class="token punctuation">...</span></svg<span class="token punctuation">></span>
|
||||||
|
<span class="token punctuation">-</span> <svg<span class="token punctuation">></span><span class="token punctuation">...</span></svg<span class="token punctuation">></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Website-Favicon"><a href="#Website-Favicon" class="headerlink" title="Website Favicon"></a>Website Favicon</h2><ul>
|
||||||
|
<li>Supports <code>svg</code></li>
|
||||||
|
<li>Supports <code>image URL</code>, e.g., <code>/img/favicon.png</code></li>
|
||||||
|
</ul>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">favicon</span><span class="token punctuation">:</span> <span class="token string">''</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="ICP-Number-🇨🇳"><a href="#ICP-Number-🇨🇳" class="headerlink" title="ICP Number 🇨🇳"></a>ICP Number 🇨🇳</h2><p>😁 If not required, can be directly deleted.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">icp</span><span class="token punctuation">:</span> 苏ICP备xxxxxxx号<span class="token punctuation">-</span>x<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Footer-Text-on-Homepage-🇨🇳"><a href="#Footer-Text-on-Homepage-🇨🇳" class="headerlink" title="Footer Text on Homepage 🇨🇳"></a>Footer Text on Homepage 🇨🇳</h2><p>😁 If not required, can be directly deleted or set to <code>false</code>.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">motto</span><span class="token punctuation">:</span> <span class="token boolean important">false</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Post-Copyright-Statement"><a href="#Post-Copyright-Statement" class="headerlink" title="Post Copyright Statement"></a>Post Copyright Statement</h2><p>Enabled by default. When <code>enable: false</code>, it is disabled by default.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">postCopyright</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">license</span><span class="token punctuation">:</span> CC BY<span class="token punctuation">-</span>NC<span class="token punctuation">-</span>SA 4.0
|
||||||
|
<span class="token key atrule">license_url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//creativecommons.org/licenses/by<span class="token punctuation">-</span>nc<span class="token punctuation">-</span>sa/4.0/<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Katex-Mathematical-Formulas"><a href="#Katex-Mathematical-Formulas" class="headerlink" title="Katex Mathematical Formulas"></a>Katex Mathematical Formulas</h2><p>You can configure the CDN yourself.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">katex</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">jsCdn</span><span class="token punctuation">:</span> //cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.js
|
||||||
|
<span class="token key atrule">cssCdn</span><span class="token punctuation">:</span> //cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Mermaid-Flowcharts"><a href="#Mermaid-Flowcharts" class="headerlink" title="Mermaid Flowcharts"></a>Mermaid Flowcharts</h2><p>To draft flowchart syntax, use <code>{% mermaid %}` and `{% endmermaid %}</code> as wrappers.</p>
|
||||||
|
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown">{% mermaid %}
|
||||||
|
graph TD;
|
||||||
|
A --> B;
|
||||||
|
A --> C;
|
||||||
|
B --> D;
|
||||||
|
C --> D;
|
||||||
|
{% endmermaid %}<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<p>Corresponding configurations are as follows:</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">mermaid</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token key atrule">cdn</span><span class="token punctuation">:</span> //cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Valine-Comments"><a href="#Valine-Comments" class="headerlink" title="Valine Comments"></a>Valine Comments</h2><p>First, register as a <code>LeanCloud</code> international user and create a database.</p>
|
||||||
|
<p>Please proceed in accordance with relevant regional regulations.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">valine</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token comment"># 替换</span>
|
||||||
|
<span class="token key atrule">appId</span><span class="token punctuation">:</span> appId
|
||||||
|
<span class="token comment"># 替换</span>
|
||||||
|
<span class="token key atrule">appKey</span><span class="token punctuation">:</span> appKey
|
||||||
|
<span class="token key atrule">avatar</span><span class="token punctuation">:</span> monsterid
|
||||||
|
<span class="token key atrule">cdn</span><span class="token punctuation">:</span> //unpkg.com/valine@latest/dist/Valine.min.js
|
||||||
|
<span class="token comment"># 替换</span>
|
||||||
|
<span class="token key atrule">serverURLs</span><span class="token punctuation">:</span> //xxxxxxxx.api.lncldglobal.com<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h1 id="Algolia-Search"><a href="#Algolia-Search" class="headerlink" title="Algolia Search"></a>Algolia Search</h1><p>The blog comes with built-in local search, based on frontend development, which may have some issues. It’s recommended to switch to <code>Algolia</code>. The free account has a total of 10,000 records and 100,000 operations per month.</p>
|
||||||
|
<h2 id="Register-amp-Acquire-Key"><a href="#Register-amp-Acquire-Key" class="headerlink" title="Register & Acquire Key"></a>Register & Acquire Key</h2><ol>
|
||||||
|
<li><p>Create a new <code>Index</code>, for example, <code>hex-blog</code></p>
|
||||||
|
</li>
|
||||||
|
<li><p>Copy and save:</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<ul>
|
||||||
|
<li>Application ID</li>
|
||||||
|
<li>Search-Only API Key</li>
|
||||||
|
<li>Admin API Key</li>
|
||||||
|
<li>Usage API Key</li>
|
||||||
|
</ul>
|
||||||
|
<p><a href="/img/algolia-api-keys.png">API Keys</a></p>
|
||||||
|
<ol start="3">
|
||||||
|
<li>Replace configurations</li>
|
||||||
|
</ol>
|
||||||
|
<p>Add the following to Hexo’s <code>_config.yml</code></p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">algolia</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token comment"># Replace</span>
|
||||||
|
<span class="token key atrule">appId</span><span class="token punctuation">:</span> Application ID
|
||||||
|
<span class="token comment"># Replace</span>
|
||||||
|
<span class="token key atrule">apiKey</span><span class="token punctuation">:</span> Usage API Key
|
||||||
|
<span class="token comment"># Do not disclose, used for reporting, replace</span>
|
||||||
|
<span class="token key atrule">adminApiKey</span><span class="token punctuation">:</span> Admin API Key
|
||||||
|
<span class="token comment"># Replace</span>
|
||||||
|
<span class="token key atrule">SearchOnlyAPIKey</span><span class="token punctuation">:</span> Search<span class="token punctuation">-</span>Only API Key
|
||||||
|
<span class="token key atrule">chunkSize</span><span class="token punctuation">:</span> <span class="token number">5000</span>
|
||||||
|
<span class="token comment"># Replace</span>
|
||||||
|
<span class="token key atrule">indexName</span><span class="token punctuation">:</span> hex<span class="token punctuation">-</span>blog
|
||||||
|
<span class="token key atrule">fields</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token punctuation">-</span> content<span class="token punctuation">:</span>strip
|
||||||
|
<span class="token punctuation">-</span> categories
|
||||||
|
<span class="token punctuation">-</span> date
|
||||||
|
<span class="token punctuation">-</span> permalink
|
||||||
|
<span class="token punctuation">-</span> slug
|
||||||
|
<span class="token punctuation">-</span> tags
|
||||||
|
<span class="token punctuation">-</span> title<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Install-hexo-algoliasearch"><a href="#Install-hexo-algoliasearch" class="headerlink" title="Install hexo-algoliasearch"></a>Install hexo-algoliasearch</h2><p>This is a Hexo blog post index plugin that automates the submission of indexes to Algolia.</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>If you encounter any problems, you can read the <a target="_blank" rel="noopener" href="https://www.npmjs.com/package/hexo-algoliasearch">hexo-algoliasearch repository</a> for the latest instructions.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>Installation command:</p>
|
||||||
|
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> hexo-algoliasearch <span class="token parameter variable">--save</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<h2 id="Using-Algolia"><a href="#Using-Algolia" class="headerlink" title="Using Algolia"></a>Using Algolia</h2><p>Before publishing each blog post, carry out index uploading operations. The usual commands are as follows:</p>
|
||||||
|
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">hexo clean
|
||||||
|
hexo generate
|
||||||
|
hexo algolia<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="QWeather-Widget-🇨🇳"><a href="#QWeather-Widget-🇨🇳" class="headerlink" title="QWeather Widget 🇨🇳"></a>QWeather Widget 🇨🇳</h1><p>Linear mainly targets domestic users and integrates QWeather cards on the homepage. Register via <a target="_blank" rel="noopener" href="https://dev.qweather.com/docs/start/">QWeather Developer Service</a>.</p>
|
||||||
|
<p>After registering, fill in your <code>appKey</code> and <code>cityCode</code> in the configuration.</p>
|
||||||
|
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">weather</span><span class="token punctuation">:</span>
|
||||||
|
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
|
||||||
|
<span class="token comment"># Replace</span>
|
||||||
|
<span class="token key atrule">cityCode</span><span class="token punctuation">:</span> cityCode
|
||||||
|
<span class="token key atrule">appKey</span><span class="token punctuation">:</span> appKey<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||||
|
|
||||||
|
<p>You can find your city’s <code>cityCode</code> in the official region list repository’s <code>China-City-List-latest.csv</code>.</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
||||||
|
@ -271,7 +433,7 @@
|
||||||
<span>Catalog</span>
|
<span>Catalog</span>
|
||||||
</p>
|
</p>
|
||||||
<!-- 文章toc -->
|
<!-- 文章toc -->
|
||||||
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Configuration"><span class="toc-number">1.</span> <span class="toc-text">Configuration</span></a></li></ol>
|
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo-%E5%AE%89%E8%A3%85%E4%B8%BB%E9%A2%98"><span class="toc-number">1.</span> <span class="toc-text">Hexo 安装主题</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Acquiring-Linear"><span class="toc-number">1.1.</span> <span class="toc-text">Acquiring Linear</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo-Configuration"><span class="toc-number">2.</span> <span class="toc-text">Hexo Configuration</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Basic-Configuration"><span class="toc-number">2.1.</span> <span class="toc-text">Basic Configuration</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Language-Switch"><span class="toc-number">2.2.</span> <span class="toc-text">Language Switch</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Code-Highlighting"><span class="toc-number">2.3.</span> <span class="toc-text">Code Highlighting</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Linear-Theme-Configuration"><span class="toc-number">3.</span> <span class="toc-text">Linear Theme Configuration</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Post-Category-Icons"><span class="toc-number">3.1.</span> <span class="toc-text">Post Category Icons</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Website-Favicon"><span class="toc-number">3.2.</span> <span class="toc-text">Website Favicon</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#ICP-Number-%F0%9F%87%A8%F0%9F%87%B3"><span class="toc-number">3.3.</span> <span class="toc-text">ICP Number 🇨🇳</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Footer-Text-on-Homepage-%F0%9F%87%A8%F0%9F%87%B3"><span class="toc-number">3.4.</span> <span class="toc-text">Footer Text on Homepage 🇨🇳</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Post-Copyright-Statement"><span class="toc-number">3.5.</span> <span class="toc-text">Post Copyright Statement</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Katex-Mathematical-Formulas"><span class="toc-number">3.6.</span> <span class="toc-text">Katex Mathematical Formulas</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Mermaid-Flowcharts"><span class="toc-number">3.7.</span> <span class="toc-text">Mermaid Flowcharts</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Valine-Comments"><span class="toc-number">3.8.</span> <span class="toc-text">Valine Comments</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Algolia-Search"><span class="toc-number">4.</span> <span class="toc-text">Algolia Search</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Register-amp-Acquire-Key"><span class="toc-number">4.1.</span> <span class="toc-text">Register & Acquire Key</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Install-hexo-algoliasearch"><span class="toc-number">4.2.</span> <span class="toc-text">Install hexo-algoliasearch</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Using-Algolia"><span class="toc-number">4.3.</span> <span class="toc-text">Using Algolia</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#QWeather-Widget-%F0%9F%87%A8%F0%9F%87%B3"><span class="toc-number">5.</span> <span class="toc-text">QWeather Widget 🇨🇳</span></a></li></ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -244,7 +244,7 @@ Smart Test…
|
||||||
<li>
|
<li>
|
||||||
<a class="timeline-item" href="/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">
|
<a class="timeline-item" href="/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">
|
||||||
<div class="timeline-info">
|
<div class="timeline-info">
|
||||||
<span>10-20 09:08:12</span>
|
<span>10-20 13:54:35</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="timeline-marker"></div>
|
<div class="timeline-marker"></div>
|
||||||
<div class="timeline-content">
|
<div class="timeline-content">
|
||||||
|
@ -273,8 +273,7 @@ Smart Test…
|
||||||
<span>Linear-Starter-Guide</span>
|
<span>Linear-Starter-Guide</span>
|
||||||
</div>
|
</div>
|
||||||
<p>🇨🇳 中文文档
|
<p>🇨🇳 中文文档
|
||||||
Configurationcontinued…😁
|
Hexo 安装主题Installing a Hexo theme is straightforward. Simply copy the Hexo-theme-linear dir...</p>
|
||||||
...</p>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -244,7 +244,7 @@ Smart Test…
|
||||||
<li>
|
<li>
|
||||||
<a class="timeline-item" href="/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">
|
<a class="timeline-item" href="/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">
|
||||||
<div class="timeline-info">
|
<div class="timeline-info">
|
||||||
<span>10-20 09:08:12</span>
|
<span>10-20 13:54:35</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="timeline-marker"></div>
|
<div class="timeline-marker"></div>
|
||||||
<div class="timeline-content">
|
<div class="timeline-content">
|
||||||
|
@ -273,8 +273,7 @@ Smart Test…
|
||||||
<span>Linear-Starter-Guide</span>
|
<span>Linear-Starter-Guide</span>
|
||||||
</div>
|
</div>
|
||||||
<p>🇨🇳 中文文档
|
<p>🇨🇳 中文文档
|
||||||
Configurationcontinued…😁
|
Hexo 安装主题Installing a Hexo theme is straightforward. Simply copy the Hexo-theme-linear dir...</p>
|
||||||
...</p>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -244,7 +244,7 @@ Smart Test…
|
||||||
<li>
|
<li>
|
||||||
<a class="timeline-item" href="/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">
|
<a class="timeline-item" href="/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/">
|
||||||
<div class="timeline-info">
|
<div class="timeline-info">
|
||||||
<span>10-20 09:08:12</span>
|
<span>10-20 13:54:35</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="timeline-marker"></div>
|
<div class="timeline-marker"></div>
|
||||||
<div class="timeline-content">
|
<div class="timeline-content">
|
||||||
|
@ -273,8 +273,7 @@ Smart Test…
|
||||||
<span>Linear-Starter-Guide</span>
|
<span>Linear-Starter-Guide</span>
|
||||||
</div>
|
</div>
|
||||||
<p>🇨🇳 中文文档
|
<p>🇨🇳 中文文档
|
||||||
Configurationcontinued…😁
|
Hexo 安装主题Installing a Hexo theme is straightforward. Simply copy the Hexo-theme-linear dir...</p>
|
||||||
...</p>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -44,7 +44,9 @@ author: Mozzie
|
||||||
url: https://mozzie.cn
|
url: https://mozzie.cn
|
||||||
```
|
```
|
||||||
|
|
||||||
## 国际化切换
|
## 语言
|
||||||
|
|
||||||
|
你可以在 `hexo-theme-linear/languages` 中找到不同的语言文件,如果想切换语言,在配置文件中,填入 `yml` 的文件名
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
language: en
|
language: en
|
||||||
|
|
|
@ -8,6 +8,256 @@ status: doing
|
||||||
|
|
||||||
[🇨🇳 中文文档](https://mozzie.cn/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/)
|
[🇨🇳 中文文档](https://mozzie.cn/2023/10/20/Linear%20%E5%85%A5%E9%97%A8/)
|
||||||
|
|
||||||
# Configuration
|
|
||||||
|
|
||||||
continued...😁
|
# Hexo 安装主题
|
||||||
|
|
||||||
|
Installing a `Hexo` theme is straightforward. Simply copy the `Hexo-theme-linear` directory to the `themes` directory, and then modify the theme configuration in `Hexo`'s `_config.yml`.
|
||||||
|
|
||||||
|
|
||||||
|
```yml
|
||||||
|
# Locate the theme setting
|
||||||
|
theme: hexo-theme-linear
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acquiring Linear
|
||||||
|
|
||||||
|
- Visit [Linear's code repository](https://github.com/17px/hexo-theme-linear/tree/main) to stay updated on the latest theme developments.
|
||||||
|
- Download `hexo-theme-linear.zip` from the [releases page](https://github.com/17px/hexo-theme-linear/releases).
|
||||||
|
- Extract it into your site's `themes` directory.
|
||||||
|
- Enable it in Hexo's `_config.yml`.
|
||||||
|
|
||||||
|
# Hexo Configuration
|
||||||
|
|
||||||
|
Adjust settings in `Hexo`'s `_config.yml`.
|
||||||
|
|
||||||
|
## Basic Configuration
|
||||||
|
|
||||||
|
```yml
|
||||||
|
# Website title
|
||||||
|
title: 17px blog
|
||||||
|
# Sidebar header
|
||||||
|
subtitle: "Mozzie"
|
||||||
|
# HTML meta description for SEO
|
||||||
|
description: ""
|
||||||
|
# HTML meta keywords for SEO
|
||||||
|
keywords:
|
||||||
|
# Copyright text displaying author's name
|
||||||
|
author: Mozzie
|
||||||
|
|
||||||
|
# Set your website URL here
|
||||||
|
url: https://mozzie.cn
|
||||||
|
```
|
||||||
|
|
||||||
|
## Language Switch
|
||||||
|
|
||||||
|
You can find different language files in `hex theme liner/languages`. If you want to switch languages, fill in the file name of `yml` in the `_config.yml` file
|
||||||
|
|
||||||
|
```yml
|
||||||
|
language: en
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Highlighting
|
||||||
|
|
||||||
|
Disable Hexo's default highlight.js syntax highlighting.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
highlight:
|
||||||
|
enable: false
|
||||||
|
line_number: true
|
||||||
|
auto_detect: false
|
||||||
|
tab_replace: ""
|
||||||
|
wrap: true
|
||||||
|
hljs: false
|
||||||
|
|
||||||
|
prismjs:
|
||||||
|
enable: true
|
||||||
|
preprocess: true
|
||||||
|
line_number: true
|
||||||
|
line_threshold: 0
|
||||||
|
tab_replace: ""
|
||||||
|
```
|
||||||
|
|
||||||
|
# Linear Theme Configuration
|
||||||
|
|
||||||
|
💡 The following settings are based on the `_config.yml` under `hexo-theme-linear`.
|
||||||
|
|
||||||
|
## Post Category Icons
|
||||||
|
|
||||||
|
In sequence, set the `svg` icons. You can get a wide variety of icons at [xicon](https://www.xicons.org/).
|
||||||
|
|
||||||
|
```yml
|
||||||
|
postCategoryIcons:
|
||||||
|
- <svg>...</svg>
|
||||||
|
- <svg>...</svg>
|
||||||
|
- <svg>...</svg>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Website Favicon
|
||||||
|
|
||||||
|
- Supports `svg`
|
||||||
|
- Supports `image URL`, e.g., `/img/favicon.png`
|
||||||
|
|
||||||
|
```yml
|
||||||
|
favicon: ''
|
||||||
|
```
|
||||||
|
|
||||||
|
## ICP Number 🇨🇳
|
||||||
|
|
||||||
|
😁 If not required, can be directly deleted.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
icp: 苏ICP备xxxxxxx号-x
|
||||||
|
```
|
||||||
|
|
||||||
|
## Footer Text on Homepage 🇨🇳
|
||||||
|
|
||||||
|
😁 If not required, can be directly deleted or set to `false`.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
motto: false
|
||||||
|
```
|
||||||
|
|
||||||
|
## Post Copyright Statement
|
||||||
|
|
||||||
|
Enabled by default. When `enable: false`, it is disabled by default.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
postCopyright:
|
||||||
|
enable: true
|
||||||
|
license: CC BY-NC-SA 4.0
|
||||||
|
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||||
|
```
|
||||||
|
|
||||||
|
## Katex Mathematical Formulas
|
||||||
|
|
||||||
|
You can configure the CDN yourself.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
katex:
|
||||||
|
enable: true
|
||||||
|
jsCdn: //cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.js
|
||||||
|
cssCdn: //cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css
|
||||||
|
```
|
||||||
|
|
||||||
|
## Mermaid Flowcharts
|
||||||
|
|
||||||
|
To draft flowchart syntax, use `{% mermaid %}` and `{% endmermaid %}` as wrappers.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{% mermaid %}
|
||||||
|
graph TD;
|
||||||
|
A --> B;
|
||||||
|
A --> C;
|
||||||
|
B --> D;
|
||||||
|
C --> D;
|
||||||
|
{% endmermaid %}
|
||||||
|
```
|
||||||
|
|
||||||
|
Corresponding configurations are as follows:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
mermaid:
|
||||||
|
enable: true
|
||||||
|
cdn: //cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js
|
||||||
|
```
|
||||||
|
|
||||||
|
## Valine Comments
|
||||||
|
|
||||||
|
First, register as a `LeanCloud` international user and create a database.
|
||||||
|
|
||||||
|
Please proceed in accordance with relevant regional regulations.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
valine:
|
||||||
|
enable: true
|
||||||
|
# 替换
|
||||||
|
appId: appId
|
||||||
|
# 替换
|
||||||
|
appKey: appKey
|
||||||
|
avatar: monsterid
|
||||||
|
cdn: //unpkg.com/valine@latest/dist/Valine.min.js
|
||||||
|
# 替换
|
||||||
|
serverURLs: //xxxxxxxx.api.lncldglobal.com
|
||||||
|
```
|
||||||
|
|
||||||
|
# Algolia Search
|
||||||
|
|
||||||
|
The blog comes with built-in local search, based on frontend development, which may have some issues. It's recommended to switch to `Algolia`. The free account has a total of 10,000 records and 100,000 operations per month.
|
||||||
|
|
||||||
|
## Register & Acquire Key
|
||||||
|
|
||||||
|
1. Create a new `Index`, for example, `hex-blog`
|
||||||
|
|
||||||
|
2. Copy and save:
|
||||||
|
- Application ID
|
||||||
|
- Search-Only API Key
|
||||||
|
- Admin API Key
|
||||||
|
- Usage API Key
|
||||||
|
|
||||||
|
[API Keys](/img/algolia-api-keys.png)
|
||||||
|
|
||||||
|
3. Replace configurations
|
||||||
|
|
||||||
|
Add the following to Hexo's `_config.yml`
|
||||||
|
|
||||||
|
```yml
|
||||||
|
algolia:
|
||||||
|
# Replace
|
||||||
|
appId: Application ID
|
||||||
|
# Replace
|
||||||
|
apiKey: Usage API Key
|
||||||
|
# Do not disclose, used for reporting, replace
|
||||||
|
adminApiKey: Admin API Key
|
||||||
|
# Replace
|
||||||
|
SearchOnlyAPIKey: Search-Only API Key
|
||||||
|
chunkSize: 5000
|
||||||
|
# Replace
|
||||||
|
indexName: hex-blog
|
||||||
|
fields:
|
||||||
|
- content:strip
|
||||||
|
- categories
|
||||||
|
- date
|
||||||
|
- permalink
|
||||||
|
- slug
|
||||||
|
- tags
|
||||||
|
- title
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install hexo-algoliasearch
|
||||||
|
|
||||||
|
This is a Hexo blog post index plugin that automates the submission of indexes to Algolia.
|
||||||
|
|
||||||
|
> If you encounter any problems, you can read the [hexo-algoliasearch repository](https://www.npmjs.com/package/hexo-algoliasearch) for the latest instructions.
|
||||||
|
|
||||||
|
Installation command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install hexo-algoliasearch --save
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using Algolia
|
||||||
|
|
||||||
|
Before publishing each blog post, carry out index uploading operations. The usual commands are as follows:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hexo clean
|
||||||
|
hexo generate
|
||||||
|
hexo algolia
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# QWeather Widget 🇨🇳
|
||||||
|
|
||||||
|
Linear mainly targets domestic users and integrates QWeather cards on the homepage. Register via [QWeather Developer Service](https://dev.qweather.com/docs/start/).
|
||||||
|
|
||||||
|
After registering, fill in your `appKey` and `cityCode` in the configuration.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
weather:
|
||||||
|
enable: true
|
||||||
|
# Replace
|
||||||
|
cityCode: cityCode
|
||||||
|
appKey: appKey
|
||||||
|
```
|
||||||
|
|
||||||
|
You can find your city's `cityCode` in the official region list repository's `China-City-List-latest.csv`.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user