<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh_CN">
  <title>Fishing&apos;s Blog</title>
  <subtitle>Shirone</subtitle>
  <link href="https://fmz.us.ci/" rel="alternate" type="text/html"/>
  <link href="https://fmz.us.ci/atom.xml" rel="self" type="application/atom+xml"/>
  <id>https://fmz.us.ci/</id>
  <updated>2026-08-29T00:00:00.000Z</updated>
  <entry>
    <title>Shirone 创作与使用指南</title>
    <link href="https://fmz.us.ci/posts/guide/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/guide/</id>
    <published>2026-08-26T00:00:00.000Z</published>
    <updated>2026-08-26T00:00:00.000Z</updated>
    <summary>一份关于 Shirone 中文章创作、前置元数据规范、Markdown 扩展、加密和媒体的综合指南。</summary>
    <content type="html"><![CDATA[<p>欢迎使用 <strong>Shirone</strong>（白音）——一个富有表现力、受动漫启发的博客主题，围绕 <strong>Astro 7</strong>、<strong>Svelte 5</strong> 和 <strong>Material 3 Expressive (M3E)</strong> 设计系统打造。</p>
<p>本指南将带你了解文章创建、前置元数据规范、目录结构，以及全套内置 Markdown 和 MDX 扩展。</p>
<p>:::tip
Shirone 优先进行服务端渲染（SSR-first）。在站内导航时，Swup 会无缝替换主容器，同时保留外层应用外壳和连续的音乐播放。
:::</p>
<hr />
<h2>1. 创建新文章</h2>
<p>你可以使用内置 CLI 命令快速创建一个带标准前置元数据的新文章：</p>
<pre><code># 创建单文件文章
pnpm new-post my-first-post

# 或在子目录中创建文章
pnpm new-post guides/getting-started
</code></pre>
<p>新创建的文件将放置在 <code>src/content/posts/</code> 中。</p>
<hr />
<h2>2. 前置元数据规范</h2>
<p>每个 Markdown（<code>.md</code>）或 MDX（<code>.mdx</code>）文章都以 YAML 前置元数据块开头，用于定义其元数据。</p>
<h3>示例</h3>
<pre><code>---
title: "Exploring Material 3 Expressive Design"
published: 2026-08-26
updated: 2026-08-27
publishedAt: 2026-08-26T10:00:00+08:00
updatedAt: 2026-08-27T09:30:00+08:00
pinned: true
description: "A deep dive into dynamic HCT color science and fluid transitions in Shirone."
image: "./cover.webp"
tags: [M3E, Design, Frontend]
category: Guides
draft: false
comment: true
---
</code></pre>
<h3>支持的前置元数据字段</h3>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>是否必需</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>title</code></td>
<td><code>string</code></td>
<td><strong>是</strong></td>
<td>文章的主标题。</td>
</tr>
<tr>
<td><code>published</code></td>
<td><code>Date</code></td>
<td><strong>是</strong></td>
<td>发布日期，格式为 <code>YYYY-MM-DD</code>。</td>
</tr>
<tr>
<td><code>publishedAt</code></td>
<td><code>Date</code></td>
<td>否</td>
<td>精确的发布时刻，用于对同一天发布的文章排序。它必须落在配置站点时区中的 <code>published</code> 当天。</td>
</tr>
<tr>
<td><code>updated</code></td>
<td><code>Date</code></td>
<td>否</td>
<td>最后更新日期。提供后会显示更新通知徽章。</td>
</tr>
<tr>
<td><code>updatedAt</code></td>
<td><code>Date</code></td>
<td>否</td>
<td>精确的更新时刻，供 Feed 和机器可读元数据使用。必须与 <code>updated</code> 配对使用。</td>
</tr>
<tr>
<td><code>pinned</code></td>
<td><code>boolean</code></td>
<td>否</td>
<td>将文章固定到文章列表顶部（默认：<code>false</code>）。</td>
</tr>
<tr>
<td><code>description</code></td>
<td><code>string</code></td>
<td>否</td>
<td>显示在文章卡片、搜索结果和 OpenGraph 元数据中的文章摘要。</td>
</tr>
<tr>
<td><code>image</code></td>
<td><code>string</code></td>
<td>否</td>
<td>封面图片路径。支持相对路径（<code>./cover.webp</code>）、公共路径（<code>/images/cover.jpg</code>）或远程 URL。</td>
</tr>
<tr>
<td><code>tags</code></td>
<td><code>string[]</code></td>
<td>否</td>
<td>用于分类筛选和标签云的标签名称数组。</td>
</tr>
<tr>
<td><code>category</code></td>
<td><code>string</code></td>
<td>否</td>
<td>用于分类索引的主分类名称。</td>
</tr>
<tr>
<td><code>draft</code></td>
<td><code>boolean</code></td>
<td>否</td>
<td>标记为草稿。草稿文章在生产构建（<code>pnpm build</code>）期间会被隐藏。</td>
</tr>
<tr>
<td><code>comment</code></td>
<td><code>boolean</code></td>
<td>否</td>
<td>为此文章单独切换评论区（默认：<code>true</code>）。</td>
</tr>
<tr>
<td><code>lang</code></td>
<td><code>string</code></td>
<td>否</td>
<td>语言代码（例如 <code>en</code>、<code>zh_CN</code>、<code>ja</code>），当与站点默认语言不同时使用。</td>
</tr>
</tbody>
</table>
<hr />
<h2>3. 文章加密</h2>
<p>Shirone 提供客户端文章加密。这是一个静态密码门禁，而非服务端访问控制：加密载荷和资源 URL 仍然可以被公开下载，因此请勿将其用于真正机密的文件或受监管的敏感信息。对于私密日记或受限文章，请在前置元数据中指定密码：</p>
<pre><code>---
title: "Private Research Notes"
published: 2026-08-26
encrypted: true
password: "your-secret-passphrase"
passwordHint: "Favorite anime character"
hideHomeContent: true
---
</code></pre>
<ul>
<li><code>encrypted</code>：设置为 <code>true</code> 以启用加密；</li>
<li><code>password</code>：解锁文章所需的密码字符串或数字；</li>
<li><code>passwordHint</code>：可选的提示，显示在密码输入表单上方；</li>
<li><code>hideHomeContent</code>：在首页隐藏字数和内容预览，以防止数据泄露。</li>
</ul>
<hr />
<h2>4. 组织文章文件</h2>
<p>Shirone 同时支持基于文件夹的同址存放和单文件布局：</p>
<h3>文件夹结构（推荐用于本地资源）</h3>
<p>将文章与其媒体文件放在一起，可使资源管理更加简单直接：</p>
<pre><code>src/content/posts/
├── my-great-post/
│   ├── index.md           &lt;-- 文章内容
│   ├── cover.webp         &lt;-- 封面图片（image: "./cover.webp"）
│   └── diagram.png        &lt;-- Markdown 中引用的内嵌插图
</code></pre>
<h3>单文件结构（轻量散文）</h3>
<pre><code>src/content/posts/
├── hello-world.md
└── quick-thoughts.md
</code></pre>
<hr />
<h2>5. 丰富的 Markdown 与 MDX 扩展</h2>
<p>Shirone 开箱即包含现代 Markdown 扩展：</p>
<h3>5.1 提示块（Admonitions）</h3>
<p>使用容器指令表示笔记、提示、警告和警报：</p>
<pre><code>:::tip
使用提示块容器来突出关键要点或最佳实践。
:::

:::warning
使用警告容器来提示潜在陷阱或破坏性变更。
:::
</code></pre>
<h3>5.2 GitHub 仓库卡片</h3>
<p>使用指令语法嵌入实时、样式精美的 GitHub 仓库卡片：</p>
<pre><code>::github{repo="LyraVoid/Shirone"}
</code></pre>
<p>::github{repo="LyraVoid/Shirone"}</p>
<h3>5.3 富有表现力的代码块</h3>
<p>增强的代码块具有语法高亮、文件名徽章、行号以及选择性行高亮：</p>
<pre><code>// Dynamic HCT color token derivation
import { argbFromHex, themeFromSourceColor } from "@material/material-color-utilities";

const theme = themeFromSourceColor(argbFromHex("#f472b6"));
console.log("Primary color token:", theme.schemes.light.primary);
</code></pre>
<h3>5.4 数学排版（KaTeX）</h3>
<p>直接在 Markdown 中渲染优雅的 LaTeX 数学符号：</p>
<ul>
<li><strong>行内数学</strong>：$E = mc^2$ 或欧拉公式 $e^{i\pi} + 1 = 0$。</li>
<li><strong>块级数学</strong>：</li>
</ul>
<p>$$
\int_{-\infty}^{\infty} e^{-x^2} , dx = \sqrt{\pi}
$$</p>
<h3>5.5 Mermaid 图表</h3>
<p>使用纯文本创建流程图、时序图和架构图：</p>
<pre><code>sequenceDiagram
    autonumber
    actor Visitor as Visitor
    participant Page as Shirone Page
    participant Swup as Swup Container
    participant Audio as Persistent Shell

    Visitor-&gt;&gt;Page: Click Navigation Link
    Page-&gt;&gt;Swup: Trigger Seamless Transition
    Swup-&gt;&gt;Page: Replace #swup-container
    Note over Audio: Background music plays continuously
    Page--&gt;&gt;Visitor: New Page Rendered
</code></pre>
<h3>5.6 图片画廊与 Fancybox 灯箱</h3>
<p>图片自动集成 Fancybox，实现无损缩放、平移手势和全屏预览：</p>
<pre><code>![Cover preview](./cover.jpeg)
</code></pre>
<hr />
<h2>6. 后续步骤与自定义</h2>
<ul>
<li><strong>站点配置</strong>：在 <code>src/config/siteConfig.ts</code> 和 <a href="https://github.com/LyraVoid/Shirone/blob/main/src/config/README.md"><code>src/config/README.md</code></a> 中了解全局设置。</li>
<li><strong>设计令牌</strong>：在 <code>DESIGN.md</code> 和 <code>docs/m3e-standard.md</code> 中探索令牌和调色板。</li>
<li><strong>反馈与社区</strong>：在 <a href="https://github.com/LyraVoid/Shirone/issues">GitHub Issues</a> 上分享你的想法和问题。</li>
</ul>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>🔒 密码保护与文章加密演示</title>
    <link href="https://fmz.us.ci/posts/encrypted-demo/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/encrypted-demo/</id>
    <published>2026-08-20T00:00:00.000Z</published>
    <updated>2026-08-20T00:00:00.000Z</updated>
    <summary>该文章内容已加密，请输入密码后查看。</summary>
    <content type="html"><![CDATA[<p><em>🔒 本文已加密保护，请访问博客网站输入密码阅读全文。</em></p>]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Shirone Markdown 增强功能</title>
    <link href="https://fmz.us.ci/posts/markdown-enhancements/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/markdown-enhancements/</id>
    <published>2026-08-19T00:00:00.000Z</published>
    <updated>2026-08-19T00:00:00.000Z</updated>
    <summary>探索 Shirone 的自定义 Markdown 扩展、表现力组件和创作语法。</summary>
    <content type="html"><![CDATA[<p>Shirone 提供了一系列主题专属的 Markdown 扩展和自定义语法容器。它们构建在我们原生的统一 AST 处理管道之上，所有扩展在站点构建时都会渲染为无障碍的语义化 HTML，具有<strong>零客户端 JavaScript 水合开销</strong>和<strong>100% M3E 设计令牌对齐</strong>。</p>
<h2>文件树</h2>
<p>文件树将多级项目结构、源代码层级和终端目录输出转换为紧凑、可交互的树形视图，具有自动扩展名图标、差异高亮和可折叠分支。</p>
<h3>1. 嵌套列表语法（<code>:::file-tree</code>）</h3>
<p>当直接将文件层级写为 Markdown 嵌套列表时，使用 <code>:::file-tree</code> 块指令。</p>
<pre><code>:::file-tree{title="Shirone source tree"}
- src
  - components/
    - ++ Navigation.svelte # added component
    - -- Button.astro # removed component
  - content
    - posts/
      - markdown-enhancements.md
  - layouts/
    - PostLayout.astro
  - plugins
    - markdown/
      - rehype-file-tree.mjs
  - styles
    - markdown/
      - trees.css
  - **content.config.ts** # important file
- public/
  - favicon.svg
- package.json
:::
</code></pre>
<p>:::file-tree{title="Shirone 源代码树"}</p>
<ul>
<li>src
<ul>
<li>components/
<ul>
<li>++ Navigation.svelte # 添加的组件</li>
<li>-- Button.astro # 移除的组件</li>
</ul>
</li>
<li>content
<ul>
<li>posts/
<ul>
<li>markdown-enhancements.md</li>
</ul>
</li>
</ul>
</li>
<li>layouts/
<ul>
<li>PostLayout.astro</li>
</ul>
</li>
<li>plugins
<ul>
<li>markdown/
<ul>
<li>rehype-file-tree.mjs</li>
</ul>
</li>
</ul>
</li>
<li>styles
<ul>
<li>markdown/
<ul>
<li>trees.css</li>
</ul>
</li>
</ul>
</li>
<li><strong>content.config.ts</strong> # 重要文件</li>
</ul>
</li>
<li>public/
<ul>
<li>favicon.svg</li>
</ul>
</li>
<li>package.json
:::</li>
</ul>
<h4>创作规则与标记</h4>
<ul>
<li><strong>差异状态</strong>：在项目前加上 <code>++</code>（绿色背景和徽章）或 <code>--</code>（红色背景和删除线）以高亮更改。</li>
<li><strong>注释</strong>：<code>#</code> 之后的任何文本都会渲染为静默的、右对齐的行内注释。</li>
<li><strong>强调</strong>：将名称包裹在 <code>**粗体**</code> 中，以赋予关键文件突出的视觉权重。</li>
<li><strong>可折叠文件夹</strong>：从嵌套列表项推断出的目录默认展开。添加尾部斜杠（例如 <code>components/</code>）可创建折叠目录，读者可以通过点击或键盘导航展开。</li>
</ul>
<hr />
<h3>2. 终端输出语法（<code>```file-tree</code>）</h3>
<p>当您已有由 <code>tree</code> 等命令行工具生成的目录树文本时，直接将其粘贴到 <code>file-tree</code> 围栏代码块中。Unicode 分支字符（<code>├──</code>、<code>└──</code>、<code>│</code>）和 ASCII 分支都会自动解析。</p>
<pre><code>```file-tree title="Build output" icon="simple"
dist
├── _astro/
│   ├── index.css
│   └── page.js
└── favicon.ico
```
</code></pre>
<pre><code>dist
├── _astro/
│   ├── index.css
│   └── page.js
└── favicon.ico
</code></pre>
<h4>配置选项</h4>
<ul>
<li><code>title="string"</code>：为树设置自定义标题和可访问标签。</li>
<li><code>icon="colored" | "simple"</code>：在多色扩展名图标（<code>colored</code>，默认）或极简单色图标（<code>simple</code>）之间选择。</li>
</ul>
<hr />
<h2>代码树</h2>
<p>交互式代码树将左侧的多级文件层级导航窗格与右侧的即时代码面板切换配对。它们为多文件示例、模块或整个目录的走查提供类似 IDE 的阅读体验。</p>
<h3>1. 容器语法（<code>:::code-tree</code>）</h3>
<p>在 <code>:::code-tree</code> 块指令中组合多个围栏代码块。每个代码块通过 <code>title="path/to/file"</code> 指定其路径。</p>
<pre><code>:::code-tree{title="Shirone Component Demo" height="380px" entry="src/Button.svelte"}
```svelte title="src/Button.svelte"
&lt;script lang="ts"&gt;
  let { label = "Click me" } = $props();
&lt;/script&gt;

&lt;button class="m3-btn"&gt;{label}&lt;/button&gt;
```

```stylus title="src/styles/button.styl"
.m3-btn
  background: var(--primary)
  color: var(--on-primary)
  border-radius: var(--shape-corner-m)
```

```json title="package.json"
{
  "name": "button-demo",
  "version": "1.0.0"
}
```
:::
</code></pre>
<p>:::code-tree{title="Shirone 组件演示" height="380px" entry="src/Button.svelte"}</p>
<pre><code>&lt;script lang="ts"&gt;
  let { label = "Click me" } = $props();
&lt;/script&gt;

&lt;button class="m3-btn"&gt;{label}&lt;/button&gt;
</code></pre>
<pre><code>.m3-btn
  background: var(--primary)
  color: var(--on-primary)
  border-radius: var(--shape-corner-m)
</code></pre>
<pre><code>{
  "name": "button-demo",
  "version": "1.0.0"
}
</code></pre>
<p>:::</p>
<h4>配置与标记</h4>
<ul>
<li><code>title="string"</code>：设置代码树的标题和可访问标签。</li>
<li><code>height="string"</code>：设置桌面视图的高度（默认 <code>420px</code>，例如 <code>380px</code>、<code>26rem</code>）。</li>
<li><code>entry="filepath"</code>：指定首次加载时处于活动状态的文件。</li>
<li><code>icon="colored" | "simple"</code>：在彩色或极简单色文件图标之间切换。</li>
<li><code>:active</code>：将 <code>:active</code> 放在任何围栏代码块上，以将其指定为默认活动标签页。</li>
</ul>
<hr />
<h3>2. 本地目录自动导入（<code>@[code-tree]</code>）</h3>
<p>直接指向工作区中的任何本地目录路径，以在构建时自动扫描并生成交互式代码树，而无需手动复制文件内容。</p>
<pre><code>@[code-tree title="Anime Utilities" entry="status.ts"](/src/utils/anime)
</code></pre>
<p>@<a href="/src/utils/anime">code-tree title="动漫工具" entry="status.ts"</a></p>
<p>@<a href="/src/config">code-tree title="站点配置" entry="siteConfig.ts"</a></p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>音频朗读器：日系动漫神秘语音</title>
    <link href="https://fmz.us.ci/posts/audio-reader/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/audio-reader/</id>
    <published>2026-08-29T00:00:00.000Z</published>
    <updated>2026-08-29T00:00:00.000Z</updated>
    <summary>一小段神秘的日系动漫语音片段合集，通过音频朗读器按需播放。</summary>
    <content type="html"><![CDATA[<p>这些简短的日语语音片段仿佛是从动漫场景的边缘捕捉而来：一声戏谑的呼唤、一句明朗的问候、一声轻笑，以及几句来源不明的台词。它们是情绪样本而非对话文本，因此让声音本身来传达含义吧。</p>
<p>音频朗读器会保持安静，直到你选择聆听。每个扬声器按钮只有在被按下后才会加载并播放其片段。</p>
<pre><code>:audio-reader[Clip title]{src="/assets/audio/filename.wav"}
</code></pre>
<h2>语音片段</h2>
<ul>
<li><strong>Baka</strong>：:audio-reader[バカ]{src="/assets/audio/Baka.wav"}</li>
<li><strong>Ciallo</strong>：:audio-reader[Ciallo！！]{src="/assets/audio/Ciallo.wav"}</li>
<li><strong>Ehe</strong>：:audio-reader[开玩笑的感觉]{src="/assets/audio/Ehe.wav"}</li>
<li><strong>Imoi</strong>：:audio-reader[イモい]{src="/assets/audio/Imoi.wav"}</li>
<li><strong>Zako</strong>：:audio-reader[雑魚じゃん、雑魚雑魚]{src="/assets/audio/Zako.wav"}</li>
</ul>
<p><code>src</code> 必须使用站点根路径或 HTTPS URL，且指令标签不能为空。无效或不完整的指令将保持为普通 Markdown，不会加载音频朗读器资源。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown 折叠面板</title>
    <link href="https://fmz.us.ci/posts/collapse-panels/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/collapse-panels/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>将可选的 Markdown 内容归入紧凑、无障碍的 M3E 折叠面板中。</summary>
    <content type="html"><![CDATA[<p>折叠面板将相关的可选详情归入一个紧凑的分组中。标题和正文保留行内及块级 Markdown，而原生折叠语义使每个面板无需客户端 JavaScript 即可使用。</p>
<h2>独立面板</h2>
<p>默认情况下，各项独立展开。在标题前加上 <code>:+</code> 可使该项初始展开，或加上 <code>:-</code> 可在分组使用 <code>expand</code> 时保持其关闭。</p>
<p>::: collapse</p>
<ul>
<li>
<p><strong>软件包要求</strong></p>
<p>使用 Node.js 22 或更高版本，并在安装软件包之前启用 Corepack。</p>
</li>
<li>
<p>:+ 安装依赖</p>
<p>从仓库根目录运行工作区软件包命令。</p>
<pre><code>pnpm.cmd install
</code></pre>
</li>
<li>
<p>验证命令</p>
<p>在构建生产输出之前检查内容管道。</p>
<ul>
<li><code>pnpm.cmd check:manifest</code></li>
<li><code>npx.cmd astro check</code>
:::</li>
</ul>
</li>
</ul>
<h2>手风琴模式</h2>
<p>当只应保持一个答案展开时，添加 <code>accordion</code>。浏览器直接对原生折叠组件进行分组，因此打开另一项会关闭前一项，而无需水合。</p>
<p>::: collapse accordion expand</p>
<ul>
<li>
<p>这里的 <code>expand</code> 有什么作用？</p>
<p>当没有任何项带有 <code>:+</code> 标记时，它会初始展开第一项。</p>
</li>
<li>
<p>标题可以包含 Markdown 吗？</p>
<p>可以。标题支持行内 <strong>强调</strong> 和 <code>代码</code>，而面板正文支持完整的块级 Markdown。</p>
</li>
<li>
<p>在窄屏幕上会发生什么？</p>
<p>内容内边距会变得紧凑，长文本会换行，嵌入的代码会保留自己的水平滚动区域。
:::</p>
</li>
</ul>
<h2>作者语法</h2>
<pre><code>::: collapse accordion
- :+ First title

  First panel content.

- Second title with `code`

  Second panel content.
:::
</code></pre>
<p>该容器必须恰好包含一个顶级无序列表。每个项都需要一个标题段落、一个空行和正文内容。无效或混合的输入将保持为普通的可读 Markdown 列表。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown 缩写</title>
    <link href="https://fmz.us.ci/posts/markdown-abbreviations/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/markdown-abbreviations/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>只需定义一次常见缩写词，即可在普通文章文本中保留其完整含义。</summary>
    <content type="html"><![CDATA[<p>缩写使技术写作保持简洁，同时为需要了解完整术语的读者保留其全称。已定义的术语会渲染为原生 <code>abbr</code> 元素，其含义可在悬停时查看，也可供辅助技术读取。</p>
<h2>在上下文中</h2>
<p>SSR 优先的输出会在 JavaScript 运行之前保持初始文档可见。在衡量其阅读体验时，LCP 和 CLS 会揭示首个可见内容是否快速且稳定。</p>
<p>缩写也可以出现在普通 Markdown 旁边，例如 <strong>SSR</strong> 指南，但诸如 <code>SSR</code> 这样的字面代码以及像 <a href="https://web.dev/articles/lcp">LCP 文档</a> 这样的链接将保持原样，不受影响。</p>
<h2>定义术语</h2>
<p>将定义放在同一 Markdown 文档的任意位置。它们不会渲染为可见段落，只有该文章中的匹配术语才会获得语义化的缩写处理。</p>
<pre><code>*[SSR]: Server-Side Rendering
*[LCP]: Largest Contentful Paint
*[CLS]: Cumulative Layout Shift

SSR makes an HTML response available before client code runs.
</code></pre>
<p>*[SSR]: Server-Side Rendering
*[LCP]: Largest Contentful Paint
*[CLS]: Cumulative Layout Shift</p>
<h2>创作边界</h2>
<p>术语必须以字母或数字开头，并且可以包含字母、数字、句点、下划线、加号和连字符。每个定义仅适用于当前文章；无效或重复的定义将保持为普通 Markdown，而不会静默替换其他术语。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown 文件包含</title>
    <link href="https://fmz.us.ci/posts/markdown-includes/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/markdown-includes/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>构建时的 Markdown 文件与片段包含。</summary>
    <content type="html"><![CDATA[<p>Shirone 可以包含一个本地 Markdown 文件或其安全片段。</p>
<p>&lt;!-- @include: src/content/snippets/include-example.md#public-api --&gt;</p>
<p>也支持完整文件和行范围两种形式：</p>
<pre><code>&lt;!-- @include: src/content/snippets/include-example.md --&gt;
&lt;!-- @include: src/content/snippets/include-example.md{1-4} --&gt;
&lt;!-- @include: src/content/snippets/include-example.md{5-} --&gt;
&lt;!-- @include: src/content/snippets/include-example.md{-4} --&gt;
</code></pre>
<p>围栏代码块内的包含注释保持字面量形式。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown 标记高亮</title>
    <link href="https://fmz.us.ci/posts/marker-highlights/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/marker-highlights/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>在 Shirone Markdown 中使用令牌驱动的标记语法高亮关键短语。</summary>
    <content type="html"><![CDATA[<p>标记高亮用于将注意力引向特定短语，而不会把周围段落变成单独的组件。它们在构建期间渲染为原生 <code>&lt;mark&gt;</code> 元素，并继承当前活动的 M3E 颜色系统。</p>
<h2>默认强调</h2>
<p>当文章的主色应承载强调时，使用 <code>==文本==</code>。这对于 ==读者在继续阅读普通段落时应记住的一个决定== 很有用。</p>
<p>当短语需要更强的层次结构时，标记可以包含 ==嵌套的 <strong>Markdown 强调</strong>==。</p>
<h2>语义颜色</h2>
<p>当含义需要不同的色调角色时，使用后缀。可用的变体有 <code>primary</code>、<code>secondary</code>、<code>tertiary</code>、<code>error</code> 和 <code>tip</code>。</p>
<ul>
<li>==Primary 将短语与当前主题关联=={.primary}</li>
<li>==Secondary 保持辅助性区分低调=={.secondary}</li>
<li>==Tertiary 添加独立的编辑信号=={.tertiary}</li>
<li>==Error 标识需要纠正的状况=={.error}</li>
<li>==Tip 高亮实用指南=={.tip}</li>
</ul>
<h2>作者语法</h2>
<pre><code>==Primary marker==

==Secondary marker=={.secondary}
==Tertiary marker=={.tertiary}
==Error marker=={.error}
==Tip marker=={.tip}
</code></pre>
<p>诸如 <code>==literal marker syntax==</code> 这样的行内代码以及围栏示例保持字面量，因此文档可以解释语法而不会触发它。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown 选项组</title>
    <link href="https://fmz.us.ci/posts/option-groups/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/option-groups/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>在紧凑、同步的 M3E 选项组中呈现相关的 Markdown 替代方案。</summary>
    <content type="html"><![CDATA[<p>选项组将等效的说明放在一起，而无需重复周围的解释。每个选项都接受完整的块级 Markdown，而所选值可以与同一页面上的另一个组同步。</p>
<h2>选择包管理器</h2>
<p>使用 <code>@tab:active</code> 选择初始选项。<code>#</code> 之后的后缀提供一个稳定的值，而不会改变可见标题。</p>
<p>::: tabs#package-manager</p>
<p>@tab npm</p>
<p>使用 npm 安装该包：</p>
<pre><code>npm install astro
</code></pre>
<p>@tab:active <strong>pnpm</strong>#pnpm</p>
<p>使用 pnpm 安装该包：</p>
<pre><code>pnpm.cmd add astro
</code></pre>
<p>@tab Bun#bun</p>
<p>使用 Bun 安装该包：</p>
<pre><code>bun add astro
</code></pre>
<p>:::</p>
<h2>运行项目</h2>
<p>此组共享 <code>package-manager</code> id。选择上面的某个选项会更新下面匹配的命令，并记住该选择以便下次访问。</p>
<p>::: tabs#package-manager</p>
<p>@tab npm</p>
<pre><code>npm run dev
</code></pre>
<p>@tab pnpm</p>
<pre><code>pnpm.cmd dev
</code></pre>
<p>@tab Bun#bun</p>
<pre><code>bun run dev
</code></pre>
<p>:::</p>
<h2>多个备选方案</h2>
<p>较长的选项行会保持在一行内，并在窄屏幕上于其自身的导航区域内滚动。</p>
<p>::: tabs</p>
<p>@tab Local workstation</p>
<p>在开发功能时使用本地工具链。</p>
<p>@tab Hosted preview environment</p>
<p>发布临时预览以供审核。</p>
<p>@tab Continuous integration</p>
<p>为每次更改运行确定性验证。</p>
<p>@tab Production deployment</p>
<p>将经过验证的构建产物提升到生产环境。</p>
<p>@tab Offline recovery workflow</p>
<p>当网络不可用时，从本地构建产物恢复。</p>
<p>:::</p>
<h2>作者语法</h2>
<pre><code>::: tabs#package-manager

@tab npm

Use npm instructions here.

@tab:active **pnpm**#pnpm

Use pnpm instructions here.

:::
</code></pre>
<p>每个组至少需要两个 <code>@tab</code> 部分，并且每个部分都需要正文内容，正文与其标记之间用空行分隔。无效或不完整的组将保持为普通 Markdown 的可读形式。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Spoilers</title>
    <link href="https://fmz.us.ci/posts/spoilers/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/spoilers/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>Hide inline answers while keeping spoiler content accessible in Shirone Markdown.</summary>
    <content type="html"><![CDATA[<p>Spoilers conceal a short answer or plot detail without removing it from the document. Hover, focus, or activate the native control to reveal the content.</p>
<h2>Inline details</h2>
<p>The answer is :spoiler[<strong>42</strong>], and this sentence remains ordinary Markdown around it.</p>
<p>Spoilers can include <code>inline code</code> and :spoiler[a longer detail with <strong>emphasis</strong>].</p>
<h2>Author syntax</h2>
<pre><code>The answer is :spoiler[42].
</code></pre>
<p>The generated HTML uses a native button with an <code>aria-expanded</code> state. Without JavaScript, hover and focus still reveal the text; the optional runtime adds click and keyboard toggling.</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown 提示块</title>
    <link href="https://fmz.us.ci/posts/admonitions/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/admonitions/</id>
    <published>2026-08-27T00:00:00.000Z</published>
    <updated>2026-08-27T00:00:00.000Z</updated>
    <summary>使用 Shirone 的 M3E Markdown 容器呈现笔记、警告和可选详情。</summary>
    <content type="html"><![CDATA[<p>提示块使辅助信息在视觉上保持独立，同时保持文章的阅读流畅性。每种形式都在服务器端渲染，并使用相同的紧凑 M3E 组件。</p>
<h2>语义变体</h2>
<p>::: note 部署上下文
带空格的形式接受纯自定义标题，同时保持与参考语法兼容。
:::</p>
<p>:::info
使用信息块来提供中性的上下文，帮助读者理解周围章节。
:::</p>
<p>:::tip[现有的 <strong>标签</strong> 语法]
原有的方括号标签仍然可用，并且可以包含行内 Markdown 强调。
:::</p>
<blockquote>
<p>[!IMPORTANT]
GitHub Alert 语法进入相同的渲染器，因此现有文章保持统一的视觉语言。</p>
</blockquote>
<p>:::warning
在运行生产构建之前检查环境变量。
:::</p>
<p>:::caution
不要在示例中发布凭证、本地配置或私钥。
:::</p>
<h2>可选详情</h2>
<p>::: details 查看完整命令
该折叠组件使用原生浏览器语义，无需客户端 JavaScript 即可保持键盘可访问性。</p>
<pre><code>npx.cmd astro check
pnpm.cmd build
</code></pre>
<ul>
<li>默认处于关闭状态。</li>
<li>长代码可以在其自身的代码块内滚动。</li>
<li>在窄屏幕上，容器保持在文章宽度内。
:::</li>
</ul>
<h2>作者语法</h2>
<pre><code>:::note[Existing title syntax]
Content
:::

::: warning Plume-compatible title syntax
Content
:::

&gt; [!TIP]
&gt; GitHub Alert syntax

::: details Optional content
Hidden until the reader opens it.
:::
</code></pre>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>内容注解</title>
    <link href="https://fmz.us.ci/posts/content-annotations/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/content-annotations/</id>
    <published>2026-08-27T00:00:00.000Z</published>
    <updated>2026-08-27T00:00:00.000Z</updated>
    <summary>为 Shirone 文章添加紧凑、无障碍的辅助说明，而不打断阅读流程。</summary>
    <content type="html"><![CDATA[<p>内容注解将辅助上下文保持在句子附近，而不把它直接放入阅读流程中。激活小注释标记即可显示其内容。</p>
<h2>基本语法</h2>
<p>在普通行文中添加 <code>[+label]</code> 引用，然后在同一篇文章的其他位置定义匹配的注释。</p>
<pre><code>Astro renders most of a page ahead of time and hydrates **interactive islands** [+islands] only when they need to become interactive.

[+islands]:
  An island is an interactive UI component surrounded by static HTML. This keeps the default page lightweight while preserving focused interactivity.
</code></pre>
<p>Astro 会预先渲染页面的大部分内容，并且仅在<strong>交互式岛屿</strong> [+islands] 需要变得可交互时才对其进行水合。</p>
<p>[+islands]:
岛屿是被静态 HTML 包围的交互式 UI 组件。这使默认页面保持轻量，同时保留聚焦的交互性。</p>
<h2>丰富内容</h2>
<p>定义可以包含段落、强调、链接、列表和行内代码 <a href="**%E5%88%9B%E4%BD%9C%E6%8C%87%E5%8D%97**">+rich-note</a>，而周围的句子则正常继续。</p>
<ul>
<li>保持第一句话自包含。</li>
<li>当读者可能需要主要来源时，使用链接。</li>
<li>优先使用简洁的示例，例如 <code>client:visible</code>。</li>
</ul>
<p>有关完整模型，请参阅 <a href="https://docs.astro.build/en/concepts/islands/">Astro 岛屿文档</a>。</p>
<h2>多个定义</h2>
<p>复用同一个标签 <a href="%E4%BB%8E%E6%94%B9%E5%8F%98%E8%AF%BB%E8%80%85%E4%B8%8B%E4%B8%80%E6%AD%A5%E8%A1%8C%E5%8A%A8%E7%9A%84%E5%86%B3%E5%AE%9A%E5%BC%80%E5%A7%8B%E3%80%82">+review</a>，在一个标记背后呈现一串简短的相关注释。</p>
<p>未定义的引用（如 <code>[+missing]</code>）会保持为普通文本，因此未完成的定义永远不会产生空控件。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown 步骤</title>
    <link href="https://fmz.us.ci/posts/steps/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/steps/</id>
    <published>2026-08-27T00:00:00.000Z</published>
    <updated>2026-08-27T00:00:00.000Z</updated>
    <summary>在 Shirone 中以紧凑、无障碍的步骤流程呈现顺序说明。</summary>
    <content type="html"><![CDATA[<p>当过程顺序很重要时，使用步骤（Steps）。该组件保持文章阅读流程完整：一条低调的编号导轨提供方向感，而标题、段落、链接、列表和代码则保留其原生 Markdown 角色。</p>
<h2>有序列表语法</h2>
<p>将一个 Markdown 有序列表包裹在 <code>:::steps</code> 容器中。每个顶级列表项成为一个步骤。</p>
<pre><code>:::steps[Production deployment]
1. **Clone and prepare the workspace**

   Clone the repository and enter the project directory.

   ```powershell
   git clone https://github.com/LyraVoid/Shirone.git
   Set-Location Shirone
   ```

2. **Install dependencies**

   Use the repository's pinned package manager.

   ```powershell
   pnpm.cmd install
   ```

3. **Run project checks**

   Confirm Astro diagnostics and TypeScript checks pass.

   ```powershell
   npx.cmd astro check
   pnpm.cmd type-check
   ```

4. **Build the production site**

   Generate the static site and search index.

   ```powershell
   pnpm.cmd build
   ```
:::
</code></pre>
<p>:::steps[生产部署]</p>
<ol>
<li>
<p><strong>克隆并准备工作区</strong></p>
<p>克隆仓库并进入项目目录。</p>
<pre><code>git clone https://github.com/LyraVoid/Shirone.git
Set-Location Shirone
</code></pre>
</li>
<li>
<p><strong>安装依赖</strong></p>
<p>使用仓库固定的包管理器。</p>
<pre><code>pnpm.cmd install
</code></pre>
</li>
<li>
<p><strong>运行项目检查</strong></p>
<p>确认 Astro 诊断和 TypeScript 检查通过。</p>
<pre><code>npx.cmd astro check
pnpm.cmd type-check
</code></pre>
</li>
<li>
<p><strong>构建生产站点</strong></p>
<p>生成静态站点和搜索索引。</p>
<pre><code>pnpm.cmd build
</code></pre>
</li>
</ol>
<p>:::</p>
<h2>选项</h2>
<ul>
<li><code>:::steps[Title]</code> 或 <code>title="Title"</code> 添加可见标签和可访问名称。</li>
<li><code>start=4</code> 更改第一个显示的步骤编号。</li>
<li>该容器必须恰好包含一个有序列表。无效或混合的输入将保持为普通的可读 Markdown，而不会被启发式地解释。</li>
<li>渲染在站点构建期间完成，不添加任何客户端 JavaScript 或网络请求。</li>
</ul>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>MDX 集成与 M3E 原子组件</title>
    <link href="https://fmz.us.ci/posts/mdx-showcase/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/mdx-showcase/</id>
    <published>2026-08-20T00:00:00.000Z</published>
    <updated>2026-08-20T00:00:00.000Z</updated>
    <summary>一份关于在 Shirone 中使用 MDX、Svelte 5 交互式岛屿和 Material 3 Expressive 设计令牌撰写丰富交互式文章的综合指南。</summary>
    <content type="html"><![CDATA[<p>:::tip
<strong>MDX（Markdown + JSX）</strong> 弥合了静态写作与应用界面之间的鸿沟。在 Shirone 中，作者可以直接在文章内容中无缝混合动态逻辑、响应式 Svelte 5 组件和 Material 3 设计令牌。
:::</p>
<h2>1. Markdown 与 MDX 能力对比矩阵</h2>
<table>
<thead>
<tr>
<th>功能</th>
<th>标准 Markdown（<code>.md</code>）</th>
<th>Shirone MDX（<code>.mdx</code>）</th>
<th>执行模式</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>排版与结构</strong></td>
<td>完全支持</td>
<td>完全支持</td>
<td>静态 SSR</td>
</tr>
<tr>
<td><strong>代码高亮</strong></td>
<td>行号、框架、可折叠</td>
<td>行号、框架、可折叠</td>
<td>静态 SSR（Expressive Code）</td>
</tr>
<tr>
<td><strong>图表与数学</strong></td>
<td>Mermaid、KaTeX</td>
<td>Mermaid、KaTeX</td>
<td>客户端增强</td>
</tr>
<tr>
<td><strong>提示块</strong></td>
<td>Note、Tip、Important、Warning、Caution</td>
<td>Note、Tip、Important、Warning、Caution</td>
<td>静态 SSR</td>
</tr>
<tr>
<td><strong>M3E 展示原子</strong></td>
<td>不可用</td>
<td>直接集成（``、<code>&lt;Skeleton&gt;</code>）</td>
<td>纯 SSR（零客户端 JS）</td>
</tr>
<tr>
<td><strong>Svelte 5 响应式岛屿</strong></td>
<td>不可用</td>
<td>按需水合（<code>&lt;Button&gt;</code>、<code>&lt;Switch&gt;</code>）</td>
<td><code>client:visible</code> 懒加载水合</td>
</tr>
<tr>
<td><strong>反馈与加载原子</strong></td>
<td>不可用</td>
<td>动画变形（<code>&lt;LoadingIndicator&gt;</code>）</td>
<td><code>client:visible</code> 响应式</td>
</tr>
<tr>
<td><strong>动态 JSX 表达式</strong></td>
<td>不可用</td>
<td>原生求值（<code>{authorInfo.ui}</code>）</td>
<td>编译时 / 客户端</td>
</tr>
</tbody>
</table>
<hr />
<h2>2. 动态表达式与数据映射</h2>
<p>MDX 允许在文件顶部使用 <code>export const</code> 声明作用域常量，这些常量可以在行内求值或跨模板映射：</p>
<ul>
<li><strong>核心框架</strong>：{authorInfo.framework}</li>
<li><strong>UI 引擎</strong>：{authorInfo.ui}</li>
<li><strong>设计令牌</strong>：{authorInfo.tokens}</li>
<li><strong>架构模式</strong>：{authorInfo.architecture}</li>
</ul>
<p>数组和集合可以动态渲染为网格布局：</p>
<p>&lt;div class="grid grid-cols-1 md:grid-cols-2 gap-4 my-6"&gt;
{showcaseItems.map((item, idx) =&gt; (
&lt;div key={item.name} class="p-4 rounded-xl border border-[var(--outline-variant)] bg-[var(--surface-container-low)]"&gt;
&lt;div class="flex items-center gap-2 mb-1"&gt;
&lt;span class="w-6 h-6 rounded-full bg-[var(--primary)] text-[var(--on-primary)] text-xs flex items-center justify-center font-bold"&gt;
{idx + 1}
&lt;/span&gt;
&lt;span class="font-bold text-[var(--on-surface)]"&gt;{item.name}&lt;/span&gt;
&lt;/div&gt;
&lt;p class="text-sm text-[var(--on-surface-variant)] m-0"&gt;{item.desc}&lt;/p&gt;
&lt;/div&gt;
))}
&lt;/div&gt;</p>
<hr />
<h2>3. M3E 展示与布局原语（仅 SSR）</h2>
<p>根据 Shirone 的组件架构（<code>docs/atomic-structure.md</code>），无状态的展示组件输出干净、无障碍的语义化 HTML，且没有客户端运行时负载。</p>
<h3>3.1 卡片容器（<code>Card.svelte</code>）</h3>
<p>&lt;div class="grid grid-cols-1 md:grid-cols-3 gap-4 my-6"&gt;
&lt;Card variant="filled" class="!p-5"&gt;
&lt;div class="font-bold text-[var(--primary)] mb-2"&gt;Filled Card&lt;/div&gt;
&lt;div class="text-sm text-[var(--on-surface-variant)]"&gt;Default container background with no elevation shadow. Ideal for grouped content blocks.&lt;/div&gt;</p>
<pre><code>&lt;div class="font-bold text-[var(--primary)] mb-2"&gt;Elevated Card&lt;/div&gt;
&lt;div class="text-sm text-[var(--on-surface-variant)]"&gt;Level 1 container elevation with interactive state layering for heightened visual focus.&lt;/div&gt;



&lt;div class="font-bold text-[var(--primary)] mb-2"&gt;Outlined Card&lt;/div&gt;
&lt;div class="text-sm text-[var(--on-surface-variant)]"&gt;A crisp 1px outline boundary providing clean separation on neutral surfaces.&lt;/div&gt;
</code></pre>
<p>&lt;/div&gt;</p>
<h3>3.2 强调条与徽章（<code>AccentBar</code> 与 <code>Badge</code>）</h3>
<p>&lt;div class="flex items-center gap-4 my-4 p-4 rounded-lg bg-[var(--surface-container-high)]"&gt;</p>
<p>&lt;div class="flex-1"&gt;
&lt;span class="font-bold text-lg"&gt;System Announcement&lt;/span&gt;
&lt;p class="text-xs text-[var(--on-surface-variant)] m-0"&gt;Combine AccentBar with Badge to build prominent visual callouts&lt;/p&gt;
&lt;/div&gt;
M3E v0.192
&lt;/div&gt;</p>
<h3>3.3 骨架占位符（<code>Skeleton.svelte</code>）</h3>
<p>用于预览布局骨架或制作异步状态原型：</p>
<p>&lt;div class="flex flex-col gap-3 my-6 p-5 rounded-xl border border-[var(--outline-variant)] bg-[var(--surface-container-low)]"&gt;
&lt;div class="flex items-center gap-3"&gt;</p>
<pre><code>&lt;div class="flex flex-col gap-1.5 flex-1"&gt;
  
  
&lt;/div&gt;
</code></pre>
<p>&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<hr />
<h2>4. 反馈与加载指示器</h2>
<p>Shirone 具备完整保真度的 Material 3 Expressive 动效与反馈原子：</p>
<h3>4.1 变形加载指示器（<code>LoadingIndicator.svelte</code>）</h3>
<p>使用 <code>androidx.graphics.shapes</code> 多边形变形实现，提供平滑的弹簧插值 7 形状动画：</p>
<p>&lt;div class="grid grid-cols-1 md:grid-cols-3 gap-4 my-6 p-6 rounded-2xl bg-[var(--surface-container)] border border-[var(--outline-variant)] text-center"&gt;
&lt;div class="flex flex-col items-center gap-2"&gt;
&lt;div class="h-16 flex items-center justify-center"&gt;</p>
<pre><code>&lt;/div&gt;
&lt;span class="text-xs text-[var(--on-surface-variant)]"&gt;Indeterminate Shape Morph&lt;/span&gt;
</code></pre>
<p>&lt;/div&gt;</p>
<p>&lt;div class="flex flex-col items-center gap-2"&gt;
&lt;div class="h-16 flex items-center justify-center"&gt;</p>
<pre><code>&lt;/div&gt;
&lt;span class="text-xs text-[var(--on-surface-variant)]"&gt;Contained Circular Variant&lt;/span&gt;
</code></pre>
<p>&lt;/div&gt;</p>
<p>&lt;div class="flex flex-col items-center gap-2"&gt;
&lt;div class="h-16 flex items-center justify-center"&gt;</p>
<pre><code>&lt;/div&gt;
&lt;span class="text-xs text-[var(--on-surface-variant)]"&gt;Determinate Progress (68%)&lt;/span&gt;
</code></pre>
<p>&lt;/div&gt;
&lt;/div&gt;</p>
<h3>4.2 线性与不确定进度（<code>ProgressIndicator.svelte</code>）</h3>
<p>&lt;div class="flex flex-col gap-4 my-6 p-6 rounded-2xl bg-[var(--surface-container)] border border-[var(--outline-variant)]"&gt;
&lt;div class="flex flex-col gap-2"&gt;
&lt;div class="flex justify-between text-xs text-[var(--on-surface-variant)]"&gt;
&lt;span&gt;Pipeline Compilation&lt;/span&gt;
&lt;span&gt;80%&lt;/span&gt;
&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;div class="flex flex-col gap-2 mt-2"&gt;
&lt;div class="text-xs text-[var(--on-surface-variant)]"&gt;Continuous Dual-Line Animation&lt;/div&gt;</p>
<p>&lt;/div&gt;
&lt;/div&gt;</p>
<hr />
<h2>5. 交互式 Svelte 5 岛屿</h2>
<p>使用 <code>client:visible</code> 声明的组件会在进入视口时通过 <code>IntersectionObserver</code> 进行懒加载水合：</p>
<h3>5.1 按钮矩阵（<code>Button.svelte</code>）</h3>
<p>&lt;div class="flex flex-wrap items-center gap-3 my-6 p-4 rounded-xl border border-[var(--outline-variant)]"&gt;
Filled Button
Elevated
Tonal Button
Outlined
Text Button
&lt;/div&gt;</p>
<h3>5.2 筛选标签与分段按钮（<code>Chips</code> 与 <code>SegmentedButton</code>）</h3>
<p>&lt;div class="flex flex-col gap-4 my-6 p-6 rounded-2xl bg-[var(--surface-container)] border border-[var(--outline-variant)]"&gt;
&lt;div&gt;
&lt;div class="text-xs font-bold text-[var(--on-surface-variant)] mb-2"&gt;M3E Filter Chips&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;div&gt;
&lt;div class="text-xs font-bold text-[var(--on-surface-variant)] mb-2"&gt;Segmented Control&lt;/div&gt;</p>
<p>&lt;/div&gt;
&lt;/div&gt;</p>
<h3>5.3 开关、复选框与滑块（<code>Switch</code>、<code>Checkbox</code>、<code>Slider</code>）</h3>
<p>&lt;div class="flex flex-col gap-4 my-6 p-6 rounded-2xl bg-[var(--surface-container)] border border-[var(--outline-variant)]"&gt;
&lt;div class="flex items-center justify-between"&gt;
&lt;span class="font-bold text-sm"&gt;Switch with Status Icons&lt;/span&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;div class="flex items-center justify-between"&gt;
&lt;span class="font-bold text-sm"&gt;Selection Checkboxes&lt;/span&gt;
&lt;div class="flex items-center gap-4"&gt;</p>
<pre><code>&lt;/div&gt;
</code></pre>
<p>&lt;/div&gt;</p>
<p>&lt;div class="flex flex-col gap-2"&gt;
&lt;span class="font-bold text-sm"&gt;Hue Spectrum Slider&lt;/span&gt;</p>
<p>&lt;/div&gt;
&lt;/div&gt;</p>
<h3>5.4 输入控件（<code>TextField.svelte</code>）</h3>
<p>&lt;div class="grid grid-cols-1 md:grid-cols-2 gap-4 my-6"&gt;</p>
<p>&lt;/div&gt;</p>
<hr />
<h2>6. Markdown 扩展兼容性</h2>
<p>Shirone 的 SSOT 统一插件管道保持与所有 Markdown 扩展的完全兼容：</p>
<h3>6.1 GitHub 仓库卡片</h3>
<p>::github{repo="saicaca/fuwari"}</p>
<h3>6.2 Mermaid 架构图</h3>
<pre><code>flowchart TD
    MDX[MDX Source Entry] --&gt; Compiler["@astrojs/mdx Compiler"]
    Compiler --&gt; Plugins["Remark / Rehype SSOT Pipeline"]
    Plugins --&gt; Islands["Svelte 5 Interactive Islands"]
    Islands --&gt; Swup["Swup Client Navigation Shell"]
    Swup --&gt; Screen["M3E Expressive Article View"]
</code></pre>
<h3>6.3 数学表达式（LaTeX / KaTeX）</h3>
<p>行内公式：质能等价 $E = mc^2$ 和高斯积分 $\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$。</p>
<p>块级公式：</p>
<p>$$
\mathcal{L}<em>{M3E} = \sum</em>{i=1}^{N} \left( \text{Token}_i \cdot \text{ContrastRatio} \right) + \lambda |\text{MotionElegance}|
$$</p>
<hr />
<h2>7. 总结</h2>
<p>MDX 的原生集成使技术作者能够构建丰富的交互式文档，同时保持 Shirone 超快的静态性能。所有组件都遵循 Material 3 Expressive 令牌设计系统，确保一致性、无障碍性和视觉和谐。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>图片画廊网格：语法与完整示例</title>
    <link href="https://fmz.us.ci/posts/image-grid-demo/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/image-grid-demo/</id>
    <published>2026-07-13T00:00:00.000Z</published>
    <updated>2026-07-13T00:00:00.000Z</updated>
    <summary>一份关于图片画廊网格语法、参数、裁剪、响应式行为、标题及灯箱导航的完整指南。</summary>
    <content type="html"><![CDATA[<p><code>:::grid</code> 是博客的图片画廊容器指令。它将普通的 Markdown 图片排列成响应式网格，保持统一的宽高比，并自动启用灯箱浏览功能。适用于文章插图、截图、作品集或小型相册。</p>
<p>同一画廊中的图片使用相同的卡片比例。默认情况下，居中裁剪会填满每张卡片，使每一行保持整齐；点击图片会在灯箱中打开完整的原始图片。每个画廊都有自己的灯箱分组，不会与文章中的其他图片混在一起。</p>
<blockquote>
<p>本文既是功能文档，也是可视化测试页面。请在桌面、平板和手机宽度下查看示例，然后点击任意图片以验证灯箱分组。</p>
</blockquote>
<h2>最小语法</h2>
<p>直接在 <code>:::grid</code> 和闭合的 <code>:::</code> 之间编写 Markdown 图片：</p>
<pre><code>:::grid
![图片描述](./image-1.webp)

![图片描述](./image-2.webp)
:::
</code></pre>
<p>每张图片必须独占一个段落，图片之间用空行分隔。画廊中只保留图片；段落、列表和代码块请写在容器外部。</p>
<p>以下是最小语法的结果。在不带参数的情况下，网格默认使用三列、<code>16/10</code> 比例和 <code>cover</code>。</p>
<p>:::grid
<img src="./landscape-1.webp" alt="最小语法结果：第一张图片" /></p>
<p><img src="./landscape-2.webp" alt="最小语法结果：第二张图片" />
:::</p>
<h2>参数概览</h2>
<p>所有参数写在开始指令后的花括号中：<code>:::grid{参数="值"}</code>。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>允许的值</th>
<th>默认值</th>
<th>用途</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>columns</code></td>
<td>从 <code>1</code> 到 <code>6</code> 的整数</td>
<td><code>3</code></td>
<td>桌面端每行的列数。无效值将回退为 <code>3</code>。</td>
</tr>
<tr>
<td><code>aspect</code></td>
<td>正比例，如 <code>16/9</code>、<code>3/4</code> 或 <code>1/1</code></td>
<td><code>16/10</code></td>
<td>显示的卡片比例，而非原始图片比例。</td>
</tr>
<tr>
<td><code>fit</code></td>
<td><code>cover</code>、<code>contain</code></td>
<td><code>cover</code></td>
<td>图片填充模式。<code>cover</code> 裁剪填充；<code>contain</code> 完整显示图片，可能留有空白。</td>
</tr>
</tbody>
</table>
<p>完整示例：</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="cover"}
![第一张图片](./image-1.webp "可选标题")

![第二张图片](./image-2.webp "可选标题")

![第三张图片](./image-3.webp "可选标题")
:::
</code></pre>
<p>以下结果是使用上述三列横图语法的效果。比较卡片比例、列数，以及标题优先于替代文本作为说明文字的方式：</p>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="./landscape-1.webp" alt="参数示例：第一张横图" title="横图标题 1" /></p>
<p><img src="./landscape-2.webp" alt="参数示例：第二张横图" title="横图标题 2" /></p>
<p><img src="./landscape-3.webp" alt="参数示例：第三张横图" title="横图标题 3" />
:::</p>
<h2>标题与替代文本</h2>
<p>图片的替代文本既可用作无障碍替代文字，也可用作默认标题。当图片带有可选标题时，将使用标题作为说明文字：</p>
<pre><code>![用于无障碍的文字](./image.webp "显示在图片下方的标题")
</code></pre>
<p>在同一行中，标题对齐到每张卡片的底部。换行的标题不会使其他标题浮动在不同的高度。比例文本如 <code>3:4</code> 和 <code>16:9</code> 可以直接写在正文、标题和替代文本中，无需转义。</p>
<p>此示例演示了默认的替代文本标题、显式标题标题，以及较长标题的底部对齐效果：</p>
<p>:::grid{columns="3" aspect="1/1"}
<img src="./square-1.webp" alt="此图片没有标题，因此其替代文本作为标题" /></p>
<p><img src="./square-2.webp" alt="第二张带有无障碍替代文本的方图" title="此标题显示为说明文字" /></p>
<p><img src="./square-3.webp" alt="一张 3:4 海报的无障碍描述" title="这是一个较长的标题，用于检查换行时每个标题是否仍保持对齐到卡片底部" />
:::</p>
<h2>布局与裁剪</h2>
<p>桌面端布局使用 <code>columns</code> 指定的列数。低于 <code>768px</code> 时，网格最多使用两列；低于 <code>480px</code> 时，切换为一列。卡片容器固定 <code>aspect</code> 比例并裁剪圆角，而图片填充卡片时不带主题默认的图片边距。</p>
<ul>
<li>选择 <code>cover</code>：推荐的默认值。图片从中心裁剪以填充卡片，使画廊看起来更一致。</li>
<li>选择 <code>contain</code>：完整显示原始图片，不裁剪。当其比例与卡片不同时，主题背景可见；适用于不能裁剪的图片。</li>
<li>要在不产生空白的情况下完整保留图片，可将 <code>aspect</code> 设置为接近原始图片比例，或将图片单独放在一个网格中。</li>
</ul>
<p>以下示例将相同的竖图分别放入 <code>16/9</code> 卡片中，使用 <code>cover</code> 和 <code>contain</code>。第一个裁剪图片；第二个完整保留图片并留有背景空间。</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="cover"}
![图片描述](./image-1.webp "可选标题")

![图片描述](./image-2.webp "可选标题")
:::

:::grid{columns="3" aspect="16/9" fit="contain"}
![图片描述](./image-1.webp "可选标题")

![图片描述](./image-2.webp "可选标题")
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="./default-portrait-1.webp" alt="第一张 cover 结果" title="Cover：居中裁剪" /></p>
<p><img src="./default-portrait-2.webp" alt="第二张 cover 结果" title="Cover：填充卡片" /></p>
<p><img src="./default-portrait-3.webp" alt="第三张 cover 结果" title="Cover：更一致的布局" />
:::</p>
<p>:::grid{columns="3" aspect="16/9" fit="contain"}
<img src="./default-portrait-1.webp" alt="第一张 contain 结果" title="Contain：完整保留原始图片" /></p>
<p><img src="./default-portrait-2.webp" alt="第二张 contain 结果" title="Contain：可能出现空白" /></p>
<p><img src="./default-portrait-3.webp" alt="第三张 contain 结果" title="Contain：适用于边缘细节" />
:::</p>
<h2>默认配置</h2>
<p>不带属性时，默认为三列、<code>16/10</code> 比例和 <code>cover</code> 裁剪。这三张竖图用于验证默认裁剪和标题。</p>
<pre><code>:::grid
![图片描述](./image-1.webp)

![图片描述](./image-2.webp)

![图片描述](./image-3.webp)
:::
</code></pre>
<p>:::grid
<img src="./default-portrait-1.webp" alt="默认配置：竖图一" /></p>
<p><img src="./default-portrait-2.webp" alt="默认配置：竖图二" /></p>
<p><img src="./default-portrait-3.webp" alt="默认配置：竖图三" />
:::</p>
<h2>三列竖图：3:4</h2>
<p>使用 <code>aspect="3/4"</code> 时，三张竖图一致地填充比例合适的垂直卡片。如果原始图片比例不同，<code>cover</code> 会从中心裁剪其边缘。</p>
<pre><code>:::grid{columns="3" aspect="3/4"}
![竖图描述](./portrait-1.webp)

![竖图描述](./portrait-2.webp)

![竖图描述](./portrait-3.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="3/4"}
<img src="./default-portrait-1.webp" alt="3:4 测试图一" title="竖图 1" /></p>
<p><img src="./default-portrait-2.webp" alt="3:4 测试图二" title="竖图 2" /></p>
<p><img src="./default-portrait-3.webp" alt="3:4 测试图三" title="竖图 3" />
:::</p>
<h2>三列横图：16:9</h2>
<p>此组展示了三列布局中常见的视频封面比例。当横图接近卡片比例时，裁剪最少。</p>
<pre><code>:::grid{columns="3" aspect="16/9"}
![横图描述](./landscape-1.webp)

![横图描述](./landscape-2.webp)

![横图描述](./landscape-3.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9"}
<img src="./feature-landscape-1.webp" alt="16:9 测试图一" /></p>
<p><img src="./feature-landscape-2.webp" alt="16:9 测试图二" /></p>
<p><img src="./feature-landscape-3.webp" alt="16:9 测试图三" />
:::</p>
<h2>两列方图：1:1</h2>
<p>当需要更大的预览卡片时，两列效果很好。第三张图移到下一行。最后一行保持其网格轨道宽度，而不是拉伸图片填满整行。</p>
<pre><code>:::grid{columns="2" aspect="1/1"}
![方图描述](./square-1.webp)

![方图描述](./square-2.webp)

![方图描述](./square-3.webp)
:::
</code></pre>
<p>:::grid{columns="2" aspect="1/1"}
<img src="./mixed-square-1.webp" alt="1:1 测试图一" /></p>
<p><img src="./mixed-square-2.webp" alt="1:1 测试图二" /></p>
<p><img src="./mixed-square-3.webp" alt="1:1 测试图三" />
:::</p>
<h2>四列配合 <code>contain</code></h2>
<p><code>fit="contain"</code> 不裁剪原始图片。当图片比例与卡片比例不同时，主题背景可见。这是有意为之，而非布局问题。同时验证四列网格和独立的灯箱分组不会相互干扰。</p>
<pre><code>:::grid{columns="4" aspect="16/9" fit="contain"}
![图片描述](./image-1.webp)

![图片描述](./image-2.webp)

![图片描述](./image-3.webp)
:::
</code></pre>
<p>:::grid{columns="4" aspect="16/9" fit="contain"}
<img src="./default-portrait-1.webp" alt="Contain：竖图一" /></p>
<p><img src="./default-portrait-2.webp" alt="Contain：竖图二" /></p>
<p><img src="./default-portrait-3.webp" alt="Contain：竖图三" />
:::</p>
<h2>单列详情图</h2>
<p>单列适用于需要更大阅读尺寸的图片。在桌面、平板和手机上始终保持一列，原始图片仍可在灯箱中查看。</p>
<pre><code>:::grid{columns="1" aspect="16/9"}
![图片描述](./detail.webp)
:::
</code></pre>
<p>:::grid{columns="1" aspect="16/9"}
<img src="./feature-landscape-1.webp" alt="单列测试图" />
:::</p>
<h2>稀疏的五列行</h2>
<p>五列验证了较高的列数支持。只有三张图片时，最后一行保持左对齐，而不是拉伸图片。</p>
<pre><code>:::grid{columns="5" aspect="1/1"}
![缩略图描述](./thumb-1.webp)

![缩略图描述](./thumb-2.webp)

![缩略图描述](./thumb-3.webp)
:::
</code></pre>
<p>:::grid{columns="5" aspect="1/1"}
<img src="./mixed-square-1.webp" alt="五列测试图一" /></p>
<p><img src="./mixed-square-2.webp" alt="五列测试图二" /></p>
<p><img src="./mixed-square-3.webp" alt="五列测试图三" />
:::</p>
<h2>六列混合图片</h2>
<p>六列是目前的最大值。混合横图和竖图可验证 <code>cover</code> 裁剪、窄卡片上的标题以及密集的桌面布局。对于可读的文章内容，两到四列通常更合适。</p>
<pre><code>:::grid{columns="6" aspect="1/1"}
![图片描述](./image-1.webp)

![图片描述](./image-2.webp)

![图片描述](./image-3.webp)

![图片描述](./image-4.webp)

![图片描述](./image-5.webp)

![图片描述](./image-6.webp)
:::
</code></pre>
<p>:::grid{columns="6" aspect="1/1"}
<img src="./default-portrait-1.webp" alt="六列测试图一" /></p>
<p><img src="./default-portrait-2.webp" alt="六列测试图二" /></p>
<p><img src="./default-portrait-3.webp" alt="六列测试图三" /></p>
<p><img src="./feature-landscape-1.webp" alt="六列测试图四" /></p>
<p><img src="./feature-landscape-2.webp" alt="六列测试图五" /></p>
<p><img src="./feature-landscape-3.webp" alt="六列测试图六" />
:::</p>
<h2>四列方图：1:1</h2>
<p>四张相同比例方图构成典型的四列布局。桌面端在一行中显示全部四张；平板折叠为两列，手机为一列。</p>
<pre><code>:::grid{columns="4" aspect="1/1"}
![方图描述](./square-1.webp)

![方图描述](./square-2.webp)

![方图描述](./square-3.webp)

![方图描述](./square-4.webp)
:::
</code></pre>
<p>:::grid{columns="4" aspect="1/1"}
<img src="./square-1.webp" alt="方图一" /></p>
<p><img src="./square-2.webp" alt="方图二" /></p>
<p><img src="./square-3.webp" alt="方图三" /></p>
<p><img src="./square-4.webp" alt="方图四" />
:::</p>
<h2>六列横图：16:9</h2>
<p>六列横图适用于缩略图预览、作品集和截图索引。即使原始比例略有不同，<code>cover</code> 也能一致地填充每张 <code>16/9</code> 卡片。</p>
<pre><code>:::grid{columns="6" aspect="16/9"}
![横图描述](./landscape-1.webp)

![横图描述](./landscape-2.webp)

![横图描述](./landscape-3.webp)

![横图描述](./landscape-4.webp)

![横图描述](./landscape-5.webp)

![横图描述](./landscape-6.webp)
:::
</code></pre>
<p>:::grid{columns="6" aspect="16/9"}
<img src="./landscape-1.webp" alt="横图一" /></p>
<p><img src="./landscape-2.webp" alt="横图二" /></p>
<p><img src="./landscape-3.webp" alt="横图三" /></p>
<p><img src="./landscape-4.webp" alt="横图四" /></p>
<p><img src="./landscape-5.webp" alt="横图五" /></p>
<p><img src="./landscape-6.webp" alt="横图六" />
:::</p>
<h2>三列竖图：3:4</h2>
<p>这组六张竖图展示了人物、海报或手机截图的常见布局。图片形成两行三列，标题对齐到底部。</p>
<pre><code>:::grid{columns="3" aspect="3/4"}
![竖图描述](./portrait-1.webp)

![竖图描述](./portrait-2.webp)

![竖图描述](./portrait-3.webp)

![竖图描述](./portrait-4.webp)

![竖图描述](./portrait-5.webp)

![竖图描述](./portrait-6.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="3/4"}
<img src="./portrait-1.webp" alt="竖图一" /></p>
<p><img src="./portrait-2.webp" alt="竖图二" /></p>
<p><img src="./portrait-3.webp" alt="竖图三" /></p>
<p><img src="./portrait-4.webp" alt="竖图四" /></p>
<p><img src="./portrait-5.webp" alt="竖图五" /></p>
<p><img src="./portrait-6.webp" alt="竖图六" />
:::</p>
<h2>边缘关键内容：<code>cover</code> 与灯箱</h2>
<p>这些图片在边缘附近包含重要的文字或细节。<code>cover</code> 使网格保持整洁，但可能裁剪这些边缘；点击图片可在灯箱中查看未裁剪的原始图片。对于边缘敏感图片，请使用清晰的标题，或使用下方的 <code>contain</code>。</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="cover"}
![边缘关键内容](./critical-1.webp "打开灯箱查看完整的边缘内容")

![边缘关键内容](./critical-2.webp "打开灯箱查看完整的边缘内容")

![边缘关键内容](./critical-3.webp "打开灯箱查看完整的边缘内容")
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="./critical-1.webp" alt="第一张边缘关键图片" title="打开灯箱查看完整的边缘内容" /></p>
<p><img src="./critical-2.webp" alt="第二张边缘关键图片" title="打开灯箱查看完整的边缘内容" /></p>
<p><img src="./critical-3.webp" alt="第三张边缘关键图片" title="打开灯箱查看完整的边缘内容" />
:::</p>
<h2>极端比例配合 <code>contain</code></h2>
<p>对于横幅、长截图和其他极端比例的图片，<code>contain</code> 显示完整的原始图片。与 <code>cover</code> 不同，它可能会留出主题背景空间，但从不裁剪内容。</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="contain"}
![完整截图描述](./wide-1.webp)

![完整截图描述](./wide-2.webp)

![完整截图描述](./wide-3.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9" fit="contain"}
<img src="./extreme-1.webp" alt="极端比例图一" /></p>
<p><img src="./extreme-2.webp" alt="极端比例图二" /></p>
<p><img src="./extreme-3.webp" alt="极端比例图三" />
:::</p>
<h2>透明图片</h2>
<p>透明图片会透出卡片的主题背景。此单列 <code>contain</code> 示例便于检查透明区域、原始边缘和灯箱行为。</p>
<pre><code>:::grid{columns="1" aspect="16/9" fit="contain"}
![透明图片描述](./transparent.webp)
:::
</code></pre>
<p>:::grid{columns="1" aspect="16/9" fit="contain"}
<img src="./transparent-1.webp" alt="透明背景测试图" />
:::</p>
<h2>灯箱导航</h2>
<p>点击网格中的任意图片即可打开 Fancybox 灯箱。在灯箱中，您可以缩放、旋转、全屏、查看缩略图，并使用方向键导航。导航仅限于当前 <code>:::grid</code> 容器内：例如，点击“16:9 测试图一”只会打开该部分中的另外两张横图。</p>
<p>同一文章中普通的 Markdown 图片仍会被单独处理；它们不会被添加到任何画廊网格中。</p>
<h2>检查清单</h2>
<ol>
<li>每个网格中的图片具有一致的尺寸，标题位于卡片下方。</li>
<li>悬停时图片轻微缩放；点击后可使用键盘缩放、旋转和导航。</li>
<li>点击“16:9 测试图一”时，灯箱仅浏览该部分中的另外两张横图。</li>
<li>低于 768px 时，网格最多使用两列；低于 480px 时，使用一列。</li>
<li>“四列配合 <code>contain</code>”中的竖图完全可见，留有空白且无裁剪。</li>
<li>五列和六列网格在宽屏上保持指定的列数，然后根据响应式规则折叠为两列或一列。</li>
</ol>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Mermaid 图表画廊</title>
    <link href="https://fmz.us.ci/posts/markdown-mermaid/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/markdown-mermaid/</id>
    <published>2024-05-02T00:00:00.000Z</published>
    <updated>2024-05-02T00:00:00.000Z</updated>
    <summary>一个 Mermaid 图表画廊，涵盖流程、交互、数据模型、日程和项目历史。</summary>
    <content type="html"><![CDATA[<p>Mermaid 能将 Markdown 中的文本描述转换为图表。以下示例使用 Shirone 的内容工作流，演示技术文章和项目笔记中常用的图表类型。</p>
<h2>流程图</h2>
<p>流程图描述一个过程，包括决策以及返回先前步骤的路径。</p>
<pre><code>flowchart TD
    accTitle: Article publishing workflow
    accDescr: An article moves through writing, validation, preview, and build before publication. Failed validation returns it for revision.
    Draft[Write Markdown] --&gt; Check{Validation passed?}
    Check --&gt;|No| Revise[Revise article]
    Revise --&gt; Check
    Check --&gt;|Yes| Preview[Preview locally]
    Preview --&gt; Build[Build static page]
    Build --&gt; Publish[Publish]
</code></pre>
<h2>时序图</h2>
<p>时序图按时间顺序呈现参与者之间的协作。此示例跟踪一次从请求到 Mermaid 渲染的 Swup 导航过程。</p>
<pre><code>sequenceDiagram
    accTitle: Diagram rendering after in-site navigation
    accDescr: A reader starts navigation, Swup replaces the article content, and the Mermaid renderer enhances diagrams on the new page.
    actor Reader
    participant Browser
    participant Swup
    participant Content as Article region
    participant Renderer as Mermaid renderer
    Reader-&gt;&gt;Browser: Open another article
    Browser-&gt;&gt;Swup: Start in-site navigation
    Swup-&gt;&gt;Content: Replace page content
    Swup--&gt;&gt;Renderer: Emit content:replace
    Renderer-&gt;&gt;Content: Find Mermaid containers
    Renderer--&gt;&gt;Browser: Insert themed SVGs
</code></pre>
<h2>实体关系图</h2>
<p>实体关系图对结构化数据以及作者、文章、标签和评论之间的连接进行建模。</p>
<pre><code>erDiagram
    accTitle: Blog content relationships
    accDescr: Authors write posts, posts receive comments, and join records connect posts to multiple tags.
    AUTHOR ||--o{ POST : writes
    POST ||--o{ COMMENT : receives
    POST ||--o{ POST_TAG : classified_by
    TAG ||--o{ POST_TAG : groups
    AUTHOR {
        string id PK
        string display_name
    }
    POST {
        string slug PK
        string title
        datetime published_at
        string author_id FK
    }
    COMMENT {
        string id PK
        string post_slug FK
        string body
    }
    TAG {
        string id PK
        string label
    }
    POST_TAG {
        string post_slug FK
        string tag_id FK
    }
</code></pre>
<h2>类图</h2>
<p>类图传达软件设计中的职责、公共方法和依赖方向。</p>
<pre><code>classDiagram
    accTitle: Markdown rendering modules
    accDescr: The content pipeline uses a Mermaid plugin to create fallback markup, which the client renderer later enhances into an SVG.
    class ContentPipeline {
        +render(markdown)
        +collectMetadata()
    }
    class MermaidPlugin {
        +transform(codeFence)
        +createFallback()
    }
    class DiagramRenderer {
        +initialize()
        +renderAll()
        +refreshTheme()
    }
    class ThemeTokens {
        +primary
        +surface
        +outline
    }
    ContentPipeline --&gt; MermaidPlugin : uses
    DiagramRenderer --&gt; MermaidPlugin : enhances output
    DiagramRenderer --&gt; ThemeTokens : reads
</code></pre>
<h2>状态图</h2>
<p>状态图展示对象的生命周期以及在状态之间移动它的事件。</p>
<pre><code>stateDiagram-v2
    accTitle: Article lifecycle
    accDescr: An article moves from draft to review and publication. It may return for revision or eventually be archived.
    [*] --&gt; Draft
    Draft --&gt; InReview : submit
    InReview --&gt; Draft : request changes
    InReview --&gt; Published : approve
    Published --&gt; Draft : retract
    Published --&gt; Archived : archive
    Archived --&gt; [*]
</code></pre>
<h2>XY 图表</h2>
<p>XY 图表结合条形和折线，在共享轴上比较数值和趋势。</p>
<pre><code>xychart-beta
    accTitle: Six weeks of content performance
    accDescr: Bars show normalized weekly publishing volume, while the line shows normalized reading completion.
    title "Six weeks of content performance"
    x-axis "Week" [1, 2, 3, 4, 5, 6]
    y-axis "Relative score" 0 --&gt; 100
    bar [36, 52, 44, 68, 76, 84]
    line [48, 55, 62, 61, 73, 81]
</code></pre>
<h2>饼图</h2>
<p>饼图以紧凑的方式比较各类别对整体的贡献。</p>
<pre><code>pie showData
    accTitle: Article topics by share
    accDescr: Engineering accounts for forty percent, design systems for twenty-five percent, and the remainder is split between guides and essays.
    title Article topics by share
    "Engineering" : 40
    "Design systems" : 25
    "Guides" : 20
    "Essays" : 15
</code></pre>
<h2>甘特图</h2>
<p>甘特图沿日历时间线排列任务、依赖关系和里程碑。</p>
<pre><code>gantt
    accTitle: Theme release plan
    accDescr: The release plan moves from requirements and interaction design through component development, testing, and release.
    title Theme release plan
    dateFormat YYYY-MM-DD
    axisFormat %m/%d
    section Design
    Confirm requirements :done, brief, 2024-05-06, 2d
    Refine interactions :done, interaction, after brief, 3d
    section Implementation
    Develop components :active, components, after interaction, 6d
    Write examples :examples, after interaction, 4d
    section Validation
    Automated tests :tests, after components, 3d
    Release :milestone, release, after tests, 0d
</code></pre>
<h2>思维导图</h2>
<p>思维导图将中心主题扩展为相关领域和支持性概念。</p>
<pre><code>mindmap
  root((Shirone))
    Content experience
      Markdown
      Search
      Diagrams
    Interface system
      M3E tokens
      Responsive layout
      Color schemes
    Engineering quality
      Astro Check
      Playwright
      Accessibility
</code></pre>
<h2>时间线</h2>
<p>时间线总结重要事件或阶段，而不需要精确的日历时长。</p>
<pre><code>timeline
    title Mermaid support evolution
    Pipeline design : Detect Mermaid fences
                    : Preserve source fallback
    Client enhancement : Load the runtime on demand
                       : Apply theme tokens
    Reliability : Support Swup navigation
                : Verify responsive and accessible output
</code></pre>
<h2>用户旅程图</h2>
<p>用户旅程图结合任务各阶段中的操作、参与者和体验评分。</p>
<pre><code>journey
    accTitle: A reader understanding a technical article
    accDescr: The reader discovers an article, combines prose with diagrams to understand it, and then explores related topics.
    title A reader understanding a technical article
    section Discover
      Browse the article list: 4: Reader
      Choose a topic: 5: Reader
    section Understand
      Read the article: 4: Reader
      Inspect a relationship diagram: 5: Reader
    section Continue
      Open a related article: 4: Reader
      Bookmark the page: 3: Reader
</code></pre>
<h2>Git 图</h2>
<p>Git 图展示在功能分支合并到主线之前，工作是如何推进的。</p>
<pre><code>gitGraph
    accTitle: Mermaid feature branch history
    accDescr: A feature branch adds the renderer and tests before merging into the main branch for release.
    commit id: "base"
    branch mermaid
    checkout mermaid
    commit id: "add-renderer"
    commit id: "add-tests"
    checkout main
    merge mermaid id: "merge-mermaid"
    commit id: "release"
</code></pre>
<h2>看板</h2>
<p>看板按工作流状态对任务进行分组，使当前进度一目了然。</p>
<pre><code>kanban
  backlog[Backlog]
    docs[Write author documentation]
    examples[Expand example data]
  active[In progress]
    themes[Verify theme adaptation]
  complete[Complete]
    fallback[Source fallback]
    rendering[Client rendering]
</code></pre>
<h2>桑基图</h2>
<p>桑基图使用连线宽度展示流量或其他数量在节点之间的流动。</p>
<pre><code>sankey-beta
Landing,Reading,720
Discovery,Reading,430
Reading,Explore,360
Reading,Topics,210
Reading,Outbound,140
</code></pre>
<p>每个示例都使用标准的 <code>mermaid</code> 围栏代码块。服务器保留可读的源标记，浏览器将其增强为跟随当前主题的 SVG。当主题更改或 Swup 导航到本文时，图表会重新渲染。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown 扩展功能</title>
    <link href="https://fmz.us.ci/posts/markdown-extended/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/markdown-extended/</id>
    <published>2024-05-01T00:00:00.000Z</published>
    <updated>2024-11-29T00:00:00.000Z</updated>
    <summary>进一步了解 Fuwari 中的 Markdown 功能。</summary>
    <content type="html"><![CDATA[<h2>GitHub 仓库卡片</h2>
<p>您可以添加链接到 GitHub 仓库的动态卡片，页面加载时，仓库信息会从 GitHub API 获取。</p>
<p>::github{repo="Fabrizz/MMM-OnSpotify"}</p>
<p>使用代码 <code>::github{repo="&lt;owner&gt;/&lt;repo&gt;"}</code> 创建 GitHub 仓库卡片。</p>
<pre><code>::github{repo="saicaca/fuwari"}
</code></pre>
<h2>Mermaid 图表</h2>
<p>围栏 <code>mermaid</code> 代码块会渲染为图表，并跟随当前配色方案。</p>
<pre><code>flowchart LR
    accTitle: Markdown rendering pipeline
    accDescr: Markdown source is transformed into semantic HTML and then enhanced as a themed SVG diagram.
    A[Markdown source] --&gt; B[Astro content pipeline]
    B --&gt; C[Semantic HTML]
    C --&gt; D[Themed diagram]
</code></pre>
<h2>提示块</h2>
<p>支持以下类型的提示块：<code>note</code>、<code>tip</code>、<code>important</code>、<code>warning</code>、<code>caution</code></p>
<p>:::note
突出显示用户即使略读也应注意的信息。
:::</p>
<p>:::tip
提供可选信息，帮助用户更顺利地使用。
:::</p>
<p>:::important
用户成功所必需的关键信息。
:::</p>
<p>:::warning
因潜在风险而需要用户立即关注的严重内容。
:::</p>
<p>:::caution
某个操作可能带来的负面后果。
:::</p>
<h3>基本语法</h3>
<pre><code>:::note
突出显示用户即使略读也应注意的信息。
:::

:::tip
提供可选信息，帮助用户更顺利地使用。
:::
</code></pre>
<h3>自定义标题</h3>
<p>提示块的标题可以自定义。</p>
<p>:::note[我的自定义标题]
这是一个带有自定义标题的笔记。
:::</p>
<pre><code>:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
</code></pre>
<h3>GitHub 语法</h3>
<blockquote>
<p>[!TIP]
<a href="https://github.com/orgs/community/discussions/16925">GitHub 语法</a> 同样受支持。</p>
</blockquote>
<pre><code>&gt; [!NOTE]
&gt; The GitHub syntax is also supported.

&gt; [!TIP]
&gt; The GitHub syntax is also supported.
</code></pre>
<h3>剧透</h3>
<p>您可以在文本中添加剧透内容。该内容也支持 <strong>Markdown</strong> 语法。</p>
<p>内容 :spoiler[是隐藏的 <strong>哎哟</strong>]！</p>
<pre><code>The content :spoiler[is hidden **ayyy**]!

</code></pre>
<h2>图片宽度与标题</h2>
<p>独立图片可以在其替代文本中接受可选的 <code>w-N%</code> 宽度标记，并将 Markdown 标题渲染为图片下方居中的说明文字：</p>
<p><img src="/images/albums/AcgExample/07.webp" alt="专辑示例图片 w-50%" title="带说明文字的半宽图片" /></p>
<pre><code>![Image description w-50%](./image.webp "Visible caption")
</code></pre>
<p>有效宽度范围从 <code>w-1%</code> 到 <code>w-100%</code>；无效标记会保留在替代文本中。宽度和说明文字是独立的——仅提供标题也会生成说明文字：</p>
<p><img src="/images/albums/AcgExample/08.webp" alt="专辑示例图片 w-75%" /></p>
<p><img src="/images/albums/AcgExample/09.webp" alt="专辑示例图片" title="不带宽度标记的说明文字" /></p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Expressive Code 示例</title>
    <link href="https://fmz.us.ci/posts/expressive-code/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/expressive-code/</id>
    <published>2024-04-10T00:00:00.000Z</published>
    <updated>2024-04-10T00:00:00.000Z</updated>
    <summary>使用 Expressive Code 时 Markdown 中代码块的外观。</summary>
    <content type="html"><![CDATA[<p>在这里，我们将探索使用 <a href="https://expressive-code.com/">Expressive Code</a> 时代码块的外观。所提供的示例基于官方文档，您可以参考该文档了解更多细节。</p>
<h2>Expressive Code</h2>
<h3>语法高亮</h3>
<p><a href="https://expressive-code.com/key-features/syntax-highlighting/">语法高亮</a></p>
<h4>常规语法高亮</h4>
<pre><code>console.log('This code is syntax highlighted!')
</code></pre>
<h4>渲染 ANSI 转义序列</h4>
<pre><code>ANSI colors:
- Regular: [31mRed[0m [32mGreen[0m [33mYellow[0m [34mBlue[0m [35mMagenta[0m [36mCyan[0m
- Bold:    [1;31mRed[0m [1;32mGreen[0m [1;33mYellow[0m [1;34mBlue[0m [1;35mMagenta[0m [1;36mCyan[0m
- Dimmed:  [2;31mRed[0m [2;32mGreen[0m [2;33mYellow[0m [2;34mBlue[0m [2;35mMagenta[0m [2;36mCyan[0m

256 colors (showing colors 160-177):
[38;5;160m160 [38;5;161m161 [38;5;162m162 [38;5;163m163 [38;5;164m164 [38;5;165m165[0m
[38;5;166m166 [38;5;167m167 [38;5;168m168 [38;5;169m169 [38;5;170m170 [38;5;171m171[0m
[38;5;172m172 [38;5;173m173 [38;5;174m174 [38;5;175m175 [38;5;176m176 [38;5;177m177[0m

Full RGB colors:
[38;2;34;139;34mForestGreen - RGB(34, 139, 34)[0m

Text formatting: [1mBold[0m [2mDimmed[0m [3mItalic[0m [4mUnderline[0m
</code></pre>
<h3>编辑器与终端框架</h3>
<p><a href="https://expressive-code.com/key-features/frames/">编辑器与终端框架</a></p>
<h4>代码编辑器框架</h4>
<pre><code>console.log('Title attribute example')
</code></pre>
<hr />
<pre><code>&lt;!-- src/content/index.html --&gt;
&lt;div&gt;File name comment example&lt;/div&gt;
</code></pre>
<h4>终端框架</h4>
<pre><code>echo "This terminal frame has no title"
</code></pre>
<hr />
<pre><code>Write-Output "This one has a title!"
</code></pre>
<h4>覆盖框架类型</h4>
<pre><code>echo "Look ma, no frame!"
</code></pre>
<hr />
<pre><code># Without overriding, this would be a terminal frame
function Watch-Tail { Get-Content -Tail 20 -Wait $args }
New-Alias tail Watch-Tail
</code></pre>
<h3>文本与行标记</h3>
<p><a href="https://expressive-code.com/key-features/text-markers/">文本与行标记</a></p>
<h4>标记整行与行范围</h4>
<pre><code>// Line 1 - targeted by line number
// Line 2
// Line 3
// Line 4 - targeted by line number
// Line 5
// Line 6
// Line 7 - targeted by range "7-8"
// Line 8 - targeted by range "7-8"
</code></pre>
<h4>选择行标记类型（mark、ins、del）</h4>
<pre><code>function demo() {
  console.log('this line is marked as deleted')
  // This line and the next one are marked as inserted
  console.log('this is the second inserted line')

  return 'this line uses the neutral default marker type'
}
</code></pre>
<h4>为行标记添加标签</h4>
<pre><code>// labeled-line-markers.jsx
&lt;button
  role="button"
  {...props}
  value={value}
  className={buttonClassName}
  disabled={disabled}
  active={active}
&gt;
  {children &amp;&amp;
    !active &amp;&amp;
    (typeof children === 'string' ? &lt;span&gt;{children}&lt;/span&gt; : children)}
&lt;/button&gt;
</code></pre>
<h4>在单独的行上添加长标签</h4>
<pre><code>// labeled-line-markers.jsx
&lt;button
  role="button"
  {...props}

  value={value}
  className={buttonClassName}

  disabled={disabled}
  active={active}
&gt;

  {children &amp;&amp;
    !active &amp;&amp;
    (typeof children === 'string' ? &lt;span&gt;{children}&lt;/span&gt; : children)}
&lt;/button&gt;
</code></pre>
<h4>使用类似 diff 的语法</h4>
<pre><code>+this line will be marked as inserted
-this line will be marked as deleted
this is a regular line
</code></pre>
<hr />
<pre><code>--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
+this is an actual diff file
-all contents will remain unmodified
 no whitespace will be removed either
</code></pre>
<h4>将语法高亮与类似 diff 的语法结合</h4>
<pre><code>  function thisIsJavaScript() {
    // This entire block gets highlighted as JavaScript,
    // and we can still add diff markers to it!
-   console.log('Old code to be removed')
+   console.log('New and shiny code!')
  }
</code></pre>
<h4>标记行内的单个文本</h4>
<pre><code>function demo() {
  // Mark any given text inside lines
  return 'Multiple matches of the given text are supported';
}
</code></pre>
<h4>正则表达式</h4>
<pre><code>console.log('The words yes and yep will be marked.')
</code></pre>
<h4>转义正斜杠</h4>
<pre><code>echo "Test" &gt; /home/test.txt
</code></pre>
<h4>选择行内标记类型（mark、ins、del）</h4>
<pre><code>function demo() {
  console.log('These are inserted and deleted marker types');
  // The return statement uses the default marker type
  return true;
}
</code></pre>
<h3>自动换行</h3>
<p><a href="https://expressive-code.com/key-features/word-wrap/">自动换行</a></p>
<h4>为每个代码块配置自动换行</h4>
<pre><code>// Example with wrap
function getLongString() {
  return 'This is a very long string that will most probably not fit into the available space unless the container is extremely wide'
}
</code></pre>
<hr />
<pre><code>// Example with wrap=false
function getLongString() {
  return 'This is a very long string that will most probably not fit into the available space unless the container is extremely wide'
}
</code></pre>
<h4>配置换行行的缩进</h4>
<pre><code>// Example with preserveIndent (enabled by default)
function getLongString() {
  return 'This is a very long string that will most probably not fit into the available space unless the container is extremely wide'
}
</code></pre>
<hr />
<pre><code>// Example with preserveIndent=false
function getLongString() {
  return 'This is a very long string that will most probably not fit into the available space unless the container is extremely wide'
}
</code></pre>
<h2>可折叠区域</h2>
<p><a href="https://expressive-code.com/plugins/collapsible-sections/">可折叠区域</a></p>
<pre><code>// All this boilerplate setup code will be collapsed
import { someBoilerplateEngine } from '@example/some-boilerplate'
import { evenMoreBoilerplate } from '@example/even-more-boilerplate'

const engine = someBoilerplateEngine(evenMoreBoilerplate())

// This part of the code will be visible by default
engine.doSomething(1, 2, 3, calcFn)

function calcFn() {
  // You can have multiple collapsed sections
  const a = 1
  const b = 2
  const c = a + b

  // This will remain visible
  console.log(`Calculation result: ${a} + ${b} = ${c}`)
  return c
}

// All this code until the end of the block will be collapsed again
engine.closeConnection()
engine.freeMemory()
engine.shutdown({ reason: 'End of example boilerplate code' })
</code></pre>
<h2>行号</h2>
<p><a href="https://expressive-code.com/plugins/line-numbers/">行号</a></p>
<h3>为每个代码块显示行号</h3>
<pre><code>// This code block will show line numbers
console.log('Greetings from line 2!')
console.log('I am on line 3')
</code></pre>
<hr />
<pre><code>// Line numbers are disabled for this block
console.log('Hello?')
console.log('Sorry, do you know what line I am on?')
</code></pre>
<h3>更改起始行号</h3>
<pre><code>console.log('Greetings from line 5!')
console.log('I am on line 6')
</code></pre>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown 示例</title>
    <link href="https://fmz.us.ci/posts/markdown/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/markdown/</id>
    <published>2023-10-01T00:00:00.000Z</published>
    <updated>2023-10-01T00:00:00.000Z</updated>
    <summary>一篇简单的 Markdown 博客文章示例。</summary>
    <content type="html"><![CDATA[<h1>一个 h1 标题</h1>
<p>段落之间用空行分隔。</p>
<p>第二段。<em>斜体</em>、<strong>粗体</strong>和 <code>等宽字体</code>。逐项列表看起来像这样：</p>
<ul>
<li>这一项</li>
<li>那一项</li>
<li>另一项</li>
</ul>
<p>请注意——不考虑星号——实际文本内容从第 4 列开始。</p>
<blockquote>
<p>引用是这样
写的。</p>
<p>如果你愿意，它们可以
跨越多个段落。</p>
</blockquote>
<p>使用 3 个短横线表示破折号。使用 2 个短横线表示范围（例如，“it's all in chapters 12--14”）。三个点 ... 会被转换为省略号。支持 Unicode。☺</p>
<h2>一个 h2 标题</h2>
<p>这是一个编号列表：</p>
<ol>
<li>第一项</li>
<li>第二项</li>
<li>第三项</li>
</ol>
<p>再次注意实际文本是如何从第 4 列开始的（距离左侧 4 个字符）。这是一个代码示例：</p>
<pre><code># Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
</code></pre>
<p>如你所料，缩进了 4 个空格。顺便说一下，除了缩进代码块，如果你愿意，也可以使用分隔块：</p>
<pre><code>define foobar() {
    print "Welcome to flavor country!";
}
</code></pre>
<p>（这样复制粘贴更容易）。你可以选择性地标记分隔块，让 Pandoc 对其进行语法高亮：</p>
<pre><code>import time
# Quick, count to ten!
for i in range(10):
    # (but not *too* quick)
    time.sleep(0.5)
    print i
</code></pre>
<h3>一个 h3 标题</h3>
<p>现在是一个嵌套列表：</p>
<ol>
<li>
<p>首先，准备这些食材：</p>
<ul>
<li>胡萝卜</li>
<li>芹菜</li>
<li>扁豆</li>
</ul>
</li>
<li>
<p>煮一些水。</p>
</li>
<li>
<p>把所有东西倒进锅里，然后按照
这个算法操作：</p>
<pre><code> find wooden spoon
 uncover pot
 stir
 cover pot
 balance wooden spoon precariously on pot handle
 wait 10 minutes
 goto first step (or shut off burner when done)
</code></pre>
<p>不要碰到木勺，否则它会掉下来。</p>
</li>
</ol>
<p>再次注意文本总是对齐在 4 空格缩进处（包括延续上面第 3 项的最后一行）。</p>
<p>这里有一个<a href="http://foo.bar">网站</a>的链接、一个<a href="local-doc.html">本地文档</a>的链接，以及一个指向<a href="#an-h2-header">当前文档中某个章节标题</a>的链接。这里有一个脚注 <a href="%E8%84%9A%E6%B3%A8%E6%96%87%E6%9C%AC%E6%94%BE%E5%9C%A8%E8%BF%99%E9%87%8C%E3%80%82">^1</a>。</p>
<p>表格可以看起来像这样：</p>
<p>size material color</p>
<hr />
<p>9 leather brown
10 hemp canvas natural
11 glass transparent</p>
<p>Table: Shoes, their sizes, and what they're made of</p>
<p>（以上是表格的标题。）Pandoc 也支持多行表格：</p>
<hr />
<p>keyword text</p>
<hr />
<p>red Sunsets, apples, and
other red or reddish
things.</p>
<p>green Leaves, grass, frogs
and other things it's
not easy being.</p>
<hr />
<p>接下来是一条水平分隔线。</p>
<hr />
<p>这是一个定义列表：</p>
<p>apples
: 适合做苹果酱。
oranges
: 柑橘！
tomatoes
: tomatoe 里没有“e”。</p>
<p>再次说明，文本缩进了 4 个空格。（在每个术语/定义对之间放一个空行，可以让内容更分散。）</p>
<p>这是一个“行块”：</p>
<p>| Line one
| Line too
| Line tree</p>
<p>图片可以这样指定：</p>
<p>行内数学公式这样写：$\omega = d\phi / dt$。展示数学公式应单独占一行，并放在双美元符号中：</p>
<p>$$I = \int \rho R^{2} dV$$</p>
<p>$$
\begin{equation*}
\pi
=3.1415926535
;8979323846;2643383279;5028841971;6939937510;5820974944
;5923078164;0628620899;8628034825;3421170679;\ldots
\end{equation*}
$$</p>
<p>另外请注意，你可以用反斜杠转义任何你希望按字面显示的标点字符，例如：`foo`、*bar* 等。</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>在文章中嵌入视频</title>
    <link href="https://fmz.us.ci/posts/video/" rel="alternate" type="text/html"/>
    <id>https://fmz.us.ci/posts/video/</id>
    <published>2023-08-01T00:00:00.000Z</published>
    <updated>2023-08-01T00:00:00.000Z</updated>
    <summary>本文演示如何在博客文章中嵌入视频。</summary>
    <content type="html"><![CDATA[<p>只需从 YouTube 或其他平台复制嵌入代码，然后粘贴到 Markdown 文件中即可。</p>
<pre><code>---
title: Include Video in the Post
published: 2023-10-19
// ...
---

&lt;iframe width="100%" height="468" src="https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_" title="YouTube video player" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</code></pre>
<h2>YouTube</h2>
<p>::youtube{id="5gIf0_xpFPI" title="YouTube video" preload="auto"}</p>
<h2>Bilibili</h2>
<p>::bilibili{bvid="BV1fK4y1s7Qf" title="Bilibili video" p=1 preload="auto"}</p>
<h2>AcFun</h2>
<p>::acfun{acid="ac48649632" title="AcFun video" preload="auto"}</p>
<h2>ArtPlayer</h2>
<p>::artplayer{src="https://www.pexels.com/download/video/38538991/" title="Sintel trailer" preload="auto"}</p>
]]></content>
    <author><name>Fishing_MZ</name></author>
    <category term="Examples"/>
  </entry>
</feed>
