<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Tranquility</title>
  
  <subtitle>宁静致远 · 主题演示站</subtitle>
  <link href="https://zycwer.github.io/hexo-theme-tranquility/atom.xml" rel="self"/>
  
  <link href="https://zycwer.github.io/hexo-theme-tranquility/"/>
  <updated>2026-09-25T09:57:21.738Z</updated>
  <id>https://zycwer.github.io/hexo-theme-tranquility/</id>
  
  <author>
    <name>zycwer</name>
    
  </author>
  
  <generator uri="https://hexo.io/">Hexo</generator>
  
  <entry>
    <title>演示站部署指南：每次提交自动更新</title>
    <link href="https://zycwer.github.io/hexo-theme-tranquility/posts/deploy-guide/"/>
    <id>https://zycwer.github.io/hexo-theme-tranquility/posts/deploy-guide/</id>
    <published>2026-08-19T03:30:00.000Z</published>
    <updated>2026-09-25T09:57:21.738Z</updated>
    
    <content type="html"><![CDATA[<p>本演示站本身就是主题的一个「活」的用例：每次向 <code>main</code> 分支提交代码，GitHub Actions 都会自动重新构建并发布演示站，主题的最新改动即时可见。</p><h2 id="工作原理"><a href="#工作原理" class="headerlink" title="工作原理"></a>工作原理</h2><pre class="mermaid">graph LR  A[push 到 main] --&gt; B[GitHub Actions 触发]  B --&gt; C[检出仓库]  C --&gt; D[复制主题到 demo/themes]  D --&gt; E[npm install + hexo generate]  E --&gt; F[deploy-pages 发布]  F --&gt; G[演示站更新]</pre><ol><li>仓库内 <code>demo/</code> 目录是完整的 Hexo 站点源文件（配置 + 文章）</li><li>workflow 把当前检出的主题代码复制进 <code>demo/themes/tranquility</code>，因此演示的永远是<strong>本次提交</strong>的主题版本</li><li><code>hexo generate</code> 构建后经 <code>actions/deploy-pages</code> 发布到 GitHub Pages</li></ol><h2 id="关键配置片段"><a href="#关键配置片段" class="headerlink" title="关键配置片段"></a>关键配置片段</h2><p>演示站启用了子路径部署（项目页），<code>_config.yml</code> 中：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">url:</span> <span class="string">https://zycwer.github.io/hexo-theme-tranquility</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/hexo-theme-tranquility/</span></span><br></pre></td></tr></table></figure><p>主题会基于 <code>root</code> 正确处理全部资源路径、<code>manifest.json</code> 与 Service Worker 作用域。</p><h2 id="本地复现"><a href="#本地复现" class="headerlink" title="本地复现"></a>本地复现</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> demo</span><br><span class="line">npm install</span><br><span class="line"><span class="built_in">cp</span> -r ../ demo/themes/tranquility   <span class="comment"># 以本地主题构建</span></span><br><span class="line">npx hexo server                     <span class="comment"># http://localhost:4000 预览</span></span><br></pre></td></tr></table></figure><p>完整的构建流水线见仓库 <a href="https://github.com/zycwer/hexo-theme-tranquility/blob/main/.github/workflows/deploy-demo.yml">.github&#x2F;workflows&#x2F;deploy-demo.yml</a>。</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;本演示站本身就是主题的一个「活」的用例：每次向 &lt;code&gt;main&lt;/code&gt; 分支提交代码，GitHub Actions 都会自动重新构建并发布演示站，主题的最新改动即时可见。&lt;/p&gt;
&lt;h2 id=&quot;工作原理&quot;&gt;&lt;a href=&quot;#工作原理&quot; class=&quot;head</summary>
      
    
    
    
    <category term="featTest" scheme="https://zycwer.github.io/hexo-theme-tranquility/categories/featTest/"/>
    
    
    <category term="GitHub Actions" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/GitHub-Actions/"/>
    
    <category term="CI/CD" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/CI-CD/"/>
    
    <category term="部署" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/%E9%83%A8%E7%BD%B2/"/>
    
  </entry>
  
  <entry>
    <title>你好，Tranquility</title>
    <link href="https://zycwer.github.io/hexo-theme-tranquility/posts/hello-tranquility/"/>
    <id>https://zycwer.github.io/hexo-theme-tranquility/posts/hello-tranquility/</id>
    <published>2026-08-19T02:00:00.000Z</published>
    <updated>2026-09-25T09:57:21.738Z</updated>
    
    <content type="html"><![CDATA[<p>欢迎来到 <strong>Tranquility（致远）</strong> 主题演示站。本站由 GitHub Actions 在每次提交后自动构建，展示了主题的绝大部分特性。</p><blockquote><p>宁静致远 —— 不追热点，不加繁饰，只把每一个特性做到恰到好处。</p></blockquote><h2 id="特性速览"><a href="#特性速览" class="headerlink" title="特性速览"></a>特性速览</h2><table><thead><tr><th>特性</th><th>状态</th><th>说明</th></tr></thead><tbody><tr><td>项目展示</td><td>已开启</td><td>首页「我的项目」卡片，见下方</td></tr><tr><td>技能展示</td><td>已开启</td><td>分组熟练度进度条 &#x2F; 标签</td></tr><tr><td>公告横幅</td><td>已开启</td><td>导航下方可关闭公告条，内容更新后自动重新展示</td></tr><tr><td>建站时长</td><td>已开启</td><td>页脚实时秒级跳动</td></tr><tr><td>深色模式</td><td>已开启</td><td>跟随系统，可手动切换</td></tr><tr><td>本地搜索</td><td>已开启</td><td>右上角放大镜，无需外部服务</td></tr><tr><td>PWA</td><td>已开启</td><td>可安装到主屏幕，离线可访问</td></tr><tr><td>CSP 安全策略</td><td>已开启</td><td>查看本页源码可见 meta CSP</td></tr><tr><td>资源指纹</td><td>已开启</td><td>所有静态资源带 <code>?v=</code> 内容哈希</td></tr><tr><td>Mermaid 图表</td><td>已开启</td><td>见<a href="/posts/mermaid-diagram/">图表演示</a>一文</td></tr><tr><td>MathJax 公式</td><td>已开启</td><td>见<a href="/posts/mathjax-formula/">公式演示</a>一文</td></tr><tr><td>相关文章</td><td>已开启</td><td>文末推荐</td></tr><tr><td>赞赏</td><td>已开启</td><td>文末「喜欢作者」</td></tr></tbody></table><h2 id="继续探索"><a href="#继续探索" class="headerlink" title="继续探索"></a>继续探索</h2><ul><li>首页向下滑动：项目、技能、时间线、最近更新等区块</li><li>点击右上角搜索图标体验本地搜索</li><li>切换深色模式，观察全站配色与一言、评论区联动</li><li>阅读 <a href="/posts/markdown-syntax/">Markdown 基础排版</a> 查看排版细节</li></ul><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-theme-tranquility</span><br></pre></td></tr></table></figure><p>一行命令，把这份宁静带回你的博客。</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;欢迎来到 &lt;strong&gt;Tranquility（致远）&lt;/strong&gt; 主题演示站。本站由 GitHub Actions 在每次提交后自动构建，展示了主题的绝大部分特性。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;宁静致远 —— 不追热点，不加繁饰，只把每一个特性做到恰到</summary>
      
    
    
    
    <category term="featTest" scheme="https://zycwer.github.io/hexo-theme-tranquility/categories/featTest/"/>
    
    
    <category term="主题介绍" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/%E4%B8%BB%E9%A2%98%E4%BB%8B%E7%BB%8D/"/>
    
    <category term="Hexo" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/Hexo/"/>
    
  </entry>
  
  <entry>
    <title>Mermaid 图表演示</title>
    <link href="https://zycwer.github.io/hexo-theme-tranquility/posts/mermaid-diagram/"/>
    <id>https://zycwer.github.io/hexo-theme-tranquility/posts/mermaid-diagram/</id>
    <published>2026-08-14T08:00:00.000Z</published>
    <updated>2026-09-25T09:57:21.738Z</updated>
    
    <content type="html"><![CDATA[<p>主题内置 Mermaid 支持，在代码块标记 <code>mermaid</code> 即可渲染图表。</p><h2 id="流程图"><a href="#流程图" class="headerlink" title="流程图"></a>流程图</h2><pre class="mermaid">graph LR  A[写作 Markdown] --&gt; B&#123;hexo generate&#125;  B --&gt;|渲染| C[静态 HTML]  B --&gt;|主题处理| D[字体子集]  B --&gt;|主题处理| E[资源指纹]  C --&gt; F[部署 GitHub Pages]  D --&gt; F  E --&gt; F  F --&gt; G[读者访问]</pre><h2 id="时序图"><a href="#时序图" class="headerlink" title="时序图"></a>时序图</h2><pre class="mermaid">sequenceDiagram  participant U as 读者  participant B as 浏览器  participant S as Service Worker  participant N as 网络  U-&gt;&gt;B: 首次访问  B-&gt;&gt;N: 请求页面  N--&gt;&gt;B: 返回 HTML/CSS/JS  B-&gt;&gt;S: 注册 SW 并预缓存  U-&gt;&gt;B: 再次访问（离线）  B-&gt;&gt;S: 请求页面  S--&gt;&gt;B: 缓存命中，秒开</pre><h2 id="饼图"><a href="#饼图" class="headerlink" title="饼图"></a>饼图</h2><pre class="mermaid">pie title 演示站文章分类占比  "特性演示" : 3  "基础排版" : 2  "可视化" : 1</pre><h2 id="甘特图"><a href="#甘特图" class="headerlink" title="甘特图"></a>甘特图</h2><pre class="mermaid">gantt  title 主题版本迭代  dateFormat YYYY-MM-DD  section 1.6.x  无障碍与性能 :done, t1, 2026-07-20, 10d  section 1.7.0  个人主页特性 :done, t2, 2026-08-15, 4d  演示站上线 :active, t3, 2026-08-19, 3d</pre><blockquote><p>Mermaid 版本在主题配置中固定（默认 10.9.3），避免上游 breaking change 导致图表失效。</p></blockquote>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;主题内置 Mermaid 支持，在代码块标记 &lt;code&gt;mermaid&lt;/code&gt; 即可渲染图表。&lt;/p&gt;
&lt;h2 id=&quot;流程图&quot;&gt;&lt;a href=&quot;#流程图&quot; class=&quot;headerlink&quot; title=&quot;流程图&quot;&gt;&lt;/a&gt;流程图&lt;/h2&gt;&lt;pre class</summary>
      
    
    
    
    <category term="featTest" scheme="https://zycwer.github.io/hexo-theme-tranquility/categories/featTest/"/>
    
    
    <category term="Mermaid" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/Mermaid/"/>
    
    <category term="可视化" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/%E5%8F%AF%E8%A7%86%E5%8C%96/"/>
    
  </entry>
  
  <entry>
    <title>MathJax 数学公式演示</title>
    <link href="https://zycwer.github.io/hexo-theme-tranquility/posts/mathjax-formula/"/>
    <id>https://zycwer.github.io/hexo-theme-tranquility/posts/mathjax-formula/</id>
    <published>2026-08-12T06:20:00.000Z</published>
    <updated>2026-09-25T09:57:21.738Z</updated>
    
    <content type="html"><![CDATA[<p>主题通过配置 <code>mathjax: true</code> 加载 MathJax，支持行内与块级公式。</p><h2 id="行内公式"><a href="#行内公式" class="headerlink" title="行内公式"></a>行内公式</h2><p>质能方程 $E = mc^2$ 是物理学中最著名的公式之一；黄金分割比 $\varphi = \dfrac{1+\sqrt{5}}{2} \approx 1.618$ 常见于设计之中。</p><h2 id="块级公式"><a href="#块级公式" class="headerlink" title="块级公式"></a>块级公式</h2><p>高斯积分：</p><p>$$\int_{-\infty}^{\infty} e^{-x^2} \, \mathrm{d}x = \sqrt{\pi}$$</p><p>欧拉恒等式：</p><p>$$e^{i\pi} + 1 = 0$$</p><h2 id="矩阵与方程组"><a href="#矩阵与方程组" class="headerlink" title="矩阵与方程组"></a>矩阵与方程组</h2><p>$$\begin{pmatrix}a &amp; b \\c &amp; d\end{pmatrix}\begin{pmatrix}x \\ y\end{pmatrix}=\begin{pmatrix}1 \\ 0\end{pmatrix}$$</p><p>$$\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$$</p><h2 id="多行推导"><a href="#多行推导" class="headerlink" title="多行推导"></a>多行推导</h2><p>$$\begin{aligned}(a+b)^2 &amp;= a^2 + 2ab + b^2 \\(a-b)^2 &amp;= a^2 - 2ab + b^2\end{aligned}$$</p><blockquote><p>提示：演示站的 MathJax 从 npmmirror（阿里国内镜像）加载，与主题默认配置一致，国内网络直连稳定；主题默认启用 <code>$...$</code> 行内公式与 <code>$$...$$</code> 块级公式。</p></blockquote>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;主题通过配置 &lt;code&gt;mathjax: true&lt;/code&gt; 加载 MathJax，支持行内与块级公式。&lt;/p&gt;
&lt;h2 id=&quot;行内公式&quot;&gt;&lt;a href=&quot;#行内公式&quot; class=&quot;headerlink&quot; title=&quot;行内公式&quot;&gt;&lt;/a&gt;行内公式&lt;/h2&gt;&lt;p</summary>
      
    
    
    
    <category term="featTest" scheme="https://zycwer.github.io/hexo-theme-tranquility/categories/featTest/"/>
    
    
    <category term="MathJax" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/MathJax/"/>
    
    <category term="数学" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/%E6%95%B0%E5%AD%A6/"/>
    
  </entry>
  
  <entry>
    <title>Markdown 基础排版测试</title>
    <link href="https://zycwer.github.io/hexo-theme-tranquility/posts/markdown-syntax/"/>
    <id>https://zycwer.github.io/hexo-theme-tranquility/posts/markdown-syntax/</id>
    <published>2026-08-10T01:30:00.000Z</published>
    <updated>2026-09-25T09:57:21.738Z</updated>
    
    <content type="html"><![CDATA[<p>本文覆盖 Hexo + Tranquility 的基础排版：标题、列表、表格、引用、图片与代码高亮。</p><h2 id="文本样式"><a href="#文本样式" class="headerlink" title="文本样式"></a>文本样式</h2><p><strong>粗体</strong>、<em>斜体</em>、<del>删除线</del>、<code>行内代码</code>，以及<a href="/posts/hello-tranquility/">站内链接</a>与<a href="https://hexo.io/">外部链接</a>。</p><h2 id="引用"><a href="#引用" class="headerlink" title="引用"></a>引用</h2><blockquote><p>引用可以有多行：</p><p>第二行引用文字。</p><blockquote><p>嵌套引用。</p></blockquote></blockquote><h2 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h2><p>无序列表：</p><ul><li>特性一</li><li>特性二<ul><li>嵌套项</li></ul></li><li>特性三</li></ul><p>有序列表：</p><ol><li>安装主题</li><li>修改配置</li><li>重新生成</li></ol><h2 id="表格"><a href="#表格" class="headerlink" title="表格"></a>表格</h2><table><thead><tr><th>对齐</th><th align="left">左</th><th align="center">中</th><th align="right">右</th></tr></thead><tbody><tr><td>示例</td><td align="left">a</td><td align="center">b</td><td align="right">c</td></tr><tr><td>示例</td><td align="left">1</td><td align="center">2</td><td align="right">3</td></tr></tbody></table><h2 id="图片"><a href="#图片" class="headerlink" title="图片"></a>图片</h2><p><img src="/hexo-theme-tranquility/images/logo.svg" alt="主题 Logo" loading="lazy" decoding="async"></p><h2 id="代码高亮"><a href="#代码高亮" class="headerlink" title="代码高亮"></a>代码高亮</h2><p>JavaScript：</p><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 代码块标题：防抖</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">debounce</span>(<span class="params">fn, wait = <span class="number">200</span></span>) &#123;</span><br><span class="line">  <span class="keyword">let</span> timer = <span class="literal">null</span>;</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">function</span> (<span class="params">...args</span>) &#123;</span><br><span class="line">    <span class="built_in">clearTimeout</span>(timer);</span><br><span class="line">    timer = <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> fn.<span class="title function_">apply</span>(<span class="variable language_">this</span>, args), wait);</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>Python：</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">def</span> <span class="title function_">fib</span>(<span class="params">n: <span class="built_in">int</span></span>):</span><br><span class="line">    a, b = <span class="number">0</span>, <span class="number">1</span></span><br><span class="line">    <span class="keyword">for</span> _ <span class="keyword">in</span> <span class="built_in">range</span>(n):</span><br><span class="line">        a, b = b, a + b</span><br><span class="line">    <span class="keyword">return</span> a</span><br></pre></td></tr></table></figure><p>Shell：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo clean &amp;&amp; hexo generate &amp;&amp; hexo server</span><br></pre></td></tr></table></figure><p>YAML：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">theme_config:</span></span><br><span class="line">  <span class="attr">announcement:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">content:</span> <span class="string">欢迎访问演示站</span></span><br></pre></td></tr></table></figure><h2 id="分割线"><a href="#分割线" class="headerlink" title="分割线"></a>分割线</h2><hr><p>以上就是全部基础排版元素。</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;本文覆盖 Hexo + Tranquility 的基础排版：标题、列表、表格、引用、图片与代码高亮。&lt;/p&gt;
&lt;h2 id=&quot;文本样式&quot;&gt;&lt;a href=&quot;#文本样式&quot; class=&quot;headerlink&quot; title=&quot;文本样式&quot;&gt;&lt;/a&gt;文本样式&lt;/h2&gt;&lt;p&gt;&lt;str</summary>
      
    
    
    
    <category term="baseTest" scheme="https://zycwer.github.io/hexo-theme-tranquility/categories/baseTest/"/>
    
    
    <category term="Markdown" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/Markdown/"/>
    
    <category term="排版" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/%E6%8E%92%E7%89%88/"/>
    
  </entry>
  
  <entry>
    <title>Hello World</title>
    <link href="https://zycwer.github.io/hexo-theme-tranquility/posts/hello-world/"/>
    <id>https://zycwer.github.io/hexo-theme-tranquility/posts/hello-world/</id>
    <published>2026-01-01T00:00:00.000Z</published>
    <updated>2026-09-25T09:57:21.738Z</updated>
    
    <content type="html"><![CDATA[<p>你好，世界。</p><p>这是演示站的第一篇文章，对应首页时间线的起点——主题 v1.6.x 系列发布之时。</p><blockquote><p>万事开头难，然后中间难，最后结尾难。</p></blockquote><p>欢迎按时间线筛选器按文章 &#x2F; 应用 &#x2F; 事件浏览首页时间线。</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;你好，世界。&lt;/p&gt;
&lt;p&gt;这是演示站的第一篇文章，对应首页时间线的起点——主题 v1.6.x 系列发布之时。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;万事开头难，然后中间难，最后结尾难。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;欢迎按时间线筛选器按文章 &amp;#x2F; 应</summary>
      
    
    
    
    <category term="baseTest" scheme="https://zycwer.github.io/hexo-theme-tranquility/categories/baseTest/"/>
    
    
    <category term="随笔" scheme="https://zycwer.github.io/hexo-theme-tranquility/tags/%E9%9A%8F%E7%AC%94/"/>
    
  </entry>
  
</feed>
