<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Shirone</title>
  <subtitle>A Material 3 anime blog</subtitle>
  <link href="https://shirone.mysqil.com/" rel="alternate" type="text/html"/>
  <link href="https://shirone.mysqil.com/atom.xml" rel="self" type="application/atom+xml"/>
  <id>https://shirone.mysqil.com/</id>
  <updated>2026-08-26T00:00:00.000Z</updated>
  <entry>
    <title>Shirone Authoring &amp; Usage Guide</title>
    <link href="https://shirone.mysqil.com/posts/guide/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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
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>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>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>Shirone</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>🔒 Password Protection and Post Encryption Demo</title>
    <link href="https://shirone.mysqil.com/posts/encrypted-demo/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/posts/encrypted-demo/</id>
    <published>2026-08-20T00:00:00.000Z</published>
    <updated>2026-08-20T00:00:00.000Z</updated>
    <summary>This post is password-protected.</summary>
    <content type="html"><![CDATA[<p><em>🔒 This post is encrypted. Please visit the website and enter the password to read the full article.</em></p>]]></content>
    <author><name>Shirone</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>MDX Integration and M3E Atomic Components</title>
    <link href="https://shirone.mysqil.com/posts/mdx-showcase/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>Shirone</name></author>
    <category term="Guides"/>
  </entry>
  <entry>
    <title>Image Gallery Grid: Syntax and Complete Examples</title>
    <link href="https://shirone.mysqil.com/posts/image-grid-demo/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>Shirone</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Mermaid Diagram Gallery</title>
    <link href="https://shirone.mysqil.com/posts/markdown-mermaid/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>Shirone</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown Extended Features</title>
    <link href="https://shirone.mysqil.com/posts/markdown-extended/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>Shirone</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Expressive Code Example</title>
    <link href="https://shirone.mysqil.com/posts/expressive-code/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>Shirone</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Markdown Example</title>
    <link href="https://shirone.mysqil.com/posts/markdown/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>Shirone</name></author>
    <category term="Examples"/>
  </entry>
  <entry>
    <title>Include Video in the Posts</title>
    <link href="https://shirone.mysqil.com/posts/video/" rel="alternate" type="text/html"/>
    <id>https://shirone.mysqil.com/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>&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>Shirone</name></author>
    <category term="Examples"/>
  </entry>
</feed>
