<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh_CN">
  <title>星痕的Blog</title>
  <subtitle>一个建立于21世纪的Blog，存活于互联网的边缘。</subtitle>
  <link href="https://xn--kivr36a.1qw.top/" rel="alternate" type="text/html"/>
  <link href="https://xn--kivr36a.1qw.top/atom.xml" rel="self" type="application/atom+xml"/>
  <id>https://xn--kivr36a.1qw.top/</id>
  <updated>2026-08-29T00:00:00.000Z</updated>
  <entry>
    <title>Shirone Authoring &amp; Usage Guide</title>
    <link href="https://xn--kivr36a.1qw.top/posts/guide/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/guide/</id>
    <published>2026-08-26T00:00:00.000Z</published>
    <updated>2026-08-26T00:00:00.000Z</updated>
    <summary>A comprehensive guide to post authoring, frontmatter schema, Markdown extensions, encryption, and media in Shirone.</summary>
    <content type="html"><![CDATA[<p>Welcome to <strong>Shirone</strong> (白音) — an expressive, anime-inspired blog theme crafted around <strong>Astro 7</strong>, <strong>Svelte 5</strong>, and the <strong>Material 3 Expressive (M3E)</strong> design system.</p>
<p>This guide walks you through post creation, frontmatter specifications, directory structure, and the full suite of built-in Markdown and MDX extensions.</p>
<p>:::tip
Shirone renders content server-side first (SSR-first). When navigating within the site, Swup seamlessly swaps the main container while preserving the outer application shell and continuous music playback.
:::</p>
<hr />
<h2>1. Creating a New Post</h2>
<p>You can quickly scaffold a new post with standard frontmatter using the built-in CLI command:</p>
<pre><code># Create a single-file post
pnpm new-post my-first-post

# Or create a post in a sub-directory
pnpm new-post guides/getting-started
</code></pre>
<p>The newly created file will be placed in <code>src/content/posts/</code>.</p>
<hr />
<h2>2. Frontmatter Specification</h2>
<p>Every Markdown (<code>.md</code>) or MDX (<code>.mdx</code>) post starts with a YAML frontmatter block defining its metadata.</p>
<h3>Example</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>Supported Frontmatter Fields</h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>title</code></td>
<td><code>string</code></td>
<td><strong>Yes</strong></td>
<td>The main title of the post.</td>
</tr>
<tr>
<td><code>published</code></td>
<td><code>Date</code></td>
<td><strong>Yes</strong></td>
<td>Publication date in <code>YYYY-MM-DD</code> format.</td>
</tr>
<tr>
<td><code>publishedAt</code></td>
<td><code>Date</code></td>
<td>No</td>
<td>Precise publication instant used to order posts published on the same day. It must fall on <code>published</code> in the configured site time zone.</td>
</tr>
<tr>
<td><code>updated</code></td>
<td><code>Date</code></td>
<td>No</td>
<td>Last updated date. When provided, an update notice badge is displayed.</td>
</tr>
<tr>
<td><code>updatedAt</code></td>
<td><code>Date</code></td>
<td>No</td>
<td>Precise update instant used by feeds and machine-readable metadata. It must be paired with <code>updated</code>.</td>
</tr>
<tr>
<td><code>pinned</code></td>
<td><code>boolean</code></td>
<td>No</td>
<td>Pin the post to the top of article lists (default: <code>false</code>).</td>
</tr>
<tr>
<td><code>description</code></td>
<td><code>string</code></td>
<td>No</td>
<td>Post summary displayed in article cards, search results, and OpenGraph metadata.</td>
</tr>
<tr>
<td><code>image</code></td>
<td><code>string</code></td>
<td>No</td>
<td>Cover image path. Supports relative (<code>./cover.webp</code>), public (<code>/images/cover.jpg</code>), or remote URLs.</td>
</tr>
<tr>
<td><code>tags</code></td>
<td><code>string[]</code></td>
<td>No</td>
<td>Array of tag names for taxonomy filtering and tag clouds.</td>
</tr>
<tr>
<td><code>category</code></td>
<td><code>string</code></td>
<td>No</td>
<td>Primary category name for taxonomy indexing.</td>
</tr>
<tr>
<td><code>draft</code></td>
<td><code>boolean</code></td>
<td>No</td>
<td>Mark as draft. Draft posts are hidden during production build (<code>pnpm build</code>).</td>
</tr>
<tr>
<td><code>comment</code></td>
<td><code>boolean</code></td>
<td>No</td>
<td>Toggle comment section for this specific post (default: <code>true</code>).</td>
</tr>
<tr>
<td><code>lang</code></td>
<td><code>string</code></td>
<td>No</td>
<td>Language code (e.g. <code>en</code>, <code>zh_CN</code>, <code>ja</code>) if different from site default.</td>
</tr>
</tbody>
</table>
<hr />
<h2>3. Post Encryption</h2>
<p>Shirone provides client-side post encryption. For private journals or restricted articles, specify a password in frontmatter:</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>: Set to <code>true</code> to enable encryption;</li>
<li><code>password</code>: Passphrase string or number required to unlock the post;</li>
<li><code>passwordHint</code>: Optional hint shown above the password entry form;</li>
<li><code>hideHomeContent</code>: Hide word counts and content previews on the homepage to prevent data leakage.</li>
</ul>
<hr />
<h2>4. Organizing Post Files</h2>
<p>Shirone supports both folder-based co-location and single-file layouts:</p>
<h3>Folder Structure (Recommended for Local Assets)</h3>
<p>Co-locating your post and its media makes asset management straightforward:</p>
<pre><code>src/content/posts/
├── my-great-post/
│   ├── index.md           &lt;-- Post content
│   ├── cover.webp         &lt;-- Cover image (image: "./cover.webp")
│   └── diagram.png        &lt;-- Inline illustration referenced in markdown
</code></pre>
<h3>Single-File Structure (Lightweight Prose)</h3>
<pre><code>src/content/posts/
├── hello-world.md
└── quick-thoughts.md
</code></pre>
<hr />
<h2>5. Rich Markdown &amp; MDX Extensions</h2>
<p>Shirone includes modern Markdown extensions out of the box:</p>
<h3>5.1 Admonitions</h3>
<p>Use container directives for notes, tips, warnings, and alerts:</p>
<pre><code>:::tip
Use admonition containers to highlight key takeaways or best practices.
:::

:::warning
Use warning containers to signal potential pitfalls or breaking changes.
:::
</code></pre>
<h3>5.2 GitHub Repository Cards</h3>
<p>Embed live, beautifully styled GitHub repository cards using the directive syntax:</p>
<pre><code>::github{repo="LyraVoid/Shirone"}
</code></pre>
<p>::github{repo="LyraVoid/Shirone"}</p>
<h3>5.3 Expressive Code Blocks</h3>
<p>Enhanced code blocks feature syntax highlighting, file name badges, line numbers, and selective line highlighting:</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 Mathematical Typesetting (KaTeX)</h3>
<p>Render elegant LaTeX mathematical notation directly in Markdown:</p>
<ul>
<li><strong>Inline math</strong>: $E = mc^2$ or Euler's formula $e^{i\pi} + 1 = 0$.</li>
<li><strong>Block math</strong>:</li>
</ul>
<p>$$
\int_{-\infty}^{\infty} e^{-x^2} , dx = \sqrt{\pi}
$$</p>
<h3>5.5 Mermaid Diagrams</h3>
<p>Create flowcharts, sequence diagrams, and architecture maps using plain text:</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 Image Galleries &amp; Fancybox Lightbox</h3>
<p>Images automatically integrate with Fancybox for lossless zoom, pan gestures, and full-screen preview:</p>
<pre><code>![Cover preview](./cover.jpeg)
</code></pre>
<hr />
<h2>6. Next Steps &amp; Customization</h2>
<ul>
<li><strong>Site Configuration</strong>: Learn about global settings in <code>src/config/siteConfig.ts</code> and <a href="/about/"><code>src/config/README.md</code></a>.</li>
<li><strong>Design Tokens</strong>: Explore tokens and color palettes in <code>DESIGN.md</code> and <code>docs/m3e-standard.md</code>.</li>
<li><strong>Feedback &amp; Community</strong>: Share your ideas and questions on <a href="https://github.com/LyraVoid/Shirone/issues">GitHub Issues</a>.</li>
</ul>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>🔒 Password Protection and Post Encryption Demo</title>
    <link href="https://xn--kivr36a.1qw.top/posts/encrypted-demo/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/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>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Shirone Markdown Enhancements</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-enhancements/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-enhancements/</id>
    <published>2026-08-19T00:00:00.000Z</published>
    <updated>2026-08-19T00:00:00.000Z</updated>
    <summary>Explore Shirone&apos;s custom Markdown extensions, expressive components, and authoring syntax.</summary>
    <content type="html"><![CDATA[<p>Shirone provides a collection of theme-exclusive Markdown extensions and custom syntax containers. Built on top of our native unified AST processing pipeline, all extensions render into accessible, semantic HTML during site build time with <strong>zero client JavaScript hydration overhead</strong> and <strong>100% M3E design token alignment</strong>.</p>
<h2>File Trees</h2>
<p>File Trees turn multi-level project structures, source hierarchies, and terminal directory outputs into compact, interactive tree views with automatic extension icons, diff highlighting, and collapsible branches.</p>
<h3>1. Nested List Syntax (<code>:::file-tree</code>)</h3>
<p>Use the <code>:::file-tree</code> block directive when writing the file hierarchy directly as a Markdown nested list.</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 source tree"}</p>
<ul>
<li>src
<ul>
<li>components/
<ul>
<li>++ Navigation.svelte # added component</li>
<li>-- Button.astro # removed component</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> # important file</li>
</ul>
</li>
<li>public/
<ul>
<li>favicon.svg</li>
</ul>
</li>
<li>package.json
:::</li>
</ul>
<h4>Authoring Rules &amp; Markers</h4>
<ul>
<li><strong>Diff States</strong>: Prefix an item with <code>++</code> (green background &amp; badge) or <code>--</code> (red background &amp; strikethrough) to highlight changes.</li>
<li><strong>Comments</strong>: Any text following a <code>#</code> is rendered as a muted, right-aligned inline comment.</li>
<li><strong>Emphasis</strong>: Wrap names in <code>**bold**</code> to give key files prominent visual weight.</li>
<li><strong>Collapsible Folders</strong>: Directories inferred from nested list items start expanded by default. Add a trailing slash (e.g. <code>components/</code>) to create a collapsed directory that readers can expand on click or via keyboard navigation.</li>
</ul>
<hr />
<h3>2. Terminal Output Syntax (<code>```file-tree</code>)</h3>
<p>When you already have directory tree text generated from command-line tools like <code>tree</code>, paste it directly into a <code>file-tree</code> fenced code block. Both Unicode branch characters (<code>├──</code>, <code>└──</code>, <code>│</code>) and ASCII branches are automatically parsed.</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>Configuration Options</h4>
<ul>
<li><code>title="string"</code>: Sets a custom header title and accessible label for the tree.</li>
<li><code>icon="colored" | "simple"</code>: Choose between multi-color extension icons (<code>colored</code>, default) or minimal monochrome icons (<code>simple</code>).</li>
</ul>
<hr />
<h2>Code Trees</h2>
<p>Interactive Code Trees pair a multi-level file hierarchy navigation pane on the left with instant code panel switching on the right. They provide an IDE-like reading experience for multi-file examples, modules, or whole directory walk-throughs.</p>
<h3>1. Container Syntax (<code>:::code-tree</code>)</h3>
<p>Combine multiple fenced code blocks within a <code>:::code-tree</code> block directive. Each code block specifies its path via <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 Component Demo" 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>Configuration &amp; Markers</h4>
<ul>
<li><code>title="string"</code>: Sets the header title and accessible label for the code tree.</li>
<li><code>height="string"</code>: Sets the height for the desktop view (default <code>420px</code>, e.g. <code>380px</code>, <code>26rem</code>).</li>
<li><code>entry="filepath"</code>: Specifies which file is active upon first load.</li>
<li><code>icon="colored" | "simple"</code>: Switch between colorful or minimal monochrome file icons.</li>
<li><code>:active</code>: Place <code>:active</code> on any fenced code block to designate it as the default active tab.</li>
</ul>
<hr />
<h3>2. Local Directory Auto-Import (<code>@[code-tree]</code>)</h3>
<p>Point directly to any local directory path in the workspace to automatically scan and generate an interactive code tree at build time without manually copying file contents.</p>
<pre><code>@[code-tree title="Anime Utilities" entry="status.ts"](/src/utils/anime)
</code></pre>
<p>@<a href="/src/config">code-tree title="Site Configuration" entry="siteConfig.ts"</a></p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Audio Reader: Japanese Anime Mystery Voices</title>
    <link href="https://xn--kivr36a.1qw.top/posts/audio-reader/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/audio-reader/</id>
    <published>2026-08-29T00:00:00.000Z</published>
    <updated>2026-08-29T00:00:00.000Z</updated>
    <summary>A small collection of mysterious Japanese anime voice fragments, played on demand with Audio Reader.</summary>
    <content type="html"><![CDATA[<p>These short Japanese voice fragments feel as though they were picked up from the edge of an anime scene: a teasing call, a bright greeting, a tiny laugh, and a few lines with no clear origin. They are mood samples rather than dialogue transcripts, so let the sound carry the meaning.</p>
<p>Audio Reader keeps them quiet until you choose to listen. Each speaker button loads and plays its clip only after it is pressed.</p>
<pre><code>:audio-reader[Clip title]{src="/assets/audio/filename.wav"}
</code></pre>
<h2>The fragments</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[A joking sense]{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> must use a site-root path or an HTTPS URL, and the directive label cannot be empty. Invalid or incomplete directives remain ordinary Markdown and do not load Audio Reader resources.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown Collapse Panels</title>
    <link href="https://xn--kivr36a.1qw.top/posts/collapse-panels/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/collapse-panels/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>Group optional Markdown content into compact, accessible M3E disclosure panels.</summary>
    <content type="html"><![CDATA[<p>Collapse panels keep related optional details in one compact group. Titles and bodies retain inline and block Markdown, while native disclosure semantics make every panel usable without client JavaScript.</p>
<h2>Independent panels</h2>
<p>Items open independently by default. Prefix a title with <code>:+</code> to open that item initially or <code>:-</code> to keep it closed when the group uses <code>expand</code>.</p>
<p>::: collapse</p>
<ul>
<li>
<p><strong>Package requirements</strong></p>
<p>Use Node.js 22 or newer and enable Corepack before installing packages.</p>
</li>
<li>
<p>:+ Install dependencies</p>
<p>Run the workspace package command from the repository root.</p>
<pre><code>pnpm.cmd install
</code></pre>
</li>
<li>
<p>Validation commands</p>
<p>Check the content pipeline before building the production output.</p>
<ul>
<li><code>pnpm.cmd check:manifest</code></li>
<li><code>npx.cmd astro check</code>
:::</li>
</ul>
</li>
</ul>
<h2>Accordion mode</h2>
<p>Add <code>accordion</code> when only one answer should remain open. The browser groups the native disclosures directly, so opening another item closes the previous one without hydration.</p>
<p>::: collapse accordion expand</p>
<ul>
<li>
<p>What does <code>expand</code> do here?</p>
<p>It opens the first item initially when no item has a <code>:+</code> marker.</p>
</li>
<li>
<p>Can a title contain Markdown?</p>
<p>Yes. Titles support inline <strong>emphasis</strong> and <code>code</code>, while panel bodies support full block Markdown.</p>
</li>
<li>
<p>What happens on a narrow screen?</p>
<p>Content padding becomes compact, long text wraps, and embedded code keeps its own horizontal scrolling area.
:::</p>
</li>
</ul>
<h2>Author syntax</h2>
<pre><code>::: collapse accordion
- :+ First title

  First panel content.

- Second title with `code`

  Second panel content.
:::
</code></pre>
<p>The container must contain exactly one top-level unordered list. Every item needs a title paragraph, a blank line, and body content. Invalid or mixed input remains an ordinary readable Markdown list.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Abbreviations</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-abbreviations/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-abbreviations/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>Define common acronyms once and keep their full meaning available in normal article text.</summary>
    <content type="html"><![CDATA[<p>Abbreviations keep technical writing compact while preserving the full term for readers who need it. A defined term renders as a native <code>abbr</code> element with its meaning available on hover and to assistive technology.</p>
<h2>In context</h2>
<p>SSR-first output keeps the initial document visible before JavaScript runs. When measuring its reading experience, LCP and CLS reveal whether the first visible content is fast and stable.</p>
<p>An abbreviation can also appear next to ordinary Markdown such as <strong>SSR</strong> guidance, but literal code such as <code>SSR</code> and links like <a href="https://web.dev/articles/lcp">LCP documentation</a> remain untouched.</p>
<h2>Define terms</h2>
<p>Place definitions anywhere in the same Markdown document. They do not render as visible paragraphs, and only matching terms in that article receive the semantic abbreviation treatment.</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>Authoring boundaries</h2>
<p>Terms must begin with a letter or number and may contain letters, numbers, periods, underscores, plus signs, and hyphens. Each definition applies to the current article only; an invalid or duplicate definition remains ordinary Markdown instead of silently replacing another term.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown File Includes</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-includes/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-includes/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>Build-time Markdown file and slice includes.</summary>
    <content type="html"><![CDATA[<p>Shirone can include a local Markdown file or a safe slice of one.</p>
<p>&lt;!-- @include: src/content/snippets/include-example.md#public-api --&gt;</p>
<p>The full file and line-range forms are also supported:</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>Include comments inside fenced code remain literal.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Marker Highlights</title>
    <link href="https://xn--kivr36a.1qw.top/posts/marker-highlights/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/marker-highlights/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>Highlight key phrases with token-driven marker syntax in Shirone Markdown.</summary>
    <content type="html"><![CDATA[<p>Marker highlights bring attention to a specific phrase without turning the surrounding paragraph into a separate component. They render as native <code>&lt;mark&gt;</code> elements during the build and inherit the active M3E color system.</p>
<h2>Default emphasis</h2>
<p>Use <code>==text==</code> when the article's primary color should carry the emphasis. This is useful for ==one decision that readers should retain== while they continue through an ordinary paragraph.</p>
<p>The marker may contain ==nested <strong>Markdown emphasis</strong>== when the phrase needs a stronger hierarchy.</p>
<h2>Semantic colors</h2>
<p>Use a suffix when the meaning needs a different tonal role. The available variants are <code>primary</code>, <code>secondary</code>, <code>tertiary</code>, <code>error</code>, and <code>tip</code>.</p>
<ul>
<li>==Primary connects the phrase to the active theme=={.primary}</li>
<li>==Secondary keeps a supporting distinction quiet=={.secondary}</li>
<li>==Tertiary adds a separate editorial signal=={.tertiary}</li>
<li>==Error identifies a condition that needs correction=={.error}</li>
<li>==Tip highlights practical guidance=={.tip}</li>
</ul>
<h2>Author syntax</h2>
<pre><code>==Primary marker==

==Secondary marker=={.secondary}
==Tertiary marker=={.tertiary}
==Error marker=={.error}
==Tip marker=={.tip}
</code></pre>
<p>Inline code such as <code>==literal marker syntax==</code> and fenced examples stay literal, so documentation can explain the syntax without triggering it.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Option Groups</title>
    <link href="https://xn--kivr36a.1qw.top/posts/option-groups/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/option-groups/</id>
    <published>2026-08-28T00:00:00.000Z</published>
    <updated>2026-08-28T00:00:00.000Z</updated>
    <summary>Present related Markdown alternatives in compact, synchronized M3E option groups.</summary>
    <content type="html"><![CDATA[<p>Option groups keep equivalent instructions together without repeating the surrounding explanation. Each option accepts full block Markdown, while the selected value can synchronize with another group on the same page.</p>
<h2>Choose a package manager</h2>
<p>Use <code>@tab:active</code> to select the initial option. A suffix after <code>#</code> supplies a stable value without changing the visible title.</p>
<p>::: tabs#package-manager</p>
<p>@tab npm</p>
<p>Install the package with npm:</p>
<pre><code>npm install astro
</code></pre>
<p>@tab:active <strong>pnpm</strong>#pnpm</p>
<p>Install the package with pnpm:</p>
<pre><code>pnpm.cmd add astro
</code></pre>
<p>@tab Bun#bun</p>
<p>Install the package with Bun:</p>
<pre><code>bun add astro
</code></pre>
<p>:::</p>
<h2>Run the project</h2>
<p>This group shares the <code>package-manager</code> id. Selecting an option above updates the matching command below and remembers that choice for the next visit.</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>Many alternatives</h2>
<p>Longer option rows remain on one line and scroll within their own navigation area on narrow screens.</p>
<p>::: tabs</p>
<p>@tab Local workstation</p>
<p>Use the local toolchain while developing a feature.</p>
<p>@tab Hosted preview environment</p>
<p>Publish a temporary preview for review.</p>
<p>@tab Continuous integration</p>
<p>Run deterministic validation for every change.</p>
<p>@tab Production deployment</p>
<p>Promote a verified artifact to production.</p>
<p>@tab Offline recovery workflow</p>
<p>Restore from a local artifact when the network is unavailable.</p>
<p>:::</p>
<h2>Author syntax</h2>
<pre><code>::: tabs#package-manager

@tab npm

Use npm instructions here.

@tab:active **pnpm**#pnpm

Use pnpm instructions here.

:::
</code></pre>
<p>Each group needs at least two <code>@tab</code> sections, and every section needs body content separated from its marker by a blank line. Invalid or incomplete groups remain readable as ordinary Markdown.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Spoilers</title>
    <link href="https://xn--kivr36a.1qw.top/posts/spoilers/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/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>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Admonitions</title>
    <link href="https://xn--kivr36a.1qw.top/posts/admonitions/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/admonitions/</id>
    <published>2026-08-27T00:00:00.000Z</published>
    <updated>2026-08-27T00:00:00.000Z</updated>
    <summary>Present notes, warnings, and optional details with Shirone&apos;s M3E Markdown containers.</summary>
    <content type="html"><![CDATA[<p>Admonitions keep supporting information visually distinct while preserving the article's reading flow. Every form is rendered on the server and uses the same compact M3E component.</p>
<h2>Semantic variants</h2>
<p>::: note Deployment context
The spaced form accepts a plain custom title while remaining compatible with the reference syntax.
:::</p>
<p>:::info
Use information blocks for neutral context that helps readers understand the surrounding section.
:::</p>
<p>:::tip[Existing <strong>label</strong> syntax]
The original bracket label remains available and can contain inline Markdown emphasis.
:::</p>
<blockquote>
<p>[!IMPORTANT]
GitHub Alert syntax enters the same renderer, so existing articles keep one visual language.</p>
</blockquote>
<p>:::warning
Check environment variables before running a production build.
:::</p>
<p>:::caution
Do not publish credentials, local configuration, or private keys with an example.
:::</p>
<h2>Optional details</h2>
<p>::: details Inspect the complete command
The disclosure uses native browser semantics and remains keyboard accessible without client JavaScript.</p>
<pre><code>npx.cmd astro check
pnpm.cmd build
</code></pre>
<ul>
<li>It starts closed.</li>
<li>Long code can scroll inside its own code block.</li>
<li>The container remains within the article width on narrow screens.
:::</li>
</ul>
<h2>Author syntax</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>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Content Annotations</title>
    <link href="https://xn--kivr36a.1qw.top/posts/content-annotations/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/content-annotations/</id>
    <published>2026-08-27T00:00:00.000Z</published>
    <updated>2026-08-27T00:00:00.000Z</updated>
    <summary>Add compact, accessible supporting notes to Shirone articles without interrupting the reading flow.</summary>
    <content type="html"><![CDATA[<p>Content annotations keep supporting context close to a sentence without placing it directly in the reading flow. Activate the small note marker to reveal its content.</p>
<h2>Basic syntax</h2>
<p>Add a <code>[+label]</code> reference in ordinary prose, then define the matching note elsewhere in the same article.</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 renders most of a page ahead of time and hydrates <strong>interactive islands</strong> [+islands] only when they need to become interactive.</p>
<p>[+islands]:
An island is an interactive UI component surrounded by static HTML. This keeps the default page lightweight while preserving focused interactivity.</p>
<h2>Rich content</h2>
<p>Definitions may contain paragraphs, emphasis, links, lists, and inline code [+rich-note] while the surrounding sentence continues normally.</p>
<p>[+rich-note]:
<strong>Authoring guidance</strong></p>
<ul>
<li>Keep the first sentence self-contained.</li>
<li>Use a link when readers may need the primary source.</li>
<li>Prefer concise examples such as <code>client:visible</code>.</li>
</ul>
<p>See the <a href="https://docs.astro.build/en/concepts/islands/">Astro islands documentation</a> for the full model.</p>
<h2>Multiple definitions</h2>
<p>Reuse a label [+review] to present a short sequence of related notes behind one marker.</p>
<p>[+review]: Start with the decision that changes the reader's next action.
[+review]: Keep implementation evidence separate from background context.
[+review]: Remove details that belong in the main article instead of the annotation.</p>
<p>Undefined references such as <code>[+missing]</code> remain ordinary text, so an unfinished definition never creates an empty control.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Markdown Steps</title>
    <link href="https://xn--kivr36a.1qw.top/posts/steps/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/steps/</id>
    <published>2026-08-27T00:00:00.000Z</published>
    <updated>2026-08-27T00:00:00.000Z</updated>
    <summary>Present sequential instructions as a compact, accessible step flow in Shirone.</summary>
    <content type="html"><![CDATA[<p>Use Steps for procedures whose order matters. The component keeps the article reading flow intact: a quiet numbered rail provides orientation while headings, paragraphs, links, lists, and code retain their native Markdown roles.</p>
<h2>Ordered list syntax</h2>
<p>Wrap one Markdown ordered list in a <code>:::steps</code> container. Each top-level list item becomes one step.</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[Production deployment]</p>
<ol>
<li>
<p><strong>Clone and prepare the workspace</strong></p>
<p>Clone the repository and enter the project directory.</p>
<pre><code>git clone https://github.com/LyraVoid/Shirone.git
Set-Location Shirone
</code></pre>
</li>
<li>
<p><strong>Install dependencies</strong></p>
<p>Use the repository's pinned package manager.</p>
<pre><code>pnpm.cmd install
</code></pre>
</li>
<li>
<p><strong>Run project checks</strong></p>
<p>Confirm Astro diagnostics and TypeScript checks pass.</p>
<pre><code>npx.cmd astro check
pnpm.cmd type-check
</code></pre>
</li>
<li>
<p><strong>Build the production site</strong></p>
<p>Generate the static site and search index.</p>
<pre><code>pnpm.cmd build
</code></pre>
</li>
</ol>
<p>:::</p>
<h2>Options</h2>
<ul>
<li><code>:::steps[Title]</code> or <code>title="Title"</code> adds a visible label and accessible name.</li>
<li><code>start=4</code> changes the first displayed step number.</li>
<li>The container must contain exactly one ordered list. Invalid or mixed input remains ordinary readable Markdown instead of being interpreted heuristically.</li>
<li>Rendering is completed during the site build and adds no client JavaScript or network requests.</li>
</ul>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>MDX Integration and M3E Atomic Components</title>
    <link href="https://xn--kivr36a.1qw.top/posts/mdx-showcase/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/mdx-showcase/</id>
    <published>2026-08-20T00:00:00.000Z</published>
    <updated>2026-08-20T00:00:00.000Z</updated>
    <summary>A comprehensive guide to composing rich interactive articles in Shirone using MDX, Svelte 5 interactive islands, and Material 3 Expressive design tokens.</summary>
    <content type="html"><![CDATA[<p>:::tip
<strong>MDX (Markdown + JSX)</strong> bridges the gap between static writing and application interfaces. In Shirone, authors can seamlessly mix dynamic logic, reactive Svelte 5 components, and Material 3 design tokens directly within post content.
:::</p>
<h2>1. Markdown vs MDX Capability Matrix</h2>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Standard Markdown (<code>.md</code>)</th>
<th>Shirone MDX (<code>.mdx</code>)</th>
<th>Execution Mode</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Typography &amp; Structure</strong></td>
<td>Full Support</td>
<td>Full Support</td>
<td>Static SSR</td>
</tr>
<tr>
<td><strong>Code Highlighting</strong></td>
<td>Line Numbers, Frames, Collapsible</td>
<td>Line Numbers, Frames, Collapsible</td>
<td>Static SSR (Expressive Code)</td>
</tr>
<tr>
<td><strong>Diagrams &amp; Mathematics</strong></td>
<td>Mermaid, KaTeX</td>
<td>Mermaid, KaTeX</td>
<td>Client Enhanced</td>
</tr>
<tr>
<td><strong>Callout Admonitions</strong></td>
<td>Note, Tip, Important, Warning, Caution</td>
<td>Note, Tip, Important, Warning, Caution</td>
<td>Static SSR</td>
</tr>
<tr>
<td><strong>M3E Display Atoms</strong></td>
<td>Not Available</td>
<td>Direct Integration (``, <code>&lt;Skeleton&gt;</code>)</td>
<td>Pure SSR (Zero Client JS)</td>
</tr>
<tr>
<td><strong>Svelte 5 Reactive Islands</strong></td>
<td>Not Available</td>
<td>On-Demand Hydration (<code>&lt;Button&gt;</code>, <code>&lt;Switch&gt;</code>)</td>
<td><code>client:visible</code> Lazy Hydrated</td>
</tr>
<tr>
<td><strong>Feedback &amp; Loading Atoms</strong></td>
<td>Not Available</td>
<td>Animated Morph (<code>&lt;LoadingIndicator&gt;</code>)</td>
<td><code>client:visible</code> Reactive</td>
</tr>
<tr>
<td><strong>Dynamic JSX Expressions</strong></td>
<td>Not Available</td>
<td>Native Evaluation (<code>{authorInfo.ui}</code>)</td>
<td>Compile-Time / Client</td>
</tr>
</tbody>
</table>
<hr />
<h2>2. Dynamic Expressions and Data Mapping</h2>
<p>MDX allows declaring scoped constants using <code>export const</code> at the top of the file, which can be evaluated inline or mapped across templates:</p>
<ul>
<li><strong>Core Framework</strong>: {authorInfo.framework}</li>
<li><strong>UI Engine</strong>: {authorInfo.ui}</li>
<li><strong>Design Tokens</strong>: {authorInfo.tokens}</li>
<li><strong>Architecture Pattern</strong>: {authorInfo.architecture}</li>
</ul>
<p>Arrays and collections can be rendered dynamically into grid layouts:</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 Display and Layout Primitives (SSR-Only)</h2>
<p>In accordance with Shirone's component architecture (<code>docs/atomic-structure.md</code>), stateless display components output clean, accessible semantic HTML with no client-side runtime payload.</p>
<h3>3.1 Card Containers (<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 Accent Bars and Badges (<code>AccentBar</code> &amp; <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 Skeleton Placeholders (<code>Skeleton.svelte</code>)</h3>
<p>For previewing layout skeletons or prototyping async states:</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. Feedback and Loading Indicators</h2>
<p>Shirone features full-fidelity Material 3 Expressive motion and feedback atoms:</p>
<h3>4.1 Morphing Loading Indicator (<code>LoadingIndicator.svelte</code>)</h3>
<p>Implemented with <code>androidx.graphics.shapes</code> polygon morphing, providing smooth spring-interpolated 7-shape animations:</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 Linear and Indeterminate Progress (<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. Interactive Svelte 5 Islands</h2>
<p>Components declared with <code>client:visible</code> are lazy-hydrated via <code>IntersectionObserver</code> when entering the viewport:</p>
<h3>5.1 Button Matrix (<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 Filter Chips and Segmented Buttons (<code>Chips</code> &amp; <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 Switches, Checkboxes, and Sliders (<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 Input Controls (<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 Extension Compatibility</h2>
<p>Shirone's SSOT unified plugin pipeline preserves full compatibility with all Markdown extensions:</p>
<h3>6.1 GitHub Repository Cards</h3>
<p>::github{repo="saicaca/fuwari"}</p>
<h3>6.2 Mermaid Architecture Diagrams</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 Mathematical Expressions (LaTeX / KaTeX)</h3>
<p>Inline equation: Mass-energy equivalence $E = mc^2$ and Gaussian integral $\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$.</p>
<p>Block equation:</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. Summary</h2>
<p>The native integration of MDX empowers technical writers to build rich, interactive documentation while preserving Shirone's ultra-fast static performance. All components adhere to the Material 3 Expressive token design system, ensuring consistency, accessibility, and visual harmony.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>如何让CNB和Github的仓库同步</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E5%A6%82%E4%BD%95%E8%AE%A9cnb%E5%92%8Cgithub%E7%9A%84%E4%BB%93%E5%BA%93%E5%90%8C%E6%AD%A5/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E5%A6%82%E4%BD%95%E8%AE%A9cnb%E5%92%8Cgithub%E7%9A%84%E4%BB%93%E5%BA%93%E5%90%8C%E6%AD%A5/</id>
    <published>2026-07-16T00:00:00.000Z</published>
    <updated>2026-07-16T00:00:00.000Z</updated>
    <summary>几行代码让CNB和Github的仓库同步，有效缓解Github的部分问题，同时也可以用来当做备份。</summary>
    <content type="html"><![CDATA[<p>几行代码让CNB和Github的仓库同步，有效解决Github部分问题，同时也可以用来当做对方的备份。</p>
<h1>CNB 同步到 Github</h1>
<blockquote>
<p>在CNB仓库里新建一个 <code>.cnb.yml</code> 文件，如果本身就有 <code>.cnb.yml</code> 的话直接复制 <code>- stages</code> 以下代码，内容如下：</p>
</blockquote>
<pre><code>main:
    push:
      - stages:
          - name: sync to github
            # CNB同步到Github
            image: tencentcom/git-sync
            # 创建私钥 密钥名.yml
            # 文件内容：
            # GIT_USERNAME: Github用户名
            # GIT_ACCESS_TOKEN: Github的令牌
            # 直接raw复制链接，填写到 imports: 密钥链接地址
            imports: 密钥链接地址
            settings:
              #cnb同步到github
              target_url: https://github.com/用户名/仓库名字.git
              auth_type: https
              username: ${GIT_USERNAME}
              password: ${GIT_ACCESS_TOKEN}
</code></pre>
<blockquote>
<p>创建好后，顺手把CNB的令牌建好，操作如下：</p>
</blockquote>
<pre><code>
CNB → 个人设置 → 访问令牌 → 生成新令牌
权限：勾选 repo-code:rw （勾选读写）
令牌：token（复制保存）
</code></pre>
<p>:::tip[题外话]
CNB可以建立密钥仓库，将密钥存在密钥仓库里，<code>raw</code>出来的链接不显示内容，比存放在公共&amp;私有仓库安全的多。
:::</p>
<h1>Github 同步到 CNB</h1>
<blockquote>
<p>先在Github仓库里新建一个仓库密钥，操作如下：</p>
</blockquote>
<pre><code>仓库 → Settings → Secrets and variables → Actions → New repository secret

Name: GIT_PASSWORD
Value: {token}  ← 保留{}，粘贴CNB的令牌
</code></pre>
<blockquote>
<p>然后在Github仓库 <code>.github/workflows</code> 文件夹下新建 <code>sync-cnb.yml</code> 内容如下：</p>
</blockquote>
<pre><code>name: Sync to CNB
on: [push]

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      
      - name: Sync to CNB Repository
        uses: docker://tencentcom/git-sync
        env:
          PLUGIN_TARGET_URL: "https://cnb.cool/用户名/仓库名.git"
          PLUGIN_AUTH_TYPE: "https"
          PLUGIN_USERNAME: "cnb"
          PLUGIN_PASSWORD: ${{ secrets.GIT_PASSWORD }}
          PLUGIN_FORCE: "true"
</code></pre>
<blockquote>
<p>这样基本就大功告成完成了。</p>
</blockquote>
<p>来源于CNB的<a href="https://cnb.cool/cnb/plugins/tencentcom/git-sync">Git Sync Plugin
</a>：一个用于在不同 Git 平台之间同步代码的插件。支持通过 HTTPS 或 SSH 方式同步代码到其他 Git 托管平台。</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="教程"/>
  </entry>
  <entry>
    <title>Image Gallery Grid: Syntax and Complete Examples</title>
    <link href="https://xn--kivr36a.1qw.top/posts/image-grid-demo/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/image-grid-demo/</id>
    <published>2026-07-13T00:00:00.000Z</published>
    <updated>2026-07-13T00:00:00.000Z</updated>
    <summary>A complete guide to image gallery grid syntax, parameters, cropping, responsive behavior, captions, and lightbox navigation.</summary>
    <content type="html"><![CDATA[<p><code>:::grid</code> is the blog's image gallery container directive. It arranges ordinary Markdown images in a responsive grid with a consistent aspect ratio and automatically enables lightbox viewing. Use it for article images, screenshots, portfolios, or small albums.</p>
<p>Images in the same gallery use the same card ratio. By default, center cropping fills every card and keeps each row tidy; clicking an image opens the complete original in a lightbox. Every gallery has its own lightbox group and does not mix with other images in the post.</p>
<blockquote>
<p>This post is both feature documentation and a visual test page. View the examples at desktop, tablet, and mobile widths, then click any image to verify lightbox grouping.</p>
</blockquote>
<h2>Minimal Syntax</h2>
<p>Write Markdown images directly between <code>:::grid</code> and the closing <code>:::</code>:</p>
<pre><code>:::grid
![Image description](./image-1.webp)

![Image description](./image-2.webp)
:::
</code></pre>
<p>Each image must occupy its own paragraph, with a blank line between images. Keep only images in a gallery; write paragraphs, lists, and code blocks outside the container.</p>
<p>Here is the result of the minimal syntax. Without parameters, the grid uses three columns, a <code>16/10</code> ratio, and <code>cover</code> by default.</p>
<p>:::grid
<img src="./landscape-1.webp" alt="Minimal syntax result: first image" /></p>
<p><img src="./landscape-2.webp" alt="Minimal syntax result: second image" />
:::</p>
<h2>Parameters at a Glance</h2>
<p>Write all parameters in braces after the opening directive: <code>:::grid{parameter="value"}</code>.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Allowed values</th>
<th>Default</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>columns</code></td>
<td>Integers from <code>1</code> to <code>6</code></td>
<td><code>3</code></td>
<td>Number of columns per row on desktop. Invalid values fall back to <code>3</code>.</td>
</tr>
<tr>
<td><code>aspect</code></td>
<td>A positive ratio, such as <code>16/9</code>, <code>3/4</code>, or <code>1/1</code></td>
<td><code>16/10</code></td>
<td>The displayed card ratio, not the original image ratio.</td>
</tr>
<tr>
<td><code>fit</code></td>
<td><code>cover</code>, <code>contain</code></td>
<td><code>cover</code></td>
<td>Image fitting mode. <code>cover</code> crops to fill; <code>contain</code> preserves the complete image and may leave empty space.</td>
</tr>
</tbody>
</table>
<p>Complete example:</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="cover"}
![First image](./image-1.webp "Optional caption")

![Second image](./image-2.webp "Optional caption")

![Third image](./image-3.webp "Optional caption")
:::
</code></pre>
<p>The following result uses the three-column landscape syntax above. Compare the card ratio, column count, and the way a title takes precedence over alt text as the caption:</p>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="./landscape-1.webp" alt="Parameter example: first landscape image" title="Landscape caption 1" /></p>
<p><img src="./landscape-2.webp" alt="Parameter example: second landscape image" title="Landscape caption 2" /></p>
<p><img src="./landscape-3.webp" alt="Parameter example: third landscape image" title="Landscape caption 3" />
:::</p>
<h2>Captions and Alt Text</h2>
<p>An image's alt text serves both as accessible alternative text and as its default caption. When an image has an optional title, the title is used as the caption instead:</p>
<pre><code>![Text used for accessibility](./image.webp "Caption shown below the image")
</code></pre>
<p>In the same row, captions align to the bottom of every card. A wrapping caption does not make the others float at a different height. Ratio text such as <code>3:4</code> and <code>16:9</code> can be written directly in body text, headings, and alt text without escaping.</p>
<p>This example demonstrates the default alt-text caption, an explicit title caption, and bottom alignment for a longer caption:</p>
<p>:::grid{columns="3" aspect="1/1"}
<img src="./square-1.webp" alt="This image has no title, so its alt text is the caption" /></p>
<p><img src="./square-2.webp" alt="Second square image with accessible alt text" title="This title is displayed as the caption" /></p>
<p><img src="./square-3.webp" alt="Accessible description of a 3:4 poster" title="This is a longer caption for checking that every caption remains aligned to the bottom of its card when it wraps" />
:::</p>
<h2>Layout and Cropping</h2>
<p>Desktop layouts use the number of columns specified by <code>columns</code>. Below <code>768px</code>, grids use at most two columns; below <code>480px</code>, they switch to one column. The card wrapper fixes the <code>aspect</code> ratio and clips rounded corners, while the image fills the card without the theme's default image margins.</p>
<ul>
<li>Choose <code>cover</code>: the recommended default. Images are cropped from the center to fill the card, making the gallery look consistent.</li>
<li>Choose <code>contain</code>: the full original image is shown without cropping. When its ratio differs from the card, the theme background remains visible; use this for images that cannot be cropped.</li>
<li>To preserve the complete image without empty space, set <code>aspect</code> close to the original image ratio or place the image in a grid of its own.</li>
</ul>
<p>The following examples place the same portrait images in <code>16/9</code> cards with <code>cover</code> and <code>contain</code>. The first crops them; the second preserves the full image and leaves background space.</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="cover"}
![Image description](./image-1.webp "Optional caption")

![Image description](./image-2.webp "Optional caption")
:::

:::grid{columns="3" aspect="16/9" fit="contain"}
![Image description](./image-1.webp "Optional caption")

![Image description](./image-2.webp "Optional caption")
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="./default-portrait-1.webp" alt="First cover result" title="Cover: center crop" /></p>
<p><img src="./default-portrait-2.webp" alt="Second cover result" title="Cover: fill the card" /></p>
<p><img src="./default-portrait-3.webp" alt="Third cover result" title="Cover: a more consistent layout" />
:::</p>
<p>:::grid{columns="3" aspect="16/9" fit="contain"}
<img src="./default-portrait-1.webp" alt="First contain result" title="Contain: preserve the complete original" /></p>
<p><img src="./default-portrait-2.webp" alt="Second contain result" title="Contain: empty space may appear" /></p>
<p><img src="./default-portrait-3.webp" alt="Third contain result" title="Contain: suitable for edge details" />
:::</p>
<h2>Default Configuration</h2>
<p>Without attributes, the default is three columns, a <code>16/10</code> ratio, and <code>cover</code> cropping. These three portrait images verify default cropping and captions.</p>
<pre><code>:::grid
![Image description](./image-1.webp)

![Image description](./image-2.webp)

![Image description](./image-3.webp)
:::
</code></pre>
<p>:::grid
<img src="./default-portrait-1.webp" alt="Default configuration: portrait image one" /></p>
<p><img src="./default-portrait-2.webp" alt="Default configuration: portrait image two" /></p>
<p><img src="./default-portrait-3.webp" alt="Default configuration: portrait image three" />
:::</p>
<h2>Three-Column Portraits: 3:4</h2>
<p>With <code>aspect="3/4"</code>, the three portrait images fill consistently proportioned vertical cards. If an original image has a different ratio, <code>cover</code> crops its edges from the center.</p>
<pre><code>:::grid{columns="3" aspect="3/4"}
![Portrait image description](./portrait-1.webp)

![Portrait image description](./portrait-2.webp)

![Portrait image description](./portrait-3.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="3/4"}
<img src="./default-portrait-1.webp" alt="3:4 test image one" title="Portrait 1" /></p>
<p><img src="./default-portrait-2.webp" alt="3:4 test image two" title="Portrait 2" /></p>
<p><img src="./default-portrait-3.webp" alt="3:4 test image three" title="Portrait 3" />
:::</p>
<h2>Three-Column Landscapes: 16:9</h2>
<p>This set demonstrates a common video-cover ratio in a three-column layout. Cropping is minimal when the landscape images are close to the card ratio.</p>
<pre><code>:::grid{columns="3" aspect="16/9"}
![Landscape image description](./landscape-1.webp)

![Landscape image description](./landscape-2.webp)

![Landscape image description](./landscape-3.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9"}
<img src="./feature-landscape-1.webp" alt="16:9 test image one" /></p>
<p><img src="./feature-landscape-2.webp" alt="16:9 test image two" /></p>
<p><img src="./feature-landscape-3.webp" alt="16:9 test image three" />
:::</p>
<h2>Two-Column Squares: 1:1</h2>
<p>Two columns work well when larger preview cards are needed. The third image moves to the next row. The final row keeps its grid-track width instead of stretching images to fill the row.</p>
<pre><code>:::grid{columns="2" aspect="1/1"}
![Square image description](./square-1.webp)

![Square image description](./square-2.webp)

![Square image description](./square-3.webp)
:::
</code></pre>
<p>:::grid{columns="2" aspect="1/1"}
<img src="./mixed-square-1.webp" alt="1:1 test image one" /></p>
<p><img src="./mixed-square-2.webp" alt="1:1 test image two" /></p>
<p><img src="./mixed-square-3.webp" alt="1:1 test image three" />
:::</p>
<h2>Four Columns with <code>contain</code></h2>
<p><code>fit="contain"</code> does not crop the original image. When the image ratio differs from the card ratio, the theme background remains visible. This is intentional, not a layout issue. It also verifies that four-column grids and separate lightbox groups do not interfere with each other.</p>
<pre><code>:::grid{columns="4" aspect="16/9" fit="contain"}
![Image description](./image-1.webp)

![Image description](./image-2.webp)

![Image description](./image-3.webp)
:::
</code></pre>
<p>:::grid{columns="4" aspect="16/9" fit="contain"}
<img src="./default-portrait-1.webp" alt="Contain: portrait image one" /></p>
<p><img src="./default-portrait-2.webp" alt="Contain: portrait image two" /></p>
<p><img src="./default-portrait-3.webp" alt="Contain: portrait image three" />
:::</p>
<h2>Single-Column Detail Image</h2>
<p>One column is suitable when an image needs a larger reading size. It remains one column on desktop, tablet, and mobile, and the original is still available in the lightbox.</p>
<pre><code>:::grid{columns="1" aspect="16/9"}
![Image description](./detail.webp)
:::
</code></pre>
<p>:::grid{columns="1" aspect="16/9"}
<img src="./feature-landscape-1.webp" alt="Single-column test image" />
:::</p>
<h2>Sparse Five-Column Row</h2>
<p>Five columns verify a higher supported column count. With only three images, the final row remains left-aligned instead of stretching the images.</p>
<pre><code>:::grid{columns="5" aspect="1/1"}
![Thumbnail description](./thumb-1.webp)

![Thumbnail description](./thumb-2.webp)

![Thumbnail description](./thumb-3.webp)
:::
</code></pre>
<p>:::grid{columns="5" aspect="1/1"}
<img src="./mixed-square-1.webp" alt="Five-column test image one" /></p>
<p><img src="./mixed-square-2.webp" alt="Five-column test image two" /></p>
<p><img src="./mixed-square-3.webp" alt="Five-column test image three" />
:::</p>
<h2>Mixed Images in Six Columns</h2>
<p>Six columns are the current maximum. Mixing landscape and portrait images verifies <code>cover</code> cropping, captions on narrow cards, and a dense desktop layout. For readable article content, two to four columns are usually preferable.</p>
<pre><code>:::grid{columns="6" aspect="1/1"}
![Image description](./image-1.webp)

![Image description](./image-2.webp)

![Image description](./image-3.webp)

![Image description](./image-4.webp)

![Image description](./image-5.webp)

![Image description](./image-6.webp)
:::
</code></pre>
<p>:::grid{columns="6" aspect="1/1"}
<img src="./default-portrait-1.webp" alt="Six-column test image one" /></p>
<p><img src="./default-portrait-2.webp" alt="Six-column test image two" /></p>
<p><img src="./default-portrait-3.webp" alt="Six-column test image three" /></p>
<p><img src="./feature-landscape-1.webp" alt="Six-column test image four" /></p>
<p><img src="./feature-landscape-2.webp" alt="Six-column test image five" /></p>
<p><img src="./feature-landscape-3.webp" alt="Six-column test image six" />
:::</p>
<h2>Four-Column Squares: 1:1</h2>
<p>Four square images with the same ratio are a typical four-column layout. Desktop displays all four in one row; tablet collapses to two columns and mobile to one.</p>
<pre><code>:::grid{columns="4" aspect="1/1"}
![Square image description](./square-1.webp)

![Square image description](./square-2.webp)

![Square image description](./square-3.webp)

![Square image description](./square-4.webp)
:::
</code></pre>
<p>:::grid{columns="4" aspect="1/1"}
<img src="./square-1.webp" alt="Square image one" /></p>
<p><img src="./square-2.webp" alt="Square image two" /></p>
<p><img src="./square-3.webp" alt="Square image three" /></p>
<p><img src="./square-4.webp" alt="Square image four" />
:::</p>
<h2>Six-Column Landscapes: 16:9</h2>
<p>Six landscape columns work well for thumbnail previews, portfolios, and screenshot indexes. Even if original ratios differ slightly, <code>cover</code> fills every <code>16/9</code> card consistently.</p>
<pre><code>:::grid{columns="6" aspect="16/9"}
![Landscape image description](./landscape-1.webp)

![Landscape image description](./landscape-2.webp)

![Landscape image description](./landscape-3.webp)

![Landscape image description](./landscape-4.webp)

![Landscape image description](./landscape-5.webp)

![Landscape image description](./landscape-6.webp)
:::
</code></pre>
<p>:::grid{columns="6" aspect="16/9"}
<img src="./landscape-1.webp" alt="Landscape image one" /></p>
<p><img src="./landscape-2.webp" alt="Landscape image two" /></p>
<p><img src="./landscape-3.webp" alt="Landscape image three" /></p>
<p><img src="./landscape-4.webp" alt="Landscape image four" /></p>
<p><img src="./landscape-5.webp" alt="Landscape image five" /></p>
<p><img src="./landscape-6.webp" alt="Landscape image six" />
:::</p>
<h2>Three-Column Portraits: 3:4</h2>
<p>This group of six portrait images demonstrates a common layout for people, posters, or mobile screenshots. The images form two rows of three, with captions aligned to the bottom.</p>
<pre><code>:::grid{columns="3" aspect="3/4"}
![Portrait image description](./portrait-1.webp)

![Portrait image description](./portrait-2.webp)

![Portrait image description](./portrait-3.webp)

![Portrait image description](./portrait-4.webp)

![Portrait image description](./portrait-5.webp)

![Portrait image description](./portrait-6.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="3/4"}
<img src="./portrait-1.webp" alt="Portrait image one" /></p>
<p><img src="./portrait-2.webp" alt="Portrait image two" /></p>
<p><img src="./portrait-3.webp" alt="Portrait image three" /></p>
<p><img src="./portrait-4.webp" alt="Portrait image four" /></p>
<p><img src="./portrait-5.webp" alt="Portrait image five" /></p>
<p><img src="./portrait-6.webp" alt="Portrait image six" />
:::</p>
<h2>Edge-Critical Content: <code>cover</code> and Lightbox</h2>
<p>These images contain important text or details near their edges. <code>cover</code> keeps the grid tidy but may crop those edges; click an image to view the uncropped original in the lightbox. Use clear captions for edge-sensitive images, or use <code>contain</code> below.</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="cover"}
![Edge-critical content](./critical-1.webp "Open the lightbox to view the complete edge content")

![Edge-critical content](./critical-2.webp "Open the lightbox to view the complete edge content")

![Edge-critical content](./critical-3.webp "Open the lightbox to view the complete edge content")
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="./critical-1.webp" alt="First edge-critical image" title="Open the lightbox to view the complete edge content" /></p>
<p><img src="./critical-2.webp" alt="Second edge-critical image" title="Open the lightbox to view the complete edge content" /></p>
<p><img src="./critical-3.webp" alt="Third edge-critical image" title="Open the lightbox to view the complete edge content" />
:::</p>
<h2>Extreme Ratios with <code>contain</code></h2>
<p>For banners, long screenshots, and other extreme image ratios, <code>contain</code> displays the complete original. Unlike <code>cover</code>, it may leave theme-background space, but it never crops content.</p>
<pre><code>:::grid{columns="3" aspect="16/9" fit="contain"}
![Complete screenshot description](./wide-1.webp)

![Complete screenshot description](./wide-2.webp)

![Complete screenshot description](./wide-3.webp)
:::
</code></pre>
<p>:::grid{columns="3" aspect="16/9" fit="contain"}
<img src="./extreme-1.webp" alt="Extreme-ratio image one" /></p>
<p><img src="./extreme-2.webp" alt="Extreme-ratio image two" /></p>
<p><img src="./extreme-3.webp" alt="Extreme-ratio image three" />
:::</p>
<h2>Transparent Images</h2>
<p>Transparent images reveal the card's theme background. This single-column <code>contain</code> example makes the transparent areas, original edges, and lightbox behavior easy to inspect.</p>
<pre><code>:::grid{columns="1" aspect="16/9" fit="contain"}
![Transparent image description](./transparent.webp)
:::
</code></pre>
<p>:::grid{columns="1" aspect="16/9" fit="contain"}
<img src="./transparent-1.webp" alt="Transparent-background test image" />
:::</p>
<h2>Lightbox Navigation</h2>
<p>Click any image in a grid to open the Fancybox lightbox. There you can zoom, rotate, enter fullscreen, view thumbnails, and navigate with the arrow keys. Navigation is limited to the current <code>:::grid</code> container: for example, clicking "16:9 test image one" only opens the other two landscape images in that section.</p>
<p>Ordinary Markdown images in the same post continue to be handled separately; they are not added to any grid gallery.</p>
<h2>Checklist</h2>
<ol>
<li>Images in each grid have consistent dimensions, with captions below the cards.</li>
<li>Images scale slightly on hover; after clicking, they can be zoomed, rotated, and navigated with the keyboard.</li>
<li>Clicking "16:9 test image one" lets the lightbox browse only the other two landscape images in that section.</li>
<li>Below 768px, grids use at most two columns; below 480px, they use one column.</li>
<li>Portrait images in "Four Columns with <code>contain</code>" are fully visible with empty space and no cropping.</li>
<li>Five- and six-column grids retain their specified column count on wide screens, then collapse to two or one column according to the responsive rules.</li>
</ol>
]]></content>
    <author><name>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>图片画廊网格：语法与完整示例</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E5%9B%BE%E7%89%87%E7%94%BB%E5%BB%8A%E7%BD%91%E6%A0%BC%E8%AF%AD%E6%B3%95%E4%B8%8E%E5%AE%8C%E6%95%B4%E7%A4%BA%E4%BE%8B/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E5%9B%BE%E7%89%87%E7%94%BB%E5%BB%8A%E7%BD%91%E6%A0%BC%E8%AF%AD%E6%B3%95%E4%B8%8E%E5%AE%8C%E6%95%B4%E7%A4%BA%E4%BE%8B/</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>同一画廊中的图片使用相同的卡片比例。默认情况下，中心裁剪会填满每张卡牌并保持每行整齐;点击图片会在灯箱中打开完整的原作。每个画廊都有自己的Lightbox组，不会和其他图片混在一起。</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> 的比率和覆盖率。</p>
<p>:::grid
<img src="/images/demos/image-grid-demo/landscape-1.webp" alt="最小语法结果：第一张图片" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-2.webp" alt="最小语法结果：第二张图片" />
:::</p>
<h2>参数一览</h2>
<p>在开场指令后用大括号写下所有参数: <code>:::grid{parameter="value"}</code>.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Allowed values</th>
<th>Default</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>columns</code></td>
<td>整数来自 <code>1</code> to <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>, or <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"}
![First image](./image-1.webp "可选标题")

![Second image](./image-2.webp "可选标题")

![Third image](./image-3.webp "可选标题")
:::
</code></pre>
<p>以下结果使用了上面的三列横向语法。比较卡片比例、列数以及标题优先于alt文本作为标题的方式：</p>
<p>:::grid{columns="3" aspect="16/9" fit="cover"}
<img src="/images/demos/image-grid-demo/landscape-1.webp" alt="参数示例: first 景观图像" title="景观说明 1" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-2.webp" alt="参数示例: second 景观图像" title="景观说明 2" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-3.webp" alt="参数示例: third 景观图像" title="景观说明 3" />
:::</p>
<h2>标题和Alt文本</h2>
<p>图像的alt文本既可以作为可访问的替代文本，也可以作为其默认标题。当图像具有可选标题时，标题将用作标题：</p>
<pre><code>![用于辅助功能的文本](./image.webp "图片下方显示的标题")
</code></pre>
<p>在同一行中，标题与每张卡片的底部对齐。包装说明不会使其他人漂浮在不同的高度。比例文本，如 <code>3:4</code> 和 <code>16:9</code> ，可以直接写在正文、标题和alt文本中，而无需转义。</p>
<p>此示例演示了默认的alt文本标题、显式标题标题和较长标题的底部对齐方式：</p>
<p>:::grid{columns="3" aspect="1/1"}
<img src="/images/demos/image-grid-demo/square-1.webp" alt="此图像没有标题，因此其alt文本是标题" /></p>
<p><img src="/images/demos/image-grid-demo/square-2.webp" alt="第二个方形图像，带有可访问的alt文本" title="此标题显示为标题" /></p>
<p><img src="/images/demos/image-grid-demo/square-3.webp" alt="3:4海报的无障碍描述" title="这是一个较长的标题，用于检查每个标题在包装时是否与卡片底部对齐" />
:::</p>
<h2>布局和裁剪</h2>
<p>桌面布局使用由列指定的列数。低于 <code>768px</code> ，网格最多使用两列；低于 <code>480px</code> 时，它们会切换到一列。卡片包装固定了纵横比并剪裁了圆角，而图像填充了卡片，没有主题的默认图像边距。</p>
<ul>
<li>选择 <code>cover</code>: 推荐的默认值。图像从中心裁剪以填充卡片，使图库看起来一致。</li>
<li>选择 <code>contain</code>: 显示完整的原始图像而不`进行裁剪。当其比例与卡片不同时，主题背景仍然可见；将其用于无法裁剪的图像。</li>
<li>要保留完整图像而不留空白，请将 <code>aspect</code> 设置为接近原始图像比率，或将图像放置在自己的网格中。</li>
</ul>
<p>以下示例将相同的肖像图像放置在带封面和内容的 <code>16/9</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="/images/demos/image-grid-demo/default-portrait-1.webp" alt="First 覆盖结果" title="封面：中央裁剪" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-2.webp" alt="Second 覆盖结果" title="封面：填写卡片" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-3.webp" alt="Third 覆盖结果" title="封面：布局更加一致" />
:::</p>
<p>:::grid{columns="3" aspect="16/9" fit="contain"}
<img src="/images/demos/image-grid-demo/default-portrait-1.webp" alt="First 包含结果" title="包含：保留完整的原件" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-2.webp" alt="Second 包含结果" title="包含：可能出现空白" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-3.webp" alt="Third 包含结果" title="包含：适用于边缘细节" />
:::</p>
<h2>默认配置</h2>
<p>如果没有属性，默认值为三列、 <code>16/10</code> 比率和覆盖裁剪。这三幅肖像图像验证了默认裁剪和字幕。</p>
<pre><code>:::grid
![图片描述](./image-1.webp)

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

![图片描述](./image-3.webp)
:::
</code></pre>
<p>:::grid
<img src="/images/demos/image-grid-demo/default-portrait-1.webp" alt="默认配置: 肖像图片 one" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-2.webp" alt="默认配置: 肖像图片 two" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-3.webp" alt="默认配置: 肖像图片 three" />
:::</p>
<h2>三柱肖像: 3:4</h2>
<p>当 aspect = <code>3/4</code> `时，三幅肖像图像填充了比例一致的垂直卡片。如果原始图像的比率不同，cover会从中心裁剪其边缘。</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="/images/demos/image-grid-demo/default-portrait-1.webp" alt="3:4 测试图像 one" title="Portrait 1" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-2.webp" alt="3:4 测试图像 two" title="Portrait 2" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-3.webp" alt="3:4 测试图像 three" title="Portrait 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="/images/demos/image-grid-demo/feature-landscape-1.webp" alt="16:9 测试图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/feature-landscape-2.webp" alt="16:9 测试图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/feature-landscape-3.webp" alt="16:9 测试图像 three" />
:::</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="/images/demos/image-grid-demo/mixed-square-1.webp" alt="1:1 测试图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/mixed-square-2.webp" alt="1:1 测试图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/mixed-square-3.webp" alt="1:1 测试图像 three" />
:::</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="/images/demos/image-grid-demo/default-portrait-1.webp" alt="Contain: 肖像图片 one" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-2.webp" alt="Contain: 肖像图片 two" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-3.webp" alt="Contain: 肖像图片 three" />
:::</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="/images/demos/image-grid-demo/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="/images/demos/image-grid-demo/mixed-square-1.webp" alt="五列测试图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/mixed-square-2.webp" alt="五列测试图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/mixed-square-3.webp" alt="五列测试图像 three" />
:::</p>
<h2>六列混合图像</h2>
<p>五列验证了更高的支持列数。只有三张图像，最后一行保持左对齐，而不是拉伸图像。</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="/images/demos/image-grid-demo/default-portrait-1.webp" alt="六列测试图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-2.webp" alt="六列测试图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/default-portrait-3.webp" alt="六列测试图像 three" /></p>
<p><img src="/images/demos/image-grid-demo/feature-landscape-1.webp" alt="六列测试图像 four" /></p>
<p><img src="/images/demos/image-grid-demo/feature-landscape-2.webp" alt="六列测试图像 five" /></p>
<p><img src="/images/demos/image-grid-demo/feature-landscape-3.webp" alt="六列测试图像 six" />
:::</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="/images/demos/image-grid-demo/square-1.webp" alt="方形图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/square-2.webp" alt="方形图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/square-3.webp" alt="方形图像 three" /></p>
<p><img src="/images/demos/image-grid-demo/square-4.webp" alt="方形图像 four" />
:::</p>
<h2>六柱景观: 16:9</h2>
<p>六个横向列适用于缩略图预览、作品集和屏幕截图索引。即使原始比率略有不同，封面也会始终如一地填充每张 <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="/images/demos/image-grid-demo/landscape-1.webp" alt="景观图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-2.webp" alt="景观图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-3.webp" alt="景观图像 three" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-4.webp" alt="景观图像 four" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-5.webp" alt="景观图像 five" /></p>
<p><img src="/images/demos/image-grid-demo/landscape-6.webp" alt="景观图像 six" />
:::</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="/images/demos/image-grid-demo/portrait-1.webp" alt="肖像图片 one" /></p>
<p><img src="/images/demos/image-grid-demo/portrait-2.webp" alt="肖像图片 two" /></p>
<p><img src="/images/demos/image-grid-demo/portrait-3.webp" alt="肖像图片 three" /></p>
<p><img src="/images/demos/image-grid-demo/portrait-4.webp" alt="肖像图片 four" /></p>
<p><img src="/images/demos/image-grid-demo/portrait-5.webp" alt="肖像图片 five" /></p>
<p><img src="/images/demos/image-grid-demo/portrait-6.webp" alt="肖像图片 six" />
:::</p>
<h2>边缘关键内容: <code>cover</code> and Lightbox</h2>
<p>这些图像在边缘附近包含重要的文本或细节。盖子可以保持网格整洁，但可能会修剪这些边缘；单击图像以在lightbox中查看未剪切的原稿。对边缘敏感的图像使用清晰的标题，或使用下面的“包含”。</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="/images/demos/image-grid-demo/critical-1.webp" alt="First 边缘临界图像" title="打开灯箱查看完整的边缘内容" /></p>
<p><img src="/images/demos/image-grid-demo/critical-2.webp" alt="Second 边缘临界图像" title="打开灯箱查看完整的边缘内容" /></p>
<p><img src="/images/demos/image-grid-demo/critical-3.webp" alt="Third 边缘临界图像" title="打开灯箱查看完整的边缘内容" />
:::</p>
<h2>极端比率 <code>contain</code></h2>
<p>对于横幅、长截图和其他极端的图像比例，包含完整的原始显示。与封面不同，它可能会留下主题背景空间，但永远不会裁剪内容。</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="/images/demos/image-grid-demo/extreme-1.webp" alt="极端比率图像 one" /></p>
<p><img src="/images/demos/image-grid-demo/extreme-2.webp" alt="极端比率图像 two" /></p>
<p><img src="/images/demos/image-grid-demo/extreme-3.webp" alt="极端比率图像 three" />
:::</p>
<h2>透明图像</h2>
<p>透明图像显示了卡片的主题背景。这个包含单个列的示例使透明区域、原始边缘和灯箱行为易于检查。</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="/images/demos/image-grid-demo/transparent-1.webp" alt="透明背景测试图像" />
:::</p>
<h2>灯箱导航</h2>
<p>单击网格中的任何图像以打开Fancybox灯箱。在那里，您可以缩放、旋转、进入全屏、查看缩略图和使用箭头键导航。导航仅限于当前的:::grid 例如:单击 “16:9测试图像一” 仅打开该部分中的另外两个横向图像。</p>
<p>同一帖子中的普通Markdown图片继续单独处理；它们不会添加到任何网格库中。</p>
<h2>清单</h2>
<ol>
<li>每个网格中的图像具有一致的尺寸，卡片下方有标题。</li>
<li>图像在悬停时略微缩放；点击后，可以用键盘缩放、旋转和导航。</li>
<li>点击 “16:9测试图像一” ，灯箱仅浏览该部分中的另外两个景观图像。</li>
<li>低于768px，网格最多使用两列；在480px以下，他们使用一列。</li>
<li>“四列包含” 中的肖像图像完全可见，没有空白，也没有裁剪。</li>
<li>五列和六列网格在宽屏幕上保留其指定的列数，然后根据响应规则折叠为两列或一列。</li>
</ol>
]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>CNB如何用EO部署搭建Blog</title>
    <link href="https://xn--kivr36a.1qw.top/posts/cnb%E5%A6%82%E4%BD%95%E7%94%A8eo%E9%83%A8%E7%BD%B2%E6%90%AD%E5%BB%BAblog/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/cnb%E5%A6%82%E4%BD%95%E7%94%A8eo%E9%83%A8%E7%BD%B2%E6%90%AD%E5%BB%BAblog/</id>
    <published>2025-11-20T00:00:00.000Z</published>
    <updated>2025-11-20T00:00:00.000Z</updated>
    <summary>如何利用CNB简单快捷的在EO上部署搭建Blog</summary>
    <content type="html"><![CDATA[<p><a href="https://cnb.cool/">CNB</a>是腾讯旗下的代码仓库平台，也是继 gitee，gitcode 之后又一个为中文开发者生态提供基础设施的平台，同GitHub Pages一样，CNB也可以托管静态网页。</p>
<p>废话不多说，教程开始。</p>
<p>:::caution[注意！！！]
注意第二步！注意第二步！！注意第二步！！！ 
:::</p>
<blockquote>
<p>一、 先在EO点击创建项目=&gt;直接上传，项目名称和仓库名相同。</p>
</blockquote>
<blockquote>
<p>二、 ［！！！注意！！！］加速区域别忘记更改为：【全球可用区（不含中国大陆）】！！！『域名备案过的可无视这条』</p>
</blockquote>
<blockquote>
<p>三、 上传所需部署的源（可能不会部署成功）或直接用示例模板开始部署（项目名称别忘改！！！改成和仓库名相同。）</p>
</blockquote>
<blockquote>
<p>四、 顺便在 API Token 里创建一个Token，一会要用。</p>
</blockquote>
<blockquote>
<p>五、 返回cnb继续操作其它操作，不用管EO部署。</p>
</blockquote>
<ul>
<li>建立一个 envs.yml 文件</li>
</ul>
<pre><code>EDGEONE_API_TOKEN: 填写自己在EO的创建的API TOKEN
</code></pre>
<ul>
<li>在建立一个 .cnb.yml 文件</li>
</ul>
<pre><code># 触发器：推送到主分支
main:
  push:
      # 从私有仓库导入环境变量：
      # 参考：https://docs.cnb.cool/en/build/env.html#importing-environment-variables  
      - imports: {这里填之前创建的 envs.yml Raw的地址}
      stages:
        # 构建当前项目
        - name: Build Current Project
          image: node:24
          script: node -v &amp;&amp; npm install &amp;&amp; npm run build  
        # 将构建输出部署到 EdgeOne Pages
        # ./dist 目录由前一步构建步骤生成
        - name: Deploy to EdgeOne Pages
          script: npx edgeone pages deploy ./dist/ -n {这里填你的仓库名} -t $EDGEONE_API_TOKEN
</code></pre>
<p>:::tip[题外话]
自定义域名如果是托管在CF的话是要关闭小黄云的，不然无法解析。
:::</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="教程"/>
  </entry>
  <entry>
    <title>将Windows更新暂停时长延长到100年后</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E5%B0%86windows%E6%9B%B4%E6%96%B0%E6%9A%82%E5%81%9C%E6%97%B6%E9%95%BF%E5%BB%B6%E9%95%BF%E5%88%B0100%E5%B9%B4%E5%90%8E/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E5%B0%86windows%E6%9B%B4%E6%96%B0%E6%9A%82%E5%81%9C%E6%97%B6%E9%95%BF%E5%BB%B6%E9%95%BF%E5%88%B0100%E5%B9%B4%E5%90%8E/</id>
    <published>2025-03-17T00:00:00.000Z</published>
    <updated>2025-03-17T00:00:00.000Z</updated>
    <summary>通过修改注册表的方式来延长系统更新暂停时长.</summary>
    <content type="html"><![CDATA[<p>废话不多说，直接上教程。</p>
<p>WIN+R 输入 regedit 进入注册表编辑器。</p>
<blockquote>
<p>按照以下顺序依次点击:</p>
</blockquote>
<pre><code>计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings
</code></pre>
<p>右边空白处，右击新建一个 DWORD值</p>
<p>重命名为:</p>
<pre><code>FlightSettingsMaxPauseDays
</code></pre>
<p>双击 FlightSettingsMaxPauseDays ，基数选择十进制。</p>
<p>左侧填写为你想暂停的整数天数，例如36500天，点确定。
<img src="./%E4%BF%AE%E6%94%B9%E5%90%8E.jpg" alt="" /></p>
<p>然后 WIN+i 打开系统设置，在Windows更新里就可以选择设置好的最长周期时长。</p>
<p>如果想更新的话，点击继续更新就可以了。</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="教程"/>
  </entry>
  <entry>
    <title>东郭先生与狼</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E4%B8%9C%E9%83%AD%E5%85%88%E7%94%9F%E4%B8%8E%E7%8B%BC/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E4%B8%9C%E9%83%AD%E5%85%88%E7%94%9F%E4%B8%8E%E7%8B%BC/</id>
    <published>2025-03-12T00:00:00.000Z</published>
    <updated>2025-03-12T00:00:00.000Z</updated>
    <summary>东郭先生”的故事出自明代马中锡的《中山狼传》</summary>
    <content type="html"><![CDATA[<p>“东郭先生”的故事出自明代马中锡的《中山狼传》，以下为你详细介绍：</p>
<h3>故事背景</h3>
<p>战国时期，有一个心地善良的书生叫东郭先生。</p>
<h3>故事经过</h3>
<p>• <strong>遇狼求救</strong>：有一天，东郭先生骑着毛驴外出讲学，走到一个十字路口时，看见一只狼慌慌张张地跑来，后面紧跟着一位手持猎枪的猎人。狼跑到东郭先生面前，跪下来哀求道：“先生，救救我吧！后面有猎人要杀我，您行行好，把我藏起来吧，我日后一定会报答您的！”东郭先生看着狼那可怜的样子，心生怜悯，便把书从袋子里拿出来，让狼钻进袋子里，然后把袋子藏在了书袋里 。
• <strong>猎人离去</strong>：猎人追过来，问东郭先生有没有看见一只狼。东郭先生摇摇头说：“没有看见。”猎人四处搜寻了一番，没有发现狼的踪迹，只好离开了。
• <strong>狼欲吃东郭先生</strong>：猎人走后，狼从袋子里钻了出来，可它并没有感激东郭先生救命之恩的意思，反而露出了凶狠的本性，恶狠狠地说：“先生，我现在饿了，你就成为我的一顿美餐吧！”说完，就向东郭先生扑了过去。</p>
<h3>故事转折</h3>
<p>• <strong>老杏和老牛诉说</strong>：东郭先生惊恐万分，苦苦哀求狼放过自己，并和狼讲道理，但狼根本不听。就在东郭先生绝望的时候，路边的一棵老杏树开口说话了，它给东郭先生讲述了自己一生奉献果实却最终被砍伐的遭遇；接着，一头老牛也说了自己辛苦耕地到老却被宰杀的故事。它们都借此提醒东郭先生，不能对狼抱有幻想。
• <strong>智斗恶狼</strong>：听了老杏和老牛的话，东郭先生意识到不能再心软，于是他和狼一起到前面的一个老人那里去评理。老人了解情况后，设计让狼重新钻进袋子，然后狠狠地教训了它一顿，并最终杀死了这只忘恩负义的狼。</p>
<h3>故事寓意</h3>
<p>这个故事讽刺了那些像狼一样忘恩负义、恩将仇报的人，同时也赞扬了东郭先生最初的善良，但也提醒人们在善良的同时也要保持一定的警惕，学会保护自己 。</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="小故事"/>
  </entry>
  <entry>
    <title>Markdown 教程</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-%E6%95%99%E7%A8%8B/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-%E6%95%99%E7%A8%8B/</id>
    <published>2025-01-20T00:00:00.000Z</published>
    <updated>2025-01-20T00:00:00.000Z</updated>
    <summary>一个简单的 Markdown 博客文章示例。</summary>
    <content type="html"><![CDATA[<h1>Markdown 教程</h1>
<p>一个 Markdown 示例展示了如何编写 Markdown 文件。本文件整合了核心语法和扩展（GMF）。</p>
<ul>
<li><a href="#block-elements">块级元素</a>
<ul>
<li><a href="#paragraphs-and-line-breaks">段落和换行</a></li>
<li><a href="#headers">标题</a></li>
<li><a href="#blockquotes">引用</a></li>
<li><a href="#lists">列表</a></li>
<li><a href="#code-blocks">代码块</a></li>
<li><a href="#horizontal-rules">水平线</a></li>
<li><a href="#table">表格</a></li>
</ul>
</li>
<li><a href="#span-elements">行内元素</a>
<ul>
<li><a href="#links">链接</a></li>
<li><a href="#emphasis">强调</a></li>
<li><a href="#code">代码</a></li>
<li><a href="#images">图片</a></li>
<li><a href="#strikethrough">删除线</a></li>
</ul>
</li>
<li><a href="#miscellaneous">其他</a>
<ul>
<li><a href="#automatic-links">自动链接</a></li>
<li><a href="#backslash-escapes">反斜杠转义</a></li>
</ul>
</li>
<li><a href="#inline-html">行内 HTML</a></li>
</ul>
<h2>Block Elements</h2>
<h3>Paragraphs and Line Breaks</h3>
<h4>Paragraphs</h4>
<p>HTML Tag: <code>&lt;p&gt;</code></p>
<p>One or more blank lines. (A blank line is a line containing nothing but <strong>spaces</strong> or <strong>tabs</strong> is considered blank.)</p>
<p>Code:</p>
<pre><code>This will be
inline.

This is second paragraph.
</code></pre>
<p>Preview:</p>
<hr />
<p>This will be
inline.</p>
<p>This is second paragraph.</p>
<hr />
<h4>Line Breaks</h4>
<p>HTML Tag: <code>&lt;br /&gt;</code></p>
<p>End a line with <strong>two or more spaces</strong>.</p>
<p>Code:</p>
<pre><code>This will be not
inline.
</code></pre>
<p>Preview:</p>
<hr />
<p>This will be not<br />
inline.</p>
<hr />
<h3>Headers</h3>
<p>Markdown supports two styles of headers, Setext and atx.</p>
<h4>Setext</h4>
<p>HTML Tags: <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code></p>
<p>"Underlined" using <strong>equal signs (=)</strong> as <code>&lt;h1&gt;</code> and <strong>dashes (-)</strong> as <code>&lt;h2&gt;</code> in any number.</p>
<p>Code:</p>
<pre><code>This is an H1
=============
This is an H2
-------------
</code></pre>
<p>Preview:</p>
<hr />
<h1>This is an H1</h1>
<h2>This is an H2</h2>
<hr />
<h4>atx</h4>
<p>HTML Tags: <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;h4&gt;</code>, <code>&lt;h5&gt;</code>, <code>&lt;h6&gt;</code></p>
<p>Uses 1-6 <strong>hash characters (#)</strong> at the start of the line, corresponding to <code>&lt;h1&gt;</code> - <code>&lt;h6&gt;</code>.</p>
<p>Code:</p>
<pre><code># This is an H1
## This is an H2
###### This is an H6
</code></pre>
<p>Preview:</p>
<hr />
<h1>This is an H1</h1>
<h2>This is an H2</h2>
<h6>This is an H6</h6>
<hr />
<p>Optionally, you may "close" atx-style headers. The closing hashes <strong>don't need to match</strong> the number of hashes used to open the header.</p>
<p>Code:</p>
<pre><code># This is an H1 #
## This is an H2 ##
### This is an H3 ######
</code></pre>
<p>Preview:</p>
<hr />
<h1>This is an H1</h1>
<h2>This is an H2</h2>
<h3>This is an H3</h3>
<hr />
<h3>Blockquotes</h3>
<p>HTML Tag: <code>&lt;blockquote&gt;</code></p>
<p>Markdown uses email-style <strong>&gt;</strong> characters for blockquoting. It looks best if you hard wrap the text and put a &gt; before every line.</p>
<p>Code:</p>
<pre><code>&gt; This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
&gt; consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
&gt; Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
&gt;
&gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
&gt; id sem consectetuer libero luctus adipiscing.
</code></pre>
<p>Preview:</p>
<hr />
<blockquote>
<p>This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.</p>
<p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.</p>
</blockquote>
<hr />
<p>Markdown allows you to be lazy and only put the &gt; before the first line of a hard-wrapped paragraph.</p>
<p>Code:</p>
<pre><code>&gt; This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

&gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.
</code></pre>
<p>Preview:</p>
<hr />
<blockquote>
<p>This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.</p>
</blockquote>
<blockquote>
<p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.</p>
</blockquote>
<hr />
<p>Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of &gt;.</p>
<p>Code:</p>
<pre><code>&gt; This is the first level of quoting.
&gt;
&gt; &gt; This is nested blockquote.
&gt;
&gt; Back to the first level.
</code></pre>
<p>Preview:</p>
<hr />
<blockquote>
<p>This is the first level of quoting.</p>
<blockquote>
<p>This is nested blockquote.</p>
</blockquote>
<p>Back to the first level.</p>
</blockquote>
<hr />
<p>Blockquotes can contain other Markdown elements, including headers, lists, and code blocks.</p>
<p>Code:</p>
<pre><code>&gt; ## This is a header.
&gt;
&gt; 1.   This is the first list item.
&gt; 2.   This is the second list item.
&gt;
&gt; Here's some example code:
&gt;
&gt;     return shell_exec("echo $input | $markdown_script");
</code></pre>
<p>Preview:</p>
<hr />
<blockquote>
<h2>This is a header.</h2>
<ol>
<li>This is the first list item.</li>
<li>This is the second list item.</li>
</ol>
<p>Here's some example code:</p>
<pre><code>return shell_exec("echo $input | $markdown_script");
</code></pre>
</blockquote>
<hr />
<h3>Lists</h3>
<p>Markdown supports ordered (numbered) and unordered (bulleted) lists.</p>
<h4>Unordered</h4>
<p>HTML Tag: <code>&lt;ul&gt;</code></p>
<p>Unordered lists use <strong>asterisks (*)</strong>, <strong>pluses (+)</strong>, and <strong>hyphens (-)</strong>.</p>
<p>Code:</p>
<pre><code>*   Red
*   Green
*   Blue
</code></pre>
<p>Preview:</p>
<hr />
<ul>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ul>
<hr />
<p>is equivalent to:</p>
<p>Code:</p>
<pre><code>+   Red
+   Green
+   Blue
</code></pre>
<p>and:</p>
<p>Code:</p>
<pre><code>-   Red
-   Green
-   Blue
</code></pre>
<h4>Ordered</h4>
<p>HTML Tag: <code>&lt;ol&gt;</code></p>
<p>Ordered lists use numbers followed by periods:</p>
<p>Code:</p>
<pre><code>1.  Bird
2.  McHale
3.  Parish
</code></pre>
<p>Preview:</p>
<hr />
<ol>
<li>Bird</li>
<li>McHale</li>
<li>Parish</li>
</ol>
<hr />
<p>It's possible to trigger an ordered list by accident, by writing something like this:</p>
<p>Code:</p>
<pre><code>1986. What a great season.
</code></pre>
<p>Preview:</p>
<hr />
<ol>
<li>What a great season.</li>
</ol>
<hr />
<p>You can <strong>backslash-escape (\)</strong> the period:</p>
<p>Code:</p>
<pre><code>1986\. What a great season.
</code></pre>
<p>Preview:</p>
<hr />
<p>1986. What a great season.</p>
<hr />
<h4>Indented</h4>
<h5>Blockquote</h5>
<p>To put a blockquote within a list item, the blockquote's &gt; delimiters need to be indented:</p>
<p>Code:</p>
<pre><code>*   A list item with a blockquote:

    &gt; This is a blockquote
    &gt; inside a list item.
</code></pre>
<p>Preview:</p>
<hr />
<ul>
<li>
<p>A list item with a blockquote:</p>
<blockquote>
<p>This is a blockquote
inside a list item.</p>
</blockquote>
</li>
</ul>
<hr />
<h5>Code Block</h5>
<p>To put a code block within a list item, the code block needs to be indented twice — <strong>8 spaces</strong> or <strong>two tabs</strong>:</p>
<p>Code:</p>
<pre><code>*   A list item with a code block:

        &lt;code goes here&gt;
</code></pre>
<p>Preview:</p>
<hr />
<ul>
<li>
<p>A list item with a code block:</p>
<pre><code>&lt;code goes here&gt;
</code></pre>
</li>
</ul>
<hr />
<h5>Nested List</h5>
<p>Code:</p>
<pre><code>* A
  * A1
  * A2
* B
* C
</code></pre>
<p>Preview:</p>
<hr />
<ul>
<li>A
<ul>
<li>A1</li>
<li>A2</li>
</ul>
</li>
<li>B</li>
<li>C</li>
</ul>
<hr />
<h3>Code Blocks</h3>
<p>HTML Tag: <code>&lt;pre&gt;</code></p>
<p>Indent every line of the block by at least <strong>4 spaces</strong> or <strong>1 tab</strong>.</p>
<p>Code:</p>
<pre><code>This is a normal paragraph:

    This is a code block.
</code></pre>
<p>Preview:</p>
<hr />
<p>This is a normal paragraph:</p>
<pre><code>This is a code block.
</code></pre>
<hr />
<p>A code block continues until it reaches a line that is not indented (or the end of the article).</p>
<p>Within a code block, <strong><em>ampersands (&amp;)</em></strong> and angle <strong>brackets (&lt; and &gt;)</strong> are automatically converted into HTML entities.</p>
<p>Code:</p>
<pre><code>    &lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
</code></pre>
<p>Preview:</p>
<hr />
<pre><code>&lt;div class="footer"&gt;
    &amp;copy; 2004 Foo Corporation
&lt;/div&gt;
</code></pre>
<hr />
<p>Following sections Fenced Code Blocks and Syntax Highlighting are extensions, you can use the other way to write the code block.</p>
<h4>Fenced Code Blocks</h4>
<p>Just wrap your code in <code>```</code> (as shown below) and you won't need to indent it by four spaces.</p>
<p>Code:</p>
<pre><code>Here's an example:

```
function test() {
  console.log("notice the blank line before this function?");
}
```
</code></pre>
<p>Preview:</p>
<hr />
<p>Here's an example:</p>
<pre><code>function test() {
  console.log("notice the blank line before this function?");
}
</code></pre>
<hr />
<h4>Syntax Highlighting</h4>
<p>In your fenced block, add an optional language identifier and we'll run it through syntax highlighting (<a href="https://github.com/github/linguist/blob/master/lib/linguist/languages.yml">Support Languages</a>).</p>
<p>Code:</p>
<pre><code>```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
</code></pre>
<p>Preview:</p>
<hr />
<pre><code>require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
</code></pre>
<hr />
<h3>Horizontal Rules</h3>
<p>HTML Tag: <code>&lt;hr /&gt;</code>
Places <strong>three or more hyphens (-), asterisks (*), or underscores (_)</strong> on a line by themselves. You may use spaces between the hyphens or asterisks.</p>
<p>Code:</p>
<pre><code>* * *
***
*****
- - -
---------------------------------------
___
</code></pre>
<p>Preview:</p>
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<h3>Table</h3>
<p>HTML Tag: <code>&lt;table&gt;</code></p>
<p>It's an extension.</p>
<p>Separates column by <strong>pipe (|)</strong> and header by <strong>dashes (-)</strong>, and uses <strong>colon (:)</strong> for alignment.</p>
<p>The outer <strong>pipes (|)</strong> and alignment are optional. There are <strong>3 delimiters</strong> each cell at least for separating header.</p>
<p>Code:</p>
<pre><code>| Left | Center | Right |
|:-----|:------:|------:|
|aaa   |bbb     |ccc    |
|ddd   |eee     |fff    |

 A | B
---|---
123|456


A |B
--|--
12|45
</code></pre>
<p>Preview:</p>
<hr />
<table>
<thead>
<tr>
<th>Left</th>
<th>Center</th>
<th>Right</th>
</tr>
</thead>
<tbody>
<tr>
<td>aaa</td>
<td>bbb</td>
<td>ccc</td>
</tr>
<tr>
<td>ddd</td>
<td>eee</td>
<td>fff</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<td>123</td>
<td>456</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<td>12</td>
<td>45</td>
</tr>
</tbody>
</table>
<hr />
<h2>Span Elements</h2>
<h3>Links</h3>
<p>HTML Tag: <code>&lt;a&gt;</code></p>
<p>Markdown supports two style of links: inline and reference.</p>
<h4>Inline</h4>
<p>Inline link format like this: <code>[Link Text](URL "Title")</code></p>
<p>Title is optional.</p>
<p>Code:</p>
<pre><code>This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.
</code></pre>
<p>Preview:</p>
<hr />
<p>This is <a href="http://example.com/">an example</a> inline link.</p>
<p><a href="http://example.net/">This link</a> has no title attribute.</p>
<hr />
<p>If you're referring to a local resource on the same server, you can use relative paths:</p>
<p>Code:</p>
<pre><code>See my [About](/about/) page for details.
</code></pre>
<p>Preview:</p>
<hr />
<p>See my <a href="/about/">About</a> page for details.</p>
<hr />
<h4>Reference</h4>
<p>You could predefine link references. Format like this: <code>[id]: URL "Title"</code></p>
<p>Title is also optional. And the you refer the link, format like this: <code>[Link Text][id]</code></p>
<p>Code:</p>
<pre><code>[id]: http://example.com/  "Optional Title Here"
This is [an example][id] reference-style link.
</code></pre>
<p>Preview:</p>
<hr />
<p>This is <a href="http://example.com/">an example</a> reference-style link.</p>
<hr />
<p>That is:</p>
<ul>
<li>Square brackets containing the link identifier (<strong>not case sensitive</strong>, optionally indented from the left margin using up to three spaces);</li>
<li>followed by a colon;</li>
<li>followed by one or more spaces (or tabs);</li>
<li>followed by the URL for the link;</li>
<li>The link URL may, optionally, be surrounded by angle brackets.</li>
<li>optionally followed by a title attribute for the link, enclosed in double or single quotes, or enclosed in parentheses.</li>
</ul>
<p>The following three link definitions are equivalent:</p>
<p>Code:</p>
<pre><code>[foo]: http://example.com/  "Optional Title Here"
[foo]: http://example.com/  'Optional Title Here'
[foo]: http://example.com/  (Optional Title Here)
[foo]: &lt;http://example.com/&gt;  "Optional Title Here"
</code></pre>
<p>Uses an empty set of square brackets, the link text itself is used as the name.</p>
<p>Code:</p>
<pre><code>[Google]: http://google.com/
[Google][]
</code></pre>
<p>Preview:</p>
<hr />
<p><a href="http://google.com/">Google</a></p>
<hr />
<h3>Emphasis</h3>
<p>HTML Tags: <code>&lt;em&gt;</code>, <code>&lt;strong&gt;</code></p>
<p>Markdown treats <strong>asterisks (*)</strong> and <strong>underscores (_)</strong> as indicators of emphasis. <strong>One delimiter</strong> will be <code>&lt;em&gt;</code>; *<em>double delimiters</em> will be <code>&lt;strong&gt;</code>.</p>
<p>Code:</p>
<pre><code>*single asterisks*

_single underscores_

**double asterisks**

__double underscores__
</code></pre>
<p>Preview:</p>
<hr />
<p><em>single asterisks</em></p>
<p><em>single underscores</em></p>
<p><strong>double asterisks</strong></p>
<p><strong>double underscores</strong></p>
<hr />
<p>But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.</p>
<p>You can backslash escape it:</p>
<p>Code:</p>
<pre><code>\*this text is surrounded by literal asterisks\*
</code></pre>
<p>Preview:</p>
<hr />
<p>*this text is surrounded by literal asterisks*</p>
<hr />
<h3>Code</h3>
<p>HTML Tag: <code>&lt;code&gt;</code></p>
<p>Wraps it with <strong>backtick quotes (`)</strong>.</p>
<p>Code:</p>
<pre><code>Use the `printf()` function.
</code></pre>
<p>Preview:</p>
<hr />
<p>Use the <code>printf()</code> function.</p>
<hr />
<p>To include a literal backtick character within a code span, you can use <strong>multiple backticks</strong> as the opening and closing delimiters:</p>
<p>Code:</p>
<pre><code>``There is a literal backtick (`) here.``
</code></pre>
<p>Preview:</p>
<hr />
<p><code>There is a literal backtick (`) here.</code></p>
<hr />
<p>The backtick delimiters surrounding a code span may include spaces — one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:</p>
<p>Code:</p>
<pre><code>A single backtick in a code span: `` ` ``

A backtick-delimited string in a code span: `` `foo` ``
</code></pre>
<p>Preview:</p>
<hr />
<p>A single backtick in a code span: <code>`</code></p>
<p>A backtick-delimited string in a code span: <code>`foo`</code></p>
<hr />
<h3>Images</h3>
<p>HTML Tag: <code>&lt;img /&gt;</code></p>
<p>Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.</p>
<h4>Inline</h4>
<p>Inline image syntax looks like this: <code>![Alt text](URL "Title")</code></p>
<p>Title is optional.</p>
<p>Code:</p>
<pre><code>![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")
</code></pre>
<p>Preview:</p>
<hr />
<p><img src="https://s2.loli.net/2024/08/20/5fszgXeOxmL3Wdv.webp" alt="Alt text" /></p>
<p><img src="https://s2.loli.net/2024/08/20/5fszgXeOxmL3Wdv.webp" alt="Alt text" title="Optional title" /></p>
<hr />
<p>That is:</p>
<ul>
<li>An exclamation mark: !;</li>
<li>followed by a set of square brackets, containing the alt attribute text for the image;</li>
<li>followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.</li>
</ul>
<h4>Reference</h4>
<p>Reference-style image syntax looks like this: <code>![Alt text][id]</code></p>
<p>Code:</p>
<pre><code>[img id]: https://s2.loli.net/2024/08/20/5fszgXeOxmL3Wdv.webp  "Optional title attribute"
![Alt text][img id]
</code></pre>
<p>Preview:</p>
<hr />
<p><img src="https://s2.loli.net/2024/08/20/5fszgXeOxmL3Wdv.webp" alt="Alt text" title="Optional title attribute" /></p>
<hr />
<h3>Strikethrough</h3>
<p>HTML Tag: <code>&lt;del&gt;</code></p>
<p>It's an extension.</p>
<p>GFM adds syntax to strikethrough text.</p>
<p>Code:</p>
<pre><code>~~Mistaken text.~~
</code></pre>
<p>Preview:</p>
<hr />
<p><s>Mistaken text.</s></p>
<hr />
<h2>Miscellaneous</h2>
<h3>Automatic Links</h3>
<p>Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets.</p>
<p>Code:</p>
<pre><code>&lt;http://example.com/&gt;

&lt;address@example.com&gt;
</code></pre>
<p>Preview:</p>
<hr />
<p><a href="http://example.com/">http://example.com/</a></p>
<p><a href="mailto:address@example.com">address@example.com</a></p>
<hr />
<p>GFM will autolink standard URLs.</p>
<p>Code:</p>
<pre><code>https://github.com/emn178/markdown
</code></pre>
<p>Preview:</p>
<hr />
<p>https://github.com/emn178/markdown</p>
<hr />
<h3>Backslash Escapes</h3>
<p>Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax.</p>
<p>Code:</p>
<pre><code>\*literal asterisks\*
</code></pre>
<p>Preview:</p>
<hr />
<p>*literal asterisks*</p>
<hr />
<p>Markdown provides backslash escapes for the following characters:</p>
<p>Code:</p>
<pre><code>\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+   plus sign
-   minus sign (hyphen)
.   dot
!   exclamation mark
</code></pre>
<h2>Inline HTML</h2>
<p>For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.</p>
<p>Code:</p>
<pre><code>This is a regular paragraph.

&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;Foo&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

This is another regular paragraph.
</code></pre>
<p>Preview:</p>
<hr />
<p>This is a regular paragraph.</p>
<p>&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;Foo&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</p>
<p>This is another regular paragraph.</p>
<hr />
<p>Note that Markdown formatting syntax is <strong>not processed within block-level HTML tags</strong>.</p>
<p>Unlike block-level HTML tags, Markdown syntax is <strong>processed within span-level tags</strong>.</p>
<p>Code:</p>
<pre><code>&lt;span&gt;**Work**&lt;/span&gt;

&lt;div&gt;
    **No Work**
&lt;/div&gt;
</code></pre>
<p>Preview:</p>
<hr />
<p>&lt;span&gt;<strong>Work</strong>&lt;/span&gt;</p>
<p>&lt;div&gt;
<strong>No Work</strong>
&lt;/div&gt;</p>
<hr />
]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>Mermaid Diagram Gallery</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-mermaid/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-mermaid/</id>
    <published>2024-05-02T00:00:00.000Z</published>
    <updated>2024-05-02T00:00:00.000Z</updated>
    <summary>A gallery of Mermaid diagrams for processes, interactions, data models, schedules, and project history.</summary>
    <content type="html"><![CDATA[<p>Mermaid turns text descriptions in Markdown into diagrams. The examples below use Shirone's content workflow to demonstrate diagram types commonly used in technical articles and project notes.</p>
<h2>Flowchart</h2>
<p>Flowcharts describe a process, including decisions and paths that return to an earlier step.</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>Sequence Diagram</h2>
<p>Sequence diagrams present collaboration between participants in chronological order. This example follows a Swup navigation from request to Mermaid rendering.</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>Entity Relationship Diagram</h2>
<p>Entity relationship diagrams model structured data and the connections between authors, posts, tags, and comments.</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>Class Diagram</h2>
<p>Class diagrams communicate responsibilities, public methods, and dependency directions in a software design.</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>State Diagram</h2>
<p>State diagrams show the lifecycle of an object and the events that move it between states.</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 Chart</h2>
<p>XY charts combine bars and lines to compare values and trends over a shared axis.</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>Pie Chart</h2>
<p>Pie charts provide a compact comparison of how categories contribute to a whole.</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>Gantt Chart</h2>
<p>Gantt charts arrange tasks, dependencies, and milestones along a calendar timeline.</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>Mind Map</h2>
<p>Mind maps expand a central topic into related areas and supporting concepts.</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>Timeline</h2>
<p>Timelines summarize significant events or phases without requiring exact calendar durations.</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>User Journey</h2>
<p>User journey diagrams combine actions, participants, and experience scores across the stages of a task.</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 Graph</h2>
<p>Git graphs show how work progresses on a feature branch before it merges into the main line.</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>Kanban Board</h2>
<p>Kanban boards group tasks by workflow state to make current progress easy to scan.</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>Sankey Diagram</h2>
<p>Sankey diagrams use link width to show how traffic or another quantity flows between nodes.</p>
<pre><code>sankey-beta
Landing,Reading,720
Discovery,Reading,430
Reading,Explore,360
Reading,Topics,210
Reading,Outbound,140
</code></pre>
<p>Each example uses a standard <code>mermaid</code> code fence. The server preserves readable source markup, and the browser enhances it into an SVG that follows the active theme. Diagrams render again when the theme changes or when Swup navigates to this article.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown Extended Features</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-extended/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-extended/</id>
    <published>2024-05-01T00:00:00.000Z</published>
    <updated>2024-11-29T00:00:00.000Z</updated>
    <summary>Read more about Markdown features in Fuwari</summary>
    <content type="html"><![CDATA[<h2>GitHub Repository Cards</h2>
<p>You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.</p>
<p>::github{repo="Fabrizz/MMM-OnSpotify"}</p>
<p>Create a GitHub repository card with the code <code>::github{repo="&lt;owner&gt;/&lt;repo&gt;"}</code>.</p>
<pre><code>::github{repo="saicaca/fuwari"}
</code></pre>
<h2>Mermaid Diagrams</h2>
<p>Fenced <code>mermaid</code> blocks are rendered as diagrams and follow the active color scheme.</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>Admonitions</h2>
<p>Following types of admonitions are supported: <code>note</code> <code>tip</code> <code>important</code> <code>warning</code> <code>caution</code></p>
<p>:::note
Highlights information that users should take into account, even when skimming.
:::</p>
<p>:::tip
Optional information to help a user be more successful.
:::</p>
<p>:::important
Crucial information necessary for users to succeed.
:::</p>
<p>:::warning
Critical content demanding immediate user attention due to potential risks.
:::</p>
<p>:::caution
Negative potential consequences of an action.
:::</p>
<h3>Basic Syntax</h3>
<pre><code>:::note
Highlights information that users should take into account, even when skimming.
:::

:::tip
Optional information to help a user be more successful.
:::
</code></pre>
<h3>Custom Titles</h3>
<p>The title of the admonition can be customized.</p>
<p>:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::</p>
<pre><code>:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
</code></pre>
<h3>GitHub Syntax</h3>
<blockquote>
<p>[!TIP]
<a href="https://github.com/orgs/community/discussions/16925">The GitHub syntax</a> is also supported.</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>Spoiler</h3>
<p>You can add spoilers to your text. The text also supports <strong>Markdown</strong> syntax.</p>
<p>The content :spoiler[is hidden <strong>ayyy</strong>]!</p>
<pre><code>The content :spoiler[is hidden **ayyy**]!

</code></pre>
<h2>Image Widths and Captions</h2>
<p>A standalone image accepts an optional <code>w-N%</code> width token in its alt text and a Markdown title rendered as a centered caption below the image:</p>
<p><img src="/images/albums/AcgExample/07.webp" alt="Album example image w-50%" title="Half-width image with a caption" /></p>
<pre><code>![Image description w-50%](./image.webp "Visible caption")
</code></pre>
<p>Valid widths range from <code>w-1%</code> to <code>w-100%</code>; invalid tokens stay in the alt text. The width and the caption are independent — a title alone also produces a caption:</p>
<p><img src="/images/albums/AcgExample/08.webp" alt="Album example image w-75%" /></p>
<p><img src="/images/albums/AcgExample/09.webp" alt="Album example image" title="Caption without a width token" /></p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown 扩展</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-%E6%89%A9%E5%B1%95/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-%E6%89%A9%E5%B1%95/</id>
    <published>2024-05-01T00:00:00.000Z</published>
    <updated>2024-11-29T00:00:00.000Z</updated>
    <summary>在Mizuki中了解更多关于Markdown功能的信息</summary>
    <content type="html"><![CDATA[<h2>GitHub Repository Cards</h2>
<p>您可以添加动态卡片，链接到 GitHub 仓库，页面加载时，仓库信息从 GitHub API 中获取。</p>
<p>::github{repo="matsuzaka-yuki/Mizuki"}</p>
<p>创建一个带有代码 ::github{repo="&lt;owner&gt;/&lt;repo&gt;"} 的 GitHub 仓库卡片。</p>
<pre><code>::github{repo="matsuzaka-yuki/Mizuki"}
</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]
这是一条带有自定义标题的笔记。
:::
</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; GitHub 语法也被支持。

&gt; [!TIP]
&gt; GitHub 语法也被支持。
</code></pre>
<h3>Spoiler</h3>
<p>您可以在文本中添加 Spoiler。该文本还支持 Markdown 语法。</p>
<p>The content :spoiler[is hidden <strong>ayyy</strong>]!</p>
<pre><code>The content :spoiler[is hidden **ayyy**]!

</code></pre>
]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>Expressive Code Example</title>
    <link href="https://xn--kivr36a.1qw.top/posts/expressive-code/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/expressive-code/</id>
    <published>2024-04-10T00:00:00.000Z</published>
    <updated>2024-04-10T00:00:00.000Z</updated>
    <summary>How code blocks look in Markdown using Expressive Code.</summary>
    <content type="html"><![CDATA[<p>Here, we'll explore how code blocks look using <a href="https://expressive-code.com/">Expressive Code</a>. The provided examples are based on the official documentation, which you can refer to for further details.</p>
<h2>Expressive Code</h2>
<h3>Syntax Highlighting</h3>
<p><a href="https://expressive-code.com/key-features/syntax-highlighting/">Syntax Highlighting</a></p>
<h4>Regular syntax highlighting</h4>
<pre><code>console.log('This code is syntax highlighted!')
</code></pre>
<h4>Rendering ANSI escape sequences</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>Editor &amp; Terminal Frames</h3>
<p><a href="https://expressive-code.com/key-features/frames/">Editor &amp; Terminal Frames</a></p>
<h4>Code editor frames</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>Terminal frames</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>Overriding frame types</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>Text &amp; Line Markers</h3>
<p><a href="https://expressive-code.com/key-features/text-markers/">Text &amp; Line Markers</a></p>
<h4>Marking full lines &amp; line ranges</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>Selecting line marker types (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>Adding labels to line markers</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>Adding long labels on their own lines</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>Using diff-like syntax</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>Combining syntax highlighting with diff-like syntax</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>Marking individual text inside lines</h4>
<pre><code>function demo() {
  // Mark any given text inside lines
  return 'Multiple matches of the given text are supported';
}
</code></pre>
<h4>Regular expressions</h4>
<pre><code>console.log('The words yes and yep will be marked.')
</code></pre>
<h4>Escaping forward slashes</h4>
<pre><code>echo "Test" &gt; /home/test.txt
</code></pre>
<h4>Selecting inline marker types (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>Word Wrap</h3>
<p><a href="https://expressive-code.com/key-features/word-wrap/">Word Wrap</a></p>
<h4>Configuring word wrap per block</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>Configuring indentation of wrapped lines</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>Collapsible Sections</h2>
<p><a href="https://expressive-code.com/plugins/collapsible-sections/">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>Line Numbers</h2>
<p><a href="https://expressive-code.com/plugins/line-numbers/">Line Numbers</a></p>
<h3>Displaying line numbers per block</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>Changing the starting line number</h3>
<pre><code>console.log('Greetings from line 5!')
console.log('I am on line 6')
</code></pre>
]]></content>
    <author><name>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>富有表现力的代码示例</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E5%AF%8C%E6%9C%89%E8%A1%A8%E7%8E%B0%E5%8A%9B%E7%9A%84%E4%BB%A3%E7%A0%81/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E5%AF%8C%E6%9C%89%E8%A1%A8%E7%8E%B0%E5%8A%9B%E7%9A%84%E4%BB%A3%E7%A0%81/</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/">富有表现力的代码.</a>. 提供的示例基于官方文档，您可以参考这些文档了解更多详细信息。</p>
<h2>富有表现力的代码</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>选择行标记类型（标记、插入、删除）</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>结合语法高亮与类似差异的语法</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>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>简单指南</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E7%AE%80%E5%8D%95%E6%8C%87%E5%8D%97/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E7%AE%80%E5%8D%95%E6%8C%87%E5%8D%97/</id>
    <published>2024-04-01T00:00:00.000Z</published>
    <updated>2024-04-01T00:00:00.000Z</updated>
    <summary>如何使用这个博客模板。</summary>
    <content type="html"><![CDATA[<p>这个博客模板是使用 <a href="https://astro.build/">Astro</a> 构建的。对于本指南中未提及的内容，您可以在 <a href="https://docs.astro.build/">Astro 文档</a> 中找到答案。</p>
<h2>文章的前置内容</h2>
<pre><code>---
title: 我的第一篇博客文章
published: 2023-09-09
description: 这是我新 Astro 博客的第一篇文章。
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
</code></pre>
<table>
<thead>
<tr>
<th>属性</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>title</code></td>
<td>帖子的标题。</td>
</tr>
<tr>
<td><code>published</code></td>
<td>帖子发布的日期.</td>
</tr>
<tr>
<td><code>pinned</code></td>
<td>此帖子是否被固定在帖子列表的顶部。</td>
</tr>
<tr>
<td><code>priority</code></td>
<td>置顶帖的优先级。数值越小优先级越高（0、1、2...）。</td>
</tr>
<tr>
<td><code>encrypted</code></td>
<td>此帖子是否设置密码。</td>
</tr>
<tr>
<td><code>password</code></td>
<td>设置密码"******"</td>
</tr>
<tr>
<td><code>description</code></td>
<td>帖子的简短描述。显示在索引页面上。</td>
</tr>
<tr>
<td><code>image</code></td>
<td>帖子封面图片路径。&lt;br/&gt;1. 以 <code>http://</code> 或 <code>https://</code> 开头：使用网页图片&lt;br/&gt;2. 以 <code>/</code> 开头：用于 <code>public</code> 目录中的图片&lt;br/&gt;3. 没有上述前缀：相对于 markdown 文件的路径</td>
</tr>
<tr>
<td><code>tags</code></td>
<td>帖子的标签。</td>
</tr>
<tr>
<td><code>category</code></td>
<td>帖子的类别。</td>
</tr>
<tr>
<td><code>licenseName</code></td>
<td>帖子内容的许可名称。</td>
</tr>
<tr>
<td><code>author</code></td>
<td>帖子的作者。</td>
</tr>
<tr>
<td><code>sourceLink</code></td>
<td>帖子内容的来源链接或参考资料。</td>
</tr>
<tr>
<td><code>draft</code></td>
<td>如果这篇文章仍然是草稿，则不会显示。</td>
</tr>
</tbody>
</table>
<h2>放置文章文件的位置</h2>
<p>您的文章文件应放置在 <code>src/content/posts/</code> 目录中。您也可以创建子目录，以更好地组织您的文章和资源。</p>
<pre><code>src/content/posts/
├── post-1.md
└── post-2/
    ├── cover.webp
    └── index.md
</code></pre>
]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>🔒 加密贴示例</title>
    <link href="https://xn--kivr36a.1qw.top/posts/jia-mi-shi-li/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/jia-mi-shi-li/</id>
    <published>2024-01-15T00:00:00.000Z</published>
    <updated>2024-01-15T00:00:00.000Z</updated>
    <summary>该文章内容已加密，请输入密码后查看。</summary>
    <content type="html"><![CDATA[<p><em>🔒 本文已加密保护，请访问博客网站输入密码阅读全文。</em></p>]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>Markdown Example</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown/</id>
    <published>2023-10-01T00:00:00.000Z</published>
    <updated>2023-10-01T00:00:00.000Z</updated>
    <summary>A simple example of a Markdown blog post.</summary>
    <content type="html"><![CDATA[<h1>An h1 header</h1>
<p>Paragraphs are separated by a blank line.</p>
<p>2nd paragraph. <em>Italic</em>, <strong>bold</strong>, and <code>monospace</code>. Itemized lists
look like:</p>
<ul>
<li>this one</li>
<li>that one</li>
<li>the other one</li>
</ul>
<p>Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.</p>
<blockquote>
<p>Block quotes are
written like so.</p>
<p>They can span multiple paragraphs,
if you like.</p>
</blockquote>
<p>Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺</p>
<h2>An h2 header</h2>
<p>Here's a numbered list:</p>
<ol>
<li>first item</li>
<li>second item</li>
<li>third item</li>
</ol>
<p>Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here's a code sample:</p>
<pre><code># Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
</code></pre>
<p>As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:</p>
<pre><code>define foobar() {
    print "Welcome to flavor country!";
}
</code></pre>
<p>(which makes copying &amp; pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:</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>An h3 header</h3>
<p>Now a nested list:</p>
<ol>
<li>
<p>First, get these ingredients:</p>
<ul>
<li>carrots</li>
<li>celery</li>
<li>lentils</li>
</ul>
</li>
<li>
<p>Boil some water.</p>
</li>
<li>
<p>Dump everything in the pot and follow
this algorithm:</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>Do not bump wooden spoon or it will fall.</p>
</li>
</ol>
<p>Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).</p>
<p>Here's a link to <a href="http://foo.bar">a website</a>, to a <a href="local-doc.html">local
doc</a>, and to a <a href="#an-h2-header">section heading in the current
doc</a>. Here's a footnote [^1].</p>
<p>[^1]: Footnote text goes here.</p>
<p>Tables can look like this:</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>(The above is the caption for the table.) Pandoc also supports
multi-line tables:</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>A horizontal rule follows.</p>
<hr />
<p>Here's a definition list:</p>
<p>apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There's no "e" in tomatoe.</p>
<p>Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)</p>
<p>Here's a "line block":</p>
<p>| Line one
| Line too
| Line tree</p>
<p>and images can be specified like so:</p>
<p>Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:</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>And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown Xmind</title>
    <link href="https://xn--kivr36a.1qw.top/posts/markdown-xmind/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/markdown-xmind/</id>
    <published>2023-10-01T00:00:00.000Z</published>
    <updated>2023-10-01T00:00:00.000Z</updated>
    <summary>一个使用 Mermaid 的 Markdown 博客文章的简单示例。</summary>
    <content type="html"><![CDATA[<h1>带有Mermaid图表的Markdown完整指南</h1>
<p>本文演示了如何在 Markdown 文档中使用 Mermaid 创建各种复杂的图表，包括流程图、时序图、甘特图、类图和状态图。</p>
<h2>流程图示例</h2>
<p>流程图非常适合表示流程或算法步骤。</p>
<pre><code>graph TD
    A[Start] --&gt; B{Condition Check}
    B --&gt;|Yes| C[Process Step 1]
    B --&gt;|No| D[Process Step 2]
    C --&gt; E[Subprocess]
    D --&gt; E
    subgraph E [Subprocess Details]
        E1[Substep 1] --&gt; E2[Substep 2]
        E2 --&gt; E3[Substep 3]
    end
    E --&gt; F{Another Decision}
    F --&gt;|Option 1| G[Result 1]
    F --&gt;|Option 2| H[Result 2]
    F --&gt;|Option 3| I[Result 3]
    G --&gt; J[End]
    H --&gt; J
    I --&gt; J
</code></pre>
<h2>时序图示例</h2>
<p>序列图显示对象随时间的交互。</p>
<pre><code>sequenceDiagram
    participant User
    participant WebApp
    participant Server
    participant Database

    User-&gt;&gt;WebApp: Submit Login Request
    WebApp-&gt;&gt;Server: Send Auth Request
    Server-&gt;&gt;Database: Query User Credentials
    Database--&gt;&gt;Server: Return User Data
    Server--&gt;&gt;WebApp: Return Auth Result
    
    alt Auth Successful
        WebApp-&gt;&gt;User: Show Welcome Page
        WebApp-&gt;&gt;Server: Request User Data
        Server-&gt;&gt;Database: Get User Preferences
        Database--&gt;&gt;Server: Return Preferences
        Server--&gt;&gt;WebApp: Return User Data
        WebApp-&gt;&gt;User: Load Personalized Interface
    else Auth Failed
        WebApp-&gt;&gt;User: Show Error Message
        WebApp-&gt;&gt;User: Prompt Re-entry
    end
</code></pre>
<h2>甘特图示例</h2>
<p>甘特图非常适合显示项目进度和时间表。</p>
<pre><code>gantt
    title Website Development Project Timeline
    dateFormat  YYYY-MM-DD
    axisFormat  %m/%d
    
    section Design Phase
    Requirements Analysis      :a1, 2023-10-01, 7d
    UI Design                 :a2, after a1, 10d
    Prototype Creation        :a3, after a2, 5d
    
    section Development Phase
    Frontend Development      :b1, 2023-10-20, 15d
    Backend Development       :b2, after a2, 18d
    Database Design           :b3, after a1, 12d
    
    section Testing Phase
    Unit Testing              :c1, after b1, 8d
    Integration Testing       :c2, after b2, 10d
    User Acceptance Testing   :c3, after c2, 7d
    
    section Deployment
    Production Deployment     :d1, after c3, 3d
    Launch                    :milestone, after d1, 0d
</code></pre>
<h2>类图示例</h2>
<p>类图显示系统的静态结构，包括类、属性、方法及它们的关系。</p>
<pre><code>classDiagram
    class User {
        +String username
        +String password
        +String email
        +Boolean active
        +login()
        +logout()
        +updateProfile()
    }
    
    class Article {
        +String title
        +String content
        +Date publishDate
        +Boolean published
        +publish()
        +edit()
        +delete()
    }
    
    class Comment {
        +String content
        +Date commentDate
        +addComment()
        +deleteComment()
    }
    
    class Category {
        +String name
        +String description
        +addArticle()
        +removeArticle()
    }
    
    User "1" -- "*" Article : writes
    User "1" -- "*" Comment : posts
    Article "1" -- "*" Comment : has
    Article "1" -- "*" Category : belongs to
</code></pre>
<h2>状态图示例</h2>
<p>状态图显示了对象在其生命周期中经历的状态序列。</p>
<pre><code>stateDiagram-v2
    [*] --&gt; Draft
    
    Draft --&gt; UnderReview : submit
    UnderReview --&gt; Draft : reject
    UnderReview --&gt; Approved : approve
    Approved --&gt; Published : publish
    Published --&gt; Archived : archive
    Published --&gt; Draft : retract
    
    state Published {
        [*] --&gt; Active
        Active --&gt; Hidden : temporarily hide
        Hidden --&gt; Active : restore
        Active --&gt; [*]
        Hidden --&gt; [*]
    }
    
    Archived --&gt; [*]
</code></pre>
<h2>饼图示例</h2>
<p>饼图非常适合显示比例和百分比数据。</p>
<pre><code>pie title Website Traffic Sources Analysis
    "Search Engines" : 45.6
    "Direct Access" : 30.1
    "Social Media" : 15.3
    "Referral Links" : 6.4
    "Other Sources" : 2.6
</code></pre>
<h2>结论</h2>
<p>Mermaid是一个强大的工具，用于在标记文档中创建各种类型的图表。本文演示了如何使用流程图、序列图、甘特图、类图、状态图和饼图。这些图可以帮助您更清楚地表达复杂的概念、流程和数据结构。</p>
<p>要使用Mermaid，只需在代码块中指定Mermaid语言，并使用简洁的文本语法描述图表。Mermaid会自动将这些描述转换成美丽的视觉图表。
尝试在你的下一篇技术博客文章或项目文档中使用Mermaid图表-它们将使你的内容更专业，更容易理解！</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
  <entry>
    <title>Include Video in the Posts</title>
    <link href="https://xn--kivr36a.1qw.top/posts/video/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/video/</id>
    <published>2023-08-01T00:00:00.000Z</published>
    <updated>2023-08-01T00:00:00.000Z</updated>
    <summary>This post demonstrates how to include embedded video in a blog post.</summary>
    <content type="html"><![CDATA[<p>Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.</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>星痕</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>在帖子中包含视频</title>
    <link href="https://xn--kivr36a.1qw.top/posts/%E5%9C%A8%E5%B8%96%E5%AD%90%E4%B8%AD%E5%8C%85%E5%90%AB%E8%A7%86%E9%A2%91/" rel="alternate" type="text/html"/>
    <id>https://xn--kivr36a.1qw.top/posts/%E5%9C%A8%E5%B8%96%E5%AD%90%E4%B8%AD%E5%8C%85%E5%90%AB%E8%A7%86%E9%A2%91/</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: 在帖子中包含视频
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>&lt;iframe width="100%" height="468" src="https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;</p>
<h2>Bilibili</h2>
<p>&lt;iframe width="100%" height="468" src="//player.bilibili.com/player.html?bvid=BV1fK4y1s7Qf&amp;p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"&gt; &lt;/iframe&gt;</p>
]]></content>
    <author><name>星痕</name></author>
    <category term="指南"/>
  </entry>
</feed>
