doc: update document
This commit is contained in:
parent
005eb35a40
commit
01c0169755
|
@ -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="http://www.this-anchor-link.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>
|
||||
<p>@pandao</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -383,6 +383,74 @@ hexo algolia<span aria-hidden="true" class="line-numbers-rows"><span></span><spa
|
|||
<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>其中 <code>cityCode</code> 可以在 <a target="_blank" rel="noopener" href="https://github.com/qwd/LocationList">官方的地区列表仓库</a> 中的 <code>China-City-List-latest.csv</code> 找到你所在城市的 <code>cityCode</code></p>
|
||||
<h1 id="前置元数据"><a href="#前置元数据" class="headerlink" title="前置元数据"></a>前置元数据</h1><p>在 Hexo 的 Markdown 文件中,一个典型的 YAML 格式的 <code>Front Matter</code> 可能会是这样的:</p>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> 我的文章标题
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">tags</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> 编程
|
||||
<span class="token punctuation">-</span> JavaScript</span>
|
||||
<span class="token punctuation">---</span></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></code></pre>
|
||||
|
||||
<h2 id="top"><a href="#top" class="headerlink" title="top"></a>top</h2><p>实现文章置顶的功能,给定一个数值,可以进行排序,设定了 <code>top</code> 元数据的文章,会在分类列表中,使用 📌 标记</p>
|
||||
<p>例如有三篇文章:</p>
|
||||
<ul>
|
||||
<li>文章1</li>
|
||||
</ul>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> 文章1
|
||||
<span class="token key atrule">top</span><span class="token punctuation">:</span> <span class="token number">0</span>
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">tags</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> 编程
|
||||
<span class="token punctuation">-</span> JavaScript</span>
|
||||
<span class="token punctuation">---</span></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></code></pre>
|
||||
|
||||
<ul>
|
||||
<li>文章2</li>
|
||||
</ul>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> 文章2
|
||||
<span class="token key atrule">top</span><span class="token punctuation">:</span> <span class="token number">1</span>
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">tags</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> 编程
|
||||
<span class="token punctuation">-</span> JavaScript</span>
|
||||
<span class="token punctuation">---</span></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></code></pre>
|
||||
|
||||
<ul>
|
||||
<li>文章3</li>
|
||||
</ul>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> 文章1
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">tags</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> 编程
|
||||
<span class="token punctuation">-</span> JavaScript</span>
|
||||
<span class="token punctuation">---</span></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></code></pre>
|
||||
|
||||
<p>那么在 <code>javascript</code> 分类下,排序的顺序依次为:<code>文章1 > 文章2 > 文章3</code></p>
|
||||
<h2 id="status"><a href="#status" class="headerlink" title="status"></a>status</h2><p>用于区分文章的状态,同时利用文章分类列表的<code>筛选</code>,进行快速筛选,Linear 主题内置了 4 种状态</p>
|
||||
<ul>
|
||||
<li>done:完成</li>
|
||||
<li>doing:进行中</li>
|
||||
<li>todo:待办</li>
|
||||
<li>other:废弃</li>
|
||||
</ul>
|
||||
<p>例如:</p>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> 文章1
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">status</span><span class="token punctuation">:</span> done</span>
|
||||
<span class="token punctuation">---</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
@ -432,7 +500,7 @@ hexo algolia<span aria-hidden="true" class="line-numbers-rows"><span></span><spa
|
|||
<span>Catalog</span>
|
||||
</p>
|
||||
<!-- 文章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="#%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>
|
||||
<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><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%89%8D%E7%BD%AE%E5%85%83%E6%95%B0%E6%8D%AE"><span class="toc-number">6.</span> <span class="toc-text">前置元数据</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#top"><span class="toc-number">6.1.</span> <span class="toc-text">top</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#status"><span class="toc-number">6.2.</span> <span class="toc-text">status</span></a></li></ol></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -384,6 +384,65 @@ hexo algolia<span aria-hidden="true" class="line-numbers-rows"><span></span><spa
|
|||
<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>
|
||||
<h1 id="Front-Matter"><a href="#Front-Matter" class="headerlink" title="Front Matter"></a>Front Matter</h1><p>In Hexo’s Markdown files, a typical YAML-formatted <code>Front Matter</code> might look like this:</p>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> My Article Title
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">tags</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> Programming
|
||||
<span class="token punctuation">-</span> JavaScript</span>
|
||||
<span class="token punctuation">---</span></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></code></pre>
|
||||
|
||||
<h2 id="top"><a href="#top" class="headerlink" title="top"></a>top</h2><p>To pin an article to the top, assign a numerical value to the <code>top</code> metadata. Articles with a specified <code>top</code> value will be marked with a 📌 icon in the category list.</p>
|
||||
<p>For example, if there are three articles:</p>
|
||||
<ul>
|
||||
<li>Article 1</li>
|
||||
</ul>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> Article 1
|
||||
<span class="token key atrule">top</span><span class="token punctuation">:</span> <span class="token number">0</span>
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript</span>
|
||||
<span class="token punctuation">---</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Article 2</li>
|
||||
</ul>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> Article 2
|
||||
<span class="token key atrule">top</span><span class="token punctuation">:</span> <span class="token number">1</span>
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript</span>
|
||||
<span class="token punctuation">---</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Article 3</li>
|
||||
</ul>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> Article 3
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript</span>
|
||||
<span class="token punctuation">---</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||
|
||||
<p>Then, under the <code>javascript</code> category, the sort order will be: <code>Article 1 > Article 2 > Article 3</code>.</p>
|
||||
<h2 id="status"><a href="#status" class="headerlink" title="status"></a>status</h2><p>This is used to differentiate the status of articles and can be quickly <code>filtered</code> using the category list. The Linear theme comes with 4 built-in statuses:</p>
|
||||
<ul>
|
||||
<li>done: Completed</li>
|
||||
<li>doing: In Progress</li>
|
||||
<li>todo: To Do</li>
|
||||
<li>other: Abandoned</li>
|
||||
</ul>
|
||||
<p>For example:</p>
|
||||
<pre class="line-numbers language-markdown" data-language="markdown"><code class="language-markdown"><span class="token front-matter-block"><span class="token punctuation">---</span>
|
||||
<span class="token front-matter yaml language-yaml"><span class="token key atrule">title</span><span class="token punctuation">:</span> Article 1
|
||||
<span class="token key atrule">categories</span><span class="token punctuation">:</span>
|
||||
<span class="token punctuation">-</span> javascript
|
||||
<span class="token key atrule">status</span><span class="token punctuation">:</span> done</span>
|
||||
<span class="token punctuation">---</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
@ -433,7 +492,7 @@ hexo algolia<span aria-hidden="true" class="line-numbers-rows"><span></span><spa
|
|||
<span>Catalog</span>
|
||||
</p>
|
||||
<!-- 文章toc -->
|
||||
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo-Installation"><span class="toc-number">1.</span> <span class="toc-text">Hexo Installation</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>
|
||||
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo-Installation"><span class="toc-number">1.</span> <span class="toc-text">Hexo Installation</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><li class="toc-item toc-level-1"><a class="toc-link" href="#Front-Matter"><span class="toc-number">6.</span> <span class="toc-text">Front Matter</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#top"><span class="toc-number">6.1.</span> <span class="toc-text">top</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#status"><span class="toc-number">6.2.</span> <span class="toc-text">status</span></a></li></ol></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -257,3 +257,90 @@ weather:
|
|||
```
|
||||
|
||||
其中 `cityCode` 可以在 [官方的地区列表仓库](https://github.com/qwd/LocationList) 中的 `China-City-List-latest.csv` 找到你所在城市的 `cityCode`
|
||||
|
||||
# 前置元数据
|
||||
|
||||
在 Hexo 的 Markdown 文件中,一个典型的 YAML 格式的 `Front Matter` 可能会是这样的:
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: 我的文章标题
|
||||
categories:
|
||||
- javascript
|
||||
tags:
|
||||
- 编程
|
||||
- JavaScript
|
||||
---
|
||||
```
|
||||
|
||||
## top
|
||||
|
||||
实现文章置顶的功能,给定一个数值,可以进行排序,设定了 `top` 元数据的文章,会在分类列表中,使用 📌 标记
|
||||
|
||||
例如有三篇文章:
|
||||
|
||||
- 文章1
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: 文章1
|
||||
top: 0
|
||||
categories:
|
||||
- javascript
|
||||
tags:
|
||||
- 编程
|
||||
- JavaScript
|
||||
---
|
||||
```
|
||||
|
||||
- 文章2
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: 文章2
|
||||
top: 1
|
||||
categories:
|
||||
- javascript
|
||||
tags:
|
||||
- 编程
|
||||
- JavaScript
|
||||
---
|
||||
```
|
||||
|
||||
- 文章3
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: 文章1
|
||||
categories:
|
||||
- javascript
|
||||
tags:
|
||||
- 编程
|
||||
- JavaScript
|
||||
---
|
||||
```
|
||||
|
||||
那么在 `javascript` 分类下,排序的顺序依次为:`文章1 > 文章2 > 文章3`
|
||||
|
||||
## status
|
||||
|
||||
用于区分文章的状态,同时利用文章分类列表的`筛选`,进行快速筛选,Linear 主题内置了 4 种状态
|
||||
|
||||
- done:完成
|
||||
- doing:进行中
|
||||
- todo:待办
|
||||
- other:废弃
|
||||
|
||||
例如:
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: 文章1
|
||||
categories:
|
||||
- javascript
|
||||
status: done
|
||||
---
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -261,3 +261,83 @@ weather:
|
|||
```
|
||||
|
||||
You can find your city's `cityCode` in the official region list repository's `China-City-List-latest.csv`.
|
||||
|
||||
|
||||
# Front Matter
|
||||
|
||||
In Hexo's Markdown files, a typical YAML-formatted `Front Matter` might look like this:
|
||||
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: My Article Title
|
||||
categories:
|
||||
- javascript
|
||||
tags:
|
||||
- Programming
|
||||
- JavaScript
|
||||
---
|
||||
```
|
||||
|
||||
## top
|
||||
|
||||
To pin an article to the top, assign a numerical value to the `top` metadata. Articles with a specified `top` value will be marked with a 📌 icon in the category list.
|
||||
|
||||
For example, if there are three articles:
|
||||
|
||||
- Article 1
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: Article 1
|
||||
top: 0
|
||||
categories:
|
||||
- javascript
|
||||
---
|
||||
```
|
||||
|
||||
- Article 2
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: Article 2
|
||||
top: 1
|
||||
categories:
|
||||
- javascript
|
||||
---
|
||||
```
|
||||
|
||||
- Article 3
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: Article 3
|
||||
categories:
|
||||
- javascript
|
||||
---
|
||||
```
|
||||
|
||||
Then, under the `javascript` category, the sort order will be: `Article 1 > Article 2 > Article 3`.
|
||||
|
||||
## status
|
||||
|
||||
This is used to differentiate the status of articles and can be quickly `filtered` using the category list. The Linear theme comes with 4 built-in statuses:
|
||||
|
||||
- done: Completed
|
||||
- doing: In Progress
|
||||
- todo: To Do
|
||||
- other: Abandoned
|
||||
|
||||
For example:
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: Article 1
|
||||
categories:
|
||||
- javascript
|
||||
status: done
|
||||
---
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user