<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Clina&apos;s Blog</title><description>Hi</description><link>https://clina.zz.ac/</link><language>zh_CN</language><item><title>自由软件之输入法————手机篇</title><link>https://clina.zz.ac/posts/free-inputs-mobile/</link><guid isPermaLink="true">https://clina.zz.ac/posts/free-inputs-mobile/</guid><description>本文系统介绍多平台自由输入法：Android 推荐同文（高度定制）、小企鹅（功能丰富）、语燕；iOS 与鸿蒙需侧载安装小企鹅；Linux 桌面环境按常规方式配置。各输入法均提供 GitHub 或 F-Droid 下载链接，满足不同用户对自由输入工具的需求。</description><pubDate>Sat, 07 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;本篇文章将介绍几款自由的手机输入法。&lt;/p&gt;
&lt;h1&gt;Android&lt;/h1&gt;
&lt;h2&gt;同文输入法 (Trime)&lt;/h2&gt;
&lt;p&gt;::github{repo=&quot;osfans/trime&quot;}&lt;/p&gt;
&lt;p&gt;下载链接：&amp;lt;br&amp;gt;
&lt;a href=&quot;https://f-droid.org/packages/com.osfans.trime&quot;&gt;&amp;lt;img alt=&apos;Get it on F-Droid&apos; src=&apos;https://fdroid.gitlab.io/artwork/badge/get-it-on.png&apos; width=&quot;207&quot; height=&quot;80&quot;/&amp;gt;&lt;/a&gt;
&lt;a href=&quot;https://github.com/osfans/trime/releases/latest&quot;&gt;&amp;lt;img src=&quot;https://github.com/rubenpgrady/get-it-on-github/raw/refs/heads/main/get-it-on-github.png&quot; alt=&quot;Get it on GitHub&quot; width=&quot;207&quot; height=&quot;80&quot;&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;小企鹅输入法 (Fcitx 5 For Android)&lt;/h2&gt;
&lt;p&gt;::github{repo=&quot;fcitx5-android/fcitx5-android&quot;}&lt;/p&gt;
&lt;p&gt;最新稳定版下载链接：&amp;lt;br&amp;gt;
&lt;a href=&quot;https://f-droid.org/packages/org.fcitx.fcitx5.android&quot;&gt;&amp;lt;img src=&quot;https://fdroid.gitlab.io/artwork/badge/get-it-on.png&quot; alt=&quot;Get it on F-Droid&quot; width=&quot;207&quot; height=&quot;80&quot;&amp;gt;&lt;/a&gt;
&lt;a href=&quot;https://github.com/fcitx5-android/fcitx5-android/releases/latest&quot;&gt;&amp;lt;img src=&quot;https://github.com/rubenpgrady/get-it-on-github/raw/refs/heads/main/get-it-on-github.png&quot; alt=&quot;Get it on GitHub&quot; width=&quot;207&quot; height=&quot;80&quot;&amp;gt;&lt;/a&gt; &amp;lt;br&amp;gt;
最新构建版下载链接：&amp;lt;br&amp;gt;
&lt;a href=&quot;https://jenkins.fcitx-im.org/job/android/job/fcitx5-android/&quot;&gt;&lt;img src=&quot;https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.fcitx-im.org/job/android/job/fcitx5-android/&quot; alt=&quot;build status&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;语燕输入法 (YuyanIME)&lt;/h2&gt;
&lt;p&gt;::github{repo=&quot;gurecn/YuyanIme&quot;}&lt;/p&gt;
&lt;p&gt;下载链接：&amp;lt;br&amp;gt;
&lt;a href=&quot;https://github.com/gurecn/YuyanIme/releases/latest&quot;&gt;&amp;lt;img src=&quot;https://github.com/rubenpgrady/get-it-on-github/raw/refs/heads/main/get-it-on-github.png&quot; alt=&quot;Get it on GitHub&quot; width=&quot;207&quot; height=&quot;80&quot;&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;iOS&lt;/h1&gt;
&lt;h2&gt;Fcitx 5 For iOS&lt;/h2&gt;
&lt;p&gt;::github{repo=&quot;fcitx-contrib/fcitx5-ios&quot;}&lt;/p&gt;
&lt;p&gt;需要侧载安装。&lt;/p&gt;
&lt;h1&gt;Harmony OS&lt;/h1&gt;
&lt;h2&gt;小企鹅输入法鸿蒙版 (Fcitx 5 For Harmony OS)&lt;/h2&gt;
&lt;p&gt;::github{repo=&quot;fcitx-contrib/fcitx5-harmony&quot;}&lt;/p&gt;
&lt;p&gt;下载链接：&amp;lt;br&amp;gt;
&lt;a href=&quot;https://github.com/fcitx-contrib/fcitx5-harmony/releases/tag/latest&quot;&gt;&amp;lt;img src=&quot;https://github.com/rubenpgrady/get-it-on-github/raw/refs/heads/main/get-it-on-github.png&quot; alt=&quot;Git it on GitHub&quot; width=&quot;207&quot; height=&quot;80&quot;&amp;gt;&lt;/a&gt; &amp;lt;br&amp;gt;
同样需要侧载安装。&lt;/p&gt;
&lt;h1&gt;postmarket OS / Ubuntu Touch / Mobian / Pure OS&lt;/h1&gt;
&lt;p&gt;输入法安装方式与 GNU/Linux 相同，这里不再详细讲解。&lt;/p&gt;
</content:encoded></item><item><title>为自己的脚本语言编写VSCode支持扩展：从零到发布完整指南</title><link>https://clina.zz.ac/posts/script-language-vscode-extension/</link><guid isPermaLink="true">https://clina.zz.ac/posts/script-language-vscode-extension/</guid><description>本文详细介绍为自定义脚本语言开发VSCode扩展的全过程，涵盖语法高亮、代码片段等基础功能，并指导打包发布与持续维护。</description><pubDate>Fri, 02 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;为自己的脚本语言编写VSCode支持扩展：从零到发布完整指南&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;作者：colaSensei | 发布时间：2026年1月&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;最近我为自己设计的游戏脚本语言PGNCode开发了VSCode扩展，过程中积累了不少经验。如果你也有自己的DSL（领域特定语言）或脚本语言，这篇文章将带你完整走过为它创建VSCode扩展的每一个步骤。&lt;/p&gt;
&lt;h2&gt;为什么需要为自定义语言开发VSCode扩展？&lt;/h2&gt;
&lt;p&gt;在我开发PaperVisualNovel引擎时，设计了PGNCode脚本语言。编写游戏需要编辑&lt;code&gt;.pgn&lt;/code&gt;文件，但遇到了一些问题：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;没有语法高亮&lt;/strong&gt;：所有文本都是同一个颜色，难以区分命令、变量和注释&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;没有代码提示&lt;/strong&gt;：需要记忆所有命令和参数格式&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;没有错误检查&lt;/strong&gt;：语法错误只能在运行时发现&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;开发体验差&lt;/strong&gt;：缺少现代IDE应有的功能&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;这些问题严重影响了开发效率。于是，我决定为PGNCode创建VSCode扩展。&lt;/p&gt;
&lt;h2&gt;准备工作&lt;/h2&gt;
&lt;h3&gt;技术栈需求&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Node.js&lt;/strong&gt; (&amp;gt;= 14.x)（这个应该都有吧）&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visual Studio Code&lt;/strong&gt; (用于开发和测试，这个不可能没有吧)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;基础的前端知识&lt;/strong&gt; (JSON, 正则表达式)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;开发工具&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;# 安装VSCode扩展开发工具
npm install -g yo generator-code
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;第一步：创建扩展项目&lt;/h2&gt;
&lt;p&gt;使用官方生成器创建基础项目：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# 创建项目目录
mkdir my-language-extension
cd my-language-extension

# 运行生成器
yo code
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在交互式界面中选择：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;New Language Support&lt;/strong&gt; (新语言支持)&lt;/li&gt;
&lt;li&gt;输入扩展名称、描述&lt;/li&gt;
&lt;li&gt;指定语言ID、文件扩展名&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;这会生成一个基础的项目结构。&lt;/p&gt;
&lt;h2&gt;第二步：理解项目结构&lt;/h2&gt;
&lt;p&gt;生成的项目包含以下核心文件：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;my-language-extension/
├── package.json              # 扩展清单
├── syntaxes/
│   └── language.tmLanguage.json # 语法定义
├── language-configuration.json  # 语言配置
└── README.md                 # 说明文档
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;1. package.json - 扩展清单&lt;/h3&gt;
&lt;p&gt;这是扩展的&quot;身份证&quot;，定义了扩展的基本信息和功能。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;name&quot;: &quot;my-language-support&quot;,
    &quot;displayName&quot;: &quot;My Language Support&quot;,
    &quot;description&quot;: &quot;Syntax highlighting for My Language&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;publisher&quot;: &quot;your-name&quot;,
    &quot;engines&quot;: { &quot;vscode&quot;: &quot;^1.75.0&quot; },
    &quot;categories&quot;: [&quot;Programming Languages&quot;],
    &quot;contributes&quot;: {
        &quot;languages&quot;: [{
            &quot;id&quot;: &quot;mylang&quot;,
            &quot;aliases&quot;: [&quot;My Language&quot;, &quot;mylang&quot;],
            &quot;extensions&quot;: [&quot;.mylang&quot;, &quot;.ml&quot;],
            &quot;configuration&quot;: &quot;./language-configuration.json&quot;
        }],
        &quot;grammars&quot;: [{
            &quot;language&quot;: &quot;mylang&quot;,
            &quot;scopeName&quot;: &quot;source.mylang&quot;,
            &quot;path&quot;: &quot;./syntaxes/mylang.tmLanguage.json&quot;
        }]
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. 语法定义文件 (TextMate语法)&lt;/h3&gt;
&lt;p&gt;这是最核心的部分，定义了如何高亮代码。VSCode使用TextMate语法系统。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;$schema&quot;: &quot;https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json&quot;,
    &quot;scopeName&quot;: &quot;source.mylang&quot;,
    &quot;patterns&quot;: [
        {
            &quot;name&quot;: &quot;comment.line.mylang&quot;,
            &quot;match&quot;: &quot;//.*&quot;
        },
        {
            &quot;name&quot;: &quot;keyword.control.mylang&quot;,
            &quot;match&quot;: &quot;\\b(if|else|while|for|return)\\b&quot;
        },
        {
            &quot;name&quot;: &quot;constant.numeric.mylang&quot;,
            &quot;match&quot;: &quot;\\b\\d+(\\.\\d+)?\\b&quot;
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;关键概念&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;scopeName&lt;/code&gt;: 语法的根作用域&lt;/li&gt;
&lt;li&gt;&lt;code&gt;patterns&lt;/code&gt;: 匹配规则数组&lt;/li&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt;: 作用域名称，决定高亮颜色&lt;/li&gt;
&lt;li&gt;&lt;code&gt;match&lt;/code&gt;: 正则表达式匹配模式&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;3. 语言配置文件&lt;/h3&gt;
&lt;p&gt;定义语言的编辑特性：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;comments&quot;: {
        &quot;lineComment&quot;: &quot;//&quot;,
        &quot;blockComment&quot;: [&quot;/*&quot;, &quot;*/&quot;]
    },
    &quot;brackets&quot;: [
        [&quot;{&quot;, &quot;}&quot;],
        [&quot;[&quot;, &quot;]&quot;],
        [&quot;(&quot;, &quot;)&quot;]
    ],
    &quot;autoClosingPairs&quot;: [
        { &quot;open&quot;: &quot;{&quot;, &quot;close&quot;: &quot;}&quot; },
        { &quot;open&quot;: &quot;[&quot;, &quot;close&quot;: &quot;]&quot; },
        { &quot;open&quot;: &quot;(&quot;, &quot;close&quot;: &quot;)&quot; },
        { &quot;open&quot;: &quot;\&quot;&quot;, &quot;close&quot;: &quot;\&quot;&quot; }
    ],
    &quot;indentationRules&quot;: {
        &quot;increaseIndentPattern&quot;: &quot;^.*\\{[^}\&quot;]*$|^.*\\([^)\&quot;]*$&quot;,
        &quot;decreaseIndentPattern&quot;: &quot;^\\s*\\}|^\\s*\\)&quot;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;第三步：设计语法高亮规则&lt;/h2&gt;
&lt;h3&gt;分析语言特性&lt;/h3&gt;
&lt;p&gt;以我的PGNCode为例，我需要识别：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;注释&lt;/strong&gt;：&lt;code&gt;// 这是注释&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;命令&lt;/strong&gt;：&lt;code&gt;say&lt;/code&gt;, &lt;code&gt;wait&lt;/code&gt;, &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;if&lt;/code&gt; 等&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;变量&lt;/strong&gt;：&lt;code&gt;${variable}&lt;/code&gt; 格式&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;数字&lt;/strong&gt;：整数和小数&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;字符串&lt;/strong&gt;：引号内的文本&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;标签&lt;/strong&gt;：&lt;code&gt;LABEL_NAME:&lt;/code&gt; 格式&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;编写匹配规则&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;scopeName&quot;: &quot;source.pgn&quot;,
    &quot;patterns&quot;: [
        // 注释
        {
            &quot;name&quot;: &quot;comment.line.double-slash.pgn&quot;,
            &quot;match&quot;: &quot;//.*&quot;
        },

        // 命令（小心处理边界）
        {
            &quot;name&quot;: &quot;keyword.control.pgn&quot;,
            &quot;match&quot;: &quot;(?&amp;lt;!\\$\\{)\\b(say|wait|set|if|choose)\\b(?!\\})&quot;
        },

        // 变量引用
        {
            &quot;name&quot;: &quot;variable.parameter.pgn&quot;,
            &quot;begin&quot;: &quot;\\$\\{&quot;,
            &quot;end&quot;: &quot;\\}&quot;,
            &quot;patterns&quot;: [
                {
                    &quot;name&quot;: &quot;variable.other.pgn&quot;,
                    &quot;match&quot;: &quot;[a-zA-Z_][a-zA-Z0-9_]*&quot;
                }
            ]
        },

        // 标签定义（行首的单词后跟冒号）
        {
            &quot;name&quot;: &quot;entity.name.tag.pgn&quot;,
            &quot;match&quot;: &quot;^\\s*[A-Za-z_][A-Za-z0-9_]*:&quot;
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;技巧&lt;/strong&gt;：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;使用&lt;code&gt;begin&lt;/code&gt;/&lt;code&gt;end&lt;/code&gt;处理嵌套结构&lt;/li&gt;
&lt;li&gt;使用负向零宽断言避免错误匹配&lt;/li&gt;
&lt;li&gt;从简单规则开始，逐步完善&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;第四步：添加代码片段&lt;/h2&gt;
&lt;p&gt;代码片段可以极大提高编码效率：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;If Command&quot;: {
        &quot;prefix&quot;: [&quot;if&quot;, &quot;IF&quot;],
        &quot;body&quot;: [
            &quot;if ${1:variable} ${2|==,!=,&amp;gt;,&amp;lt;,&amp;gt;=,&amp;lt;=|} ${3:value} ${4:LABEL_NAME}&quot;
        ],
        &quot;description&quot;: &quot;Conditional jump&quot;
    },
    &quot;Say Command&quot;: {
        &quot;prefix&quot;: &quot;say&quot;,
        &quot;body&quot;: [
            &quot;say ${1:text} ${2:0.5} ${3|white,black,blue,green,red,yellow|}&quot;
        ],
        &quot;description&quot;: &quot;Display text with typing effect&quot;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;特性&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prefix&lt;/code&gt;: 触发补全的文本&lt;/li&gt;
&lt;li&gt;&lt;code&gt;body&lt;/code&gt;: 插入的代码，支持占位符&lt;code&gt;${n:default}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;选择列表：&lt;code&gt;${1|option1,option2|}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;变量：&lt;code&gt;${TM_FILENAME}&lt;/code&gt;等内置变量&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;第五步：本地测试&lt;/h2&gt;
&lt;h3&gt;启动调试&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;在VSCode中打开扩展项目&lt;/li&gt;
&lt;li&gt;按 &lt;code&gt;F5&lt;/code&gt; 启动扩展开发主机&lt;/li&gt;
&lt;li&gt;在新窗口中创建测试文件&lt;/li&gt;
&lt;li&gt;验证语法高亮和代码片段&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;常见问题调试&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;问题1：语法高亮不工作&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;检查&lt;code&gt;.tmLanguage.json&lt;/code&gt;格式&lt;/li&gt;
&lt;li&gt;验证正则表达式是否正确&lt;/li&gt;
&lt;li&gt;检查文件扩展名关联&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;问题2：代码片段不出现&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;检查&lt;code&gt;snippets/*.json&lt;/code&gt;文件格式&lt;/li&gt;
&lt;li&gt;确认&lt;code&gt;snippet&lt;/code&gt;的&lt;code&gt;language&lt;/code&gt;字段正确&lt;/li&gt;
&lt;li&gt;重启扩展主机&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;问题3：扩展无法激活&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;检查&lt;code&gt;package.json&lt;/code&gt;中的&lt;code&gt;activationEvents&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;查看&quot;输出&quot;面板的&quot;扩展主机&quot;日志&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;第六步：高级功能&lt;/h2&gt;
&lt;h3&gt;1. 添加命令和配置&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;contributes&quot;: {
        &quot;commands&quot;: [{
            &quot;command&quot;: &quot;mylang.formatDocument&quot;,
            &quot;title&quot;: &quot;Format MyLang Document&quot;
        }],
        &quot;configuration&quot;: {
            &quot;title&quot;: &quot;My Language&quot;,
            &quot;properties&quot;: {
                &quot;mylang.enableSyntaxHighlighting&quot;: {
                    &quot;type&quot;: &quot;boolean&quot;,
                    &quot;default&quot;: true,
                    &quot;description&quot;: &quot;Enable syntax highlighting&quot;
                }
            }
        }
    },
    &quot;activationEvents&quot;: [
        &quot;onLanguage:mylang&quot;,
        &quot;onCommand:mylang.formatDocument&quot;
    ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. 创建语言服务器（可选）&lt;/h3&gt;
&lt;p&gt;对于复杂的语言功能（代码补全、诊断、跳转定义），可以考虑实现Language Server：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// 创建Language Server
import * as vscode from &apos;vscode&apos;;
import * as lsp from &apos;vscode-languageclient&apos;;

export function activate(context: vscode.ExtensionContext) {
    const serverOptions: lsp.ServerOptions = {
        command: &apos;node&apos;,
        args: [context.asAbsolutePath(&apos;server/server.js&apos;)]
    };

    const clientOptions: lsp.LanguageClientOptions = {
        documentSelector: [{ scheme: &apos;file&apos;, language: &apos;mylang&apos; }]
    };

    const client = new lsp.LanguageClient(
        &apos;mylangServer&apos;,
        &apos;My Language Server&apos;,
        serverOptions,
        clientOptions
    );

    client.start();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;第七步：打包和发布&lt;/h2&gt;
&lt;h3&gt;1. 安装打包工具&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;npm install -g @vscode/vsce
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. 准备发布&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;# 更新版本号
# 完善README.md
# 添加LICENSE
# 更新CHANGELOG.md
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. 打包&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;vsce package
# 生成: my-language-support-1.0.0.vsix
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. 发布到市场&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;方法A：直接发布&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vsce publish
# 需要发布者令牌
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;方法B：手动上传&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;访问 &lt;a href=&quot;https://marketplace.visualstudio.com/manage&quot;&gt;VS Code Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;点击&quot;上传扩展&quot;&lt;/li&gt;
&lt;li&gt;选择生成的&lt;code&gt;.vsix&lt;/code&gt;文件&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;第八步：持续维护&lt;/h2&gt;
&lt;h3&gt;监控反馈&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;关注GitHub Issues&lt;/li&gt;
&lt;li&gt;查看市场评价&lt;/li&gt;
&lt;li&gt;收集用户需求&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;版本更新流程&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;修改代码&lt;/li&gt;
&lt;li&gt;更新版本号&lt;/li&gt;
&lt;li&gt;更新CHANGELOG&lt;/li&gt;
&lt;li&gt;测试&lt;/li&gt;
&lt;li&gt;打包&lt;/li&gt;
&lt;li&gt;发布&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;最佳实践&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;渐进增强&lt;/strong&gt;：先实现语法高亮，再逐步添加高级功能&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;测试驱动&lt;/strong&gt;：为每个功能创建测试用例&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;文档完善&lt;/strong&gt;：清晰的README和注释&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;性能优化&lt;/strong&gt;：避免复杂的正则表达式&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;向后兼容&lt;/strong&gt;：谨慎修改现有功能&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;实战经验分享&lt;/h2&gt;
&lt;h3&gt;踩过的坑&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;正则表达式性能问题&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// 错误：过于复杂的正则
&quot;match&quot;: &quot;\\b(say|wait|show|end|set|random|jump|if|choose|endname|SAY|WAIT|SHOW|END|SET|RANDOM|JUMP|IF|CHOOSE|ENDNAME)\\b&quot;

// 优化：使用忽略大小写标志
&quot;match&quot;: &quot;(?i)\\b(say|wait|show|end|set|random|jump|if|choose|endname)\\b&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;作用域冲突&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// 变量引用内部的文本不应该被当作命令高亮
// 错误：${say} 中的 &quot;say&quot; 被高亮为命令
// 解决：在命令匹配中使用负向零宽断言
&quot;match&quot;: &quot;(?&amp;lt;!\\$\\{)\\b(say|wait|set)\\b(?!\\})&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;效率技巧&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;使用开发工具&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.textmate-grammar-tester&quot;&gt;TextMate Grammar Tester&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-textmate&quot;&gt;Scope Inspector&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;模板化开发&lt;/strong&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// 自动生成代码片段的脚本
const commands = [
    { name: &apos;say&apos;, desc: &apos;Display text&apos; },
    { name: &apos;set&apos;, desc: &apos;Set variable&apos; }
];

const snippets = {};
commands.forEach(cmd =&amp;gt; {
    snippets[cmd.name] = {
        prefix: cmd.name,
        body: [`${cmd.name} \${1:placeholder}`],
        description: cmd.desc
    };
});
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;测试用例&lt;/strong&gt;：
创建测试文件覆盖所有语法特性：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;test-cases.mylang
├── 注释测试
├── 命令测试
├── 变量测试
└── 边界情况测试
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;成果展示&lt;/h2&gt;
&lt;p&gt;完成扩展后，我的PGNCode开发体验得到了极大改善：&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;之前&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;纯文本编辑&lt;/li&gt;
&lt;li&gt;需要查手册&lt;/li&gt;
&lt;li&gt;运行时才发现错误&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;之后&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;彩色语法高亮&lt;/li&gt;
&lt;li&gt;智能代码补全&lt;/li&gt;
&lt;li&gt;实时错误提示&lt;/li&gt;
&lt;li&gt;开发效率提升300%（哈哈）&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;资源推荐&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;官方文档&lt;/strong&gt;：&lt;a href=&quot;https://code.visualstudio.com/api&quot;&gt;VSCode Extension API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;示例项目&lt;/strong&gt;：&lt;a href=&quot;https://github.com/Microsoft/vscode-extension-samples&quot;&gt;VSCode Extension Samples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;语法参考&lt;/strong&gt;：&lt;a href=&quot;https://macromates.com/manual/en/language_grammars&quot;&gt;TextMate Language Grammars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;正则测试&lt;/strong&gt;：&lt;a href=&quot;https://regex101.com/&quot;&gt;Regex101&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;结语&lt;/h2&gt;
&lt;p&gt;为自己的脚本语言开发VSCode扩展是一项很有价值的工作。它不仅提升了开发体验，也让你的语言看起来更加&quot;专业&quot;。整个过程虽然有些技术细节需要处理，但收获的成就感是巨大的。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;关键点回顾&lt;/strong&gt;：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;从简单的语法高亮开始&lt;/li&gt;
&lt;li&gt;逐步添加代码片段、配置等高级功能&lt;/li&gt;
&lt;li&gt;充分测试，特别关注边界情况&lt;/li&gt;
&lt;li&gt;文档完善，便于他人使用&lt;/li&gt;
&lt;li&gt;持续维护，响应用户反馈&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;希望这篇文章能帮助你也为自己的语言创建出色的开发工具。&lt;/p&gt;
</content:encoded></item><item><title>如何将你的Fuwari博客部署到Codeberg Pages (Forgejo Actions版)</title><link>https://clina.zz.ac/posts/fuwari-codeberg-pages/</link><guid isPermaLink="true">https://clina.zz.ac/posts/fuwari-codeberg-pages/</guid><description>本文介绍将Fuwari博客部署到Codeberg Pages的方法：先打开Actions，再配置仓库工作流文件，实现代码推送后自动构建并发布至专属页面。</description><pubDate>Sun, 28 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Codeberg Pages 是 Codeberg 官方提供的一个静态网站托管平台，类似于 Github Pages.&amp;lt;br&amp;gt;
今天我们就要将Fuwari博客部署到Codeberg Pages , 使用 Forgejo Actions.&amp;lt;br&amp;gt;
首先，在仓库中点击设置，点击仓库功能 / 概览，打开 Actions，保存设置。&amp;lt;br&amp;gt;
接下来，回到仓库，在仓库根目录新建&lt;code&gt;.forgejo/workflows&lt;/code&gt;文件夹.&amp;lt;br&amp;gt;
在文件夹中添加 &lt;code&gt;astro.yml&lt;/code&gt; 文件，内容如下：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;name: Deploy Astro site to Pages

on:
  # Runs on pushes targeting the default branch
  push:
    branches:
      # If you want to build from a different branch, change it here.
      - main
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build:
    # You can find the list of available runners on https://codeberg.org/actions/meta, or run one yourself.
    runs-on: codeberg-medium-lazy
    steps:
      - name: Clone the repository
        uses: https://code.forgejo.org/actions/checkout@v4
        with:
          submodules: recursive
          fetch-depth: 0
      - name: check .domains files
        run: |
          git ls-files public/.domains
          ls -la public/
          ls -la public/.domains || echo &quot;.domains not found&quot;
      - name: Setup pnpm
        uses: pnpm/action-setup@v2
        with:
          version: 10
      - name: Setup Node.js
        uses: https://code.forgejo.org/actions/setup-node@v4
        with:
          node-version: 22
          cache: &apos;pnpm&apos;
      - name: Install dependencies
        run: |
          pnpm install
          pnpm install @astrojs/sitemap
      - name: Build Astro site
        run: pnpm run build

      - name: Upload generated files
        uses: https://code.forgejo.org/actions/upload-artifact@v3
        with:
          name: Generated files
          path: dist/
          include-hidden-files: true
      
  deploy:
    needs: [ build ]
    runs-on: codeberg-tiny-lazy
    steps:
      - name: Clone the repository
        uses: https://code.forgejo.org/actions/checkout@v4
        with:
          submodules: recursive
          fetch-depth: 0

      - name: Checkout the target branch and clean it up
        run: |
          git checkout pages || git switch --orphan pages
          rm -Rfv $(ls -A | egrep -v &apos;^(\.git|LICENSE)$&apos;)

      - name: Download generated files
        uses: https://code.forgejo.org/actions/download-artifact@v3
        with:
          name: Generated files

      - name: Publish the website
        run: |
          git config user.email codeberg-ci
          git config user.name &quot;Codeberg CI&quot;
          echo &quot;=== Files being committed ===&quot;
          ls -la
          git add .
          git commit --allow-empty --message &quot;Codeberg build for ${GITHUB_SHA}&quot;
          git push origin pages
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;br&amp;gt;
然后，就可以愉快的在Codeberg Pages上部署Fuwari博客了！&lt;/p&gt;
</content:encoded></item><item><title>FreeDomainOne 域名注册教程</title><link>https://clina.zz.ac/posts/free-domain-one/</link><guid isPermaLink="true">https://clina.zz.ac/posts/free-domain-one/</guid><description>这篇教程介绍了在 FreeDomainOne 注册免费域名的步骤、可用后缀、重要续期规则，并提醒注意注册时的安全风险。</description><pubDate>Fri, 14 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;今天推荐的是 FreeDomainOne 的免费域名，他们提供了&lt;code&gt;publicvm.com&lt;/code&gt;,&lt;code&gt;run.place&lt;/code&gt;,&lt;code&gt;linkpc.net&lt;/code&gt;和&lt;code&gt;work.gd&lt;/code&gt;后缀的域名.&amp;lt;br&amp;gt;
首先，进入他们的官网：&lt;a href=&quot;https://freedomain.one&quot;&gt;https://freedomain.one/&lt;/a&gt;;&amp;lt;br&amp;gt;
接下来，注册一个账户,并点击发过来的验证邮件里的链接;&amp;lt;br&amp;gt;
然后，回到他们的官网，输入你想要的域名前缀并选择域名后缀，完成后点击&lt;code&gt;Check Availability&lt;/code&gt;,检查域名是否可用；&amp;lt;br&amp;gt;
如果可用,点击&lt;code&gt;Claim This Name &amp;gt;&amp;gt;&lt;/code&gt;按钮,进入付款页面;&amp;lt;br&amp;gt;
进入付款页面后,保持默认设置,点击&lt;code&gt;SUBMIT &amp;gt;&amp;gt;&lt;/code&gt;按钮,注册完成.注意,要记住 Free renew after 后面的日期,以后有用.&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;h3&gt;注意：注册的域名必须在 Free renew after 后面的日期以后一个月内续期，否则域名会被删除. &amp;lt;br&amp;gt;&lt;/h3&gt;
&lt;p&gt;教程至此结束.&amp;lt;br&amp;gt;
补充：推荐使用&lt;a href=&quot;https://www.emailtick.com&quot;&gt;https://www.emailtick.com/&lt;/a&gt; 的临时邮箱注册,因为当你输错用户名和密码时，这个网站会把使用这个用户名的用户注册时用的邮箱直接显示出来,有安全风险.&lt;/p&gt;
</content:encoded></item><item><title>osfc.org.cn &amp;&amp; osfs.top 域名注册教程</title><link>https://clina.zz.ac/posts/osfc-org-cn/</link><guid isPermaLink="true">https://clina.zz.ac/posts/osfc-org-cn/</guid><description>该教程介绍如何在 OSFC 注册域名，需使用邀请链接获取积分，每个域名消耗50积分，暂不支持修改 NS 服务器，仅推荐体验。</description><pubDate>Fri, 14 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;如题，今天讲的是这两个域名的注册教程，暂时都无法托管到 Cloudflare.&amp;lt;br&amp;gt;
官网地址：&lt;a href=&quot;https://registry.osfc.org.cn&quot;&gt;https://registry.osfc.org.cn&lt;/a&gt;&amp;lt;br&amp;gt;
我的邀请链接：&lt;a href=&quot;https://registry.osfc.org.cn/register?invite=286&quot;&gt;https://registry.osfc.org.cn/register?invite=286&lt;/a&gt;&amp;lt;br&amp;gt;
推荐使用邀请链接，因为那样你可以拿到20Points 奖励&amp;lt;br&amp;gt;
第一步，使用上面两个链接的其中一个，进入官网.&amp;lt;br&amp;gt;
第二步，在右上角找到 Sign up 按钮，并点击，注册一个账号.&amp;lt;br&amp;gt;
第三步，进入仪表板，点+号添加一个域名.&amp;lt;br&amp;gt;注意，创建一个域名需花费50Points,而注册时会送100Points，也就是可以注册2个域名&amp;lt;br&amp;gt;
这个域名无法修改 NS 服务器（也许吧），暂时不推荐用作主力域名，只推荐玩一玩.&lt;/p&gt;
</content:encoded></item><item><title>ZoneABC 域名注册教程</title><link>https://clina.zz.ac/posts/zoneabc/</link><guid isPermaLink="true">https://clina.zz.ac/posts/zoneabc/</guid><description>这篇教程介绍了如何在 ZoneABC 注册域名，包括可用后缀、注册步骤、积分规则及 DNS 限制，适合用作备用域名。</description><pubDate>Fri, 14 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;如题，今天讲一下 ZoneABC 域名的注册教程.&amp;lt;br&amp;gt;
ZoneABC 提供了&lt;code&gt;webn.cc&lt;/code&gt;,&lt;code&gt;zabc.net&lt;/code&gt;,&lt;code&gt;sylu.cc&lt;/code&gt;,&lt;code&gt;sylu.net&lt;/code&gt;,&lt;code&gt;acg.rest&lt;/code&gt;,&lt;code&gt;vvvv.ee&lt;/code&gt;和&lt;code&gt;ctrl.li&lt;/code&gt;后缀的域名.&amp;lt;br&amp;gt;
官网：&lt;a href=&quot;https://zoneabc.net&quot;&gt;https://zoneabc.net/&lt;/a&gt;&amp;lt;br&amp;gt;
邀请链接：&lt;a href=&quot;https://zoneabc.net/register?invite=cd9373abf598410ea2294f47a1db8d6d&quot;&gt;https://zoneabc.net/register?invite=cd9373abf598410ea2294f47a1db8d6d&lt;/a&gt;&amp;lt;br&amp;gt;
第一步，点击上面两个链接中的其中一个，进入注册界面，推荐使用邀请链接注册，那样你可以获得额外的10积分.&amp;lt;br&amp;gt;
第二步，注册好账户后，进入面板，注册一个域名.&lt;strong&gt;注意，一些前缀比较短的域名会需要积分，经过测试，前缀长度为7及以上的域名无需积分，如果有错误请指正&lt;/strong&gt;&amp;lt;br&amp;gt;
这个域名比 osfc.org.cn 良心一点，但 DNS 记录只可添加20条，适合做备用.&lt;/p&gt;
</content:encoded></item><item><title>PublicFreeSuffix 域名申请教程</title><link>https://clina.zz.ac/posts/public-free-suffix/</link><guid isPermaLink="true">https://clina.zz.ac/posts/public-free-suffix/</guid><description>本文详细介绍了如何通过 GitHub 免费申请 PublicFreeSuffix 域名的详细步骤</description><pubDate>Wed, 01 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;如题，此帖讲的是 PublicFreeSuffix 免费域名的申请教程.&amp;lt;br&amp;gt;
首先，打开他们的 GitHub 仓库地址：
&lt;a href=&quot;https://github.com/PublicFreeSuffix/PublicFreeSuffix&quot;&gt;https://github.com/PublicFreeSuffix/PublicFreeSuffix&lt;/a&gt;&amp;lt;br&amp;gt;
他们提供了&lt;code&gt;pfsdns.org&lt;/code&gt;,&lt;code&gt;nastu.net&lt;/code&gt;,&lt;code&gt;tun.re&lt;/code&gt;,&lt;code&gt;6ti.net&lt;/code&gt;和&lt;code&gt;no.kg&lt;/code&gt;后缀的免费域名,都无法托管到 Cloudflare.&amp;lt;br&amp;gt;
注册域名步骤：&amp;lt;br&amp;gt;
第一步，fork 他们的 GitHub 仓库.&amp;lt;br&amp;gt;
第二步，打开你 fork 的仓库，在 whois 文件夹里新建一个 json 文件，文件名为&lt;code&gt;你想注册的域名.no.kg.json&lt;/code&gt;.&amp;lt;br&amp;gt;
这里使用 no.kg 的域名后缀作为演示，如果想使用其他域名后缀，请把 no.kg 改为你想使用的域名后缀.&amp;lt;br&amp;gt;
json 文件格式：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;registrant&quot;: &quot;一个可以发邮件的邮箱&quot;,
  &quot;domain&quot;: &quot;域名名字&quot;,
  &quot;sld&quot;: &quot;域名后缀&quot;,
  &quot;nameservers&quot;: [
    &quot;NS 服务器1&quot;,
    &quot;NS 服务器2&quot;,
    &quot;NS 服务器3&quot;,
    &quot;NS 服务器4&quot;
  ],
  &quot;agree_to_agreements&quot;: {
    &quot;registration_and_use_agreement&quot;: true,
    &quot;acceptable_use_policy&quot;: true,
    &quot;privacy_policy&quot;: true
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;第三步，在你 fork 的仓库里把这个提交创建为一个新分支，名字为&lt;code&gt;域名全称-request-1&lt;/code&gt;.&amp;lt;br&amp;gt;
注意：第几次更改就填数字几&amp;lt;br&amp;gt;
第四步，向官方仓库发起一个拉取请求，标题为&lt;code&gt;Registration/Update/Remove: 域名名字.域名后缀&lt;/code&gt;
内容这样填写：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; All items should be completed and confirmed to trigger the automatic merge workflow.

## Operation Type
- [x] Registration, Register a new domain name.
- [ ] Update, Update NS information or registrant email for an existing domain.
- [ ] Remove, Cancel my domain name.

## Domain
- [x] 域名名字.域名后缀

## Confirmation Items
- [x] I confirm that I will deploy the website content for this domain name and put it into use within 30 days instead of hoarding and occupying resources.
- [x] I confirm that the title of this Pull Request and the submitted files are in the standard format; otherwise, it will not be processed automatically.
- [x] I confirmed that the name in the whois file meets the standards.
- [x] I confirm that the domain name is at least 3 characters.
- [x] I confirm that I have read and understood the [Acceptable Use Policy](https://github.com/PublicFreeSuffix/PublicFreeSuffix/blob/main/agreements/acceptable-use-policy.md).
- [x] I confirm that I have read and agree to the [Privacy Policy](https://github.com/PublicFreeSuffix/PublicFreeSuffix/blob/main/agreements/privacy-policy.md).
- [x] I confirm that I have read and agree to the [Registration And Use Agreement](https://github.com/PublicFreeSuffix/PublicFreeSuffix/blob/main/agreements/registration-and-use-agreement-sokg.md).
- [x] I confirm that the domain does not contain any reserved terms from the [Reserved Words List](https://github.com/PublicFreeSuffix/PublicFreeSuffix/blob/main/reserved_words.txt).
- [x] I confirm that I will complete the registrant&apos;s email verification according to [ARAE Instructions](https://github.com/PublicFreeSuffix/PublicFreeSuffix/blob/main/AUTHORIZATION.md) to complete the merger.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果是更新或删除，就把代码中 Registration 前面中括号里的 x 放在 Update/Remove 前面的中括号里.&amp;lt;br&amp;gt;
第五步：当拉取请求状态为 validation-passed 后，用你刚才在 json 文件中填写的邮箱向 &lt;code&gt;pr-authorization@publicfreesuffix.org&lt;/code&gt;发送一封邮件，标题为&lt;code&gt;APPROVE_PFS_PR_你的拉取请求 ID&lt;/code&gt;，内容随便写.&amp;lt;br&amp;gt;
第六步，到你的 DNS 提供商里添加域名.&amp;lt;br&amp;gt;
至此申请结束.&lt;/p&gt;
</content:encoded></item><item><title>Image Captions Example</title><link>https://clina.zz.ac/posts/image-captions/</link><guid isPermaLink="true">https://clina.zz.ac/posts/image-captions/</guid><description>Guide to using the image caption feature.</description><pubDate>Thu, 13 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;About Image Captions&lt;/h2&gt;
&lt;p&gt;This feature wraps images in a &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; tag only when the image carries independent meaning. If the image is part of the content and does not stand alone, it will not be enclosed in a &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; tag. Only &lt;a href=&quot;https://commonmark.org/&quot;&gt;CommonMark&lt;/a&gt; syntax is supported.&lt;/p&gt;
&lt;h2&gt;Usage&lt;/h2&gt;
&lt;h3&gt;Single Image&lt;/h3&gt;
&lt;h4&gt;With Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![A description of the image](url &quot;An image title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;A description of the image&quot; src=&quot;url&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;An image title&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;Without Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![A description of the image](url)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;img alt=&quot;A description of the image&quot; src=&quot;url&quot;&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Multiple Images&lt;/h3&gt;
&lt;p&gt;When you include only images within a paragraph, they will be grouped together. Hard or soft breaks can also be used.&lt;/p&gt;
&lt;h4&gt;With Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![Image 1 description](url1 &quot;Image Title 1&quot;)  
![Image 2 description](url2 &quot;Image Title 2&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;url1&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;Image Title 1&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;url2&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;Image Title 2&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;Without Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![Image 1 description](url1)  
![Image 2 description](url2)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;url1&quot;&amp;gt;
    &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;url2&quot;&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;With Shared Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![Image 1 description](url1 &quot;This becomes the caption&quot;)  
![Image 2 description](url2)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;url1&quot;&amp;gt;
    &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;url2&quot;&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;figcaption&amp;gt;This becomes the caption&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Single Image Link&lt;/h3&gt;
&lt;h4&gt;With Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![A description of the image](image-url &quot;An image title&quot;)](link-url &quot;A link title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;A description of the image&quot; src=&quot;image-url&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;An image title&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
  &amp;lt;/a&amp;gt;
  &amp;lt;figcaption&amp;gt;A link title&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![A description of the image](image-url)](link-url &quot;A link title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;img alt=&quot;A description of the image&quot; src=&quot;image-url&quot;&amp;gt;
  &amp;lt;/a&amp;gt;
  &amp;lt;figcaption&amp;gt;A link title&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![A description of the image](image-url &quot;An image title&quot;)](link-url)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;A description of the image&quot; src=&quot;image-url&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;An image title&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Without Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![A description of the image](image-url)](link-url)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;img alt=&quot;A description of the image&quot; src=&quot;image-url&quot;&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;A description of the image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Multiple Image Link&lt;/h3&gt;
&lt;p&gt;When you include only a multiple-image link within a paragraph, the images will be grouped together. Hard or soft breaks can also be used.&lt;/p&gt;
&lt;h4&gt;With Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![Image 1 description](image-url1 &quot;Image Title 1&quot;)  
![Image 2 description](image-url2 &quot;Image Title 2&quot;)](link-url &quot;A link title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;image-url1&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;Image Title 1&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;image-url2&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;Image Title 2&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
  &amp;lt;/a&amp;gt;
  &amp;lt;figcaption&amp;gt;A link title&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 1 description&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 2 description&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![Image 1 description](image-url1)  
![Image 2 description](image-url2)](link-url &quot;A link title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;image-url1&quot;&amp;gt;
    &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;image-url2&quot;&amp;gt;
  &amp;lt;/a&amp;gt;
  &amp;lt;figcaption&amp;gt;A link title&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 1 description&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 2 description&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![Image 1 description](image-url1 &quot;Image Title 1&quot;)  
![Image 2 description](image-url2 &quot;Image Title 2&quot;)](link-url)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;image-url1&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;Image Title 1&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
    &amp;lt;figure&amp;gt;
      &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;image-url2&quot;&amp;gt;
      &amp;lt;figcaption&amp;gt;Image Title 2&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 1 description&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 2 description&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Without Caption&lt;/h4&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[![Image 1 description](image-url1)  
![Image 2 description](image-url2)](link-url)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;a href=&quot;link-url&quot;&amp;gt;
    &amp;lt;img alt=&quot;Image 1 description&quot; src=&quot;image-url1&quot;&amp;gt;
    &amp;lt;img alt=&quot;Image 2 description&quot; src=&quot;image-url2&quot;&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 1 description&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=640/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot; alt=&quot;Image 2 description&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Root Relative Path and Relative Path&lt;/h3&gt;
&lt;h4&gt;Root Relative Path&lt;/h4&gt;
&lt;p&gt;A root relative path refers to assets located in the &lt;code&gt;public&lt;/code&gt; directory of your project.&lt;/p&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![A description of the image](/favicon/favicon-dark-128.png &quot;An image title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/favicon/favicon-dark-128.png&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;Relative Path&lt;/h4&gt;
&lt;p&gt;A relative path refers to assets inside the &lt;code&gt;src&lt;/code&gt; directory, and it is relative to the location of the current file.&lt;/p&gt;
&lt;p&gt;Markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;![A description of the image](../../assets/images/demo-avatar.png &quot;An image title&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;../../assets/images/demo-avatar.png&quot; alt=&quot;A description of the image&quot; title=&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Options&lt;/h2&gt;
&lt;p&gt;You can specify the options in the &lt;code&gt;astro.config.mjs&lt;/code&gt; file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;...
import remarkImageCaption from &quot;./src/plugins/remark-image-caption.ts&quot;
...
export default defineConfig({
  ...
  markdown: {
    ...
    remarkPlugins: [
      ...
      remarkImageCaption, // Plugin here
      ...
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;className&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&quot;&quot;&lt;/td&gt;
&lt;td&gt;The class name to apply to the outer &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; element.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;excludedPaths&lt;/td&gt;
&lt;td&gt;(string | RegExp)[]&lt;/td&gt;
&lt;td&gt;[]&lt;/td&gt;
&lt;td&gt;An array of image paths that should be excluded from transformation. This can also be used to exclude paths like those under the &lt;code&gt;src&lt;/code&gt; folder in Astro projects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lazyLoad&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Set the &lt;code&gt;loading&lt;/code&gt; attribute on &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; elements.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;linkAttributes&lt;/td&gt;
&lt;td&gt;LinkAttributes&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Set the target and relationship attributes for external links. These attributes can also be left unset to delegate handling to other plugins.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;linkAttributes&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;target&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&apos;&apos;&lt;/td&gt;
&lt;td&gt;Specify where to open linked documents. The default (empty) does not set a target on links.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;rel&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&apos;&apos;&lt;/td&gt;
&lt;td&gt;Define the relationship between the current document and the linked document. The default (empty) does not set any relationship.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</content:encoded></item><item><title>隐私政策</title><link>https://clina.zz.ac/posts/privacy-policy/</link><guid isPermaLink="true">https://clina.zz.ac/posts/privacy-policy/</guid><description>本隐私政策适用于Clina&apos;s Blog（以下简称“我们”）。</description><pubDate>Fri, 01 Jan 1999 03:20:15 GMT</pubDate><content:encoded>&lt;h1&gt;All Cookies&lt;/h1&gt;
&lt;h3&gt;Strictly necessary cookies（必要的cookies）&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://cloud.umami.is&quot;&gt;Umami&lt;/a&gt;：收集站点的基本访问情况，并对外显示浏览量，由本站直接提供&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://giscus.app&quot;&gt;Giscus&lt;/a&gt;：提供评论功能，由 Github 提供&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Functionality cookies（功能性cookies）&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;无&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Tracking cookies（追蹤cookies）&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://clarity.microsoft.com&quot;&gt;Microsoft Clarity&lt;/a&gt;：收集站点访问情况&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;latest update: 2026/02/04&lt;/em&gt;&lt;/p&gt;
</content:encoded></item></channel></rss>