<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feeds/atom-style.xsl" type="text/xsl"?>

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
  <id>https://artist.cc.cd/</id>
  <title>一隅清静</title>
  <subtitle>觅静·角落</subtitle>
  <updated>2026-10-30T00:00:00Z</updated>
  <link rel="alternate" type="text/html" href="https://artist.cc.cd/"/>
  <link rel="self" type="application/atom+xml" href="https://artist.cc.cd/atom.xml"/>
  <author><name>Liviruy</name></author>
  <generator>Quiet World / Zola 0.23.6</generator>
  <entry>
    <id>https://artist.cc.cd/posts/microfeed-zola-moments/</id>
    <title>给 Zola 博客接一个独立的说说后端：Microfeed + Cloudflare 实战</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/microfeed-zola-moments/"/>
    <published>2026-10-30T00:00:00+00:00</published>
    <updated>2026-10-30T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>用独立 Cloudflare Worker、D1 与 R2 部署 Microfeed，把公开 JSON Feed 接进 Zola，做成无需重新构建的 /moments/ 动态时间线。</summary>
    <content type="html"><![CDATA[<p>静态博客适合写长文，但“随手记”往往更像社交动态：一句话、几张图、一个链接，改完就想立刻看到。把每条说说都写成 Markdown 再重新构建站点，流程太重；引入一个完整的 CMS，又容易把博客变成另一套系统。</p>
<p>这次的做法是：<strong>让 Microfeed 只负责发布、编辑、媒体和数据输出，Zola 只负责静态页面外壳。</strong> 说说的数据通过公开 JSON Feed 在浏览器里读取，Zola 不需要为每条说说重新构建。</p>
<blockquote>
<p>本文以本机的 Zola 重构版为例。Astro 生产站、Cloudflare Pages 和既有 DNS 都没有改动；文章里不会出现管理员密码、API Token 或一次性密码设置链接。</p>
</blockquote>
<h2 id="为什么是-microfeed--zola">为什么是 Microfeed + Zola<a href="#为什么是-microfeed--zola" class="heading-anchor-link" aria-label="Link to 为什么是 Microfeed + Zola"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>Microfeed 是一个可以部署在 Cloudflare Workers 上的轻量发布系统。它自带 D1 数据库、R2 媒体存储、管理员后台、JSON Feed 和 RSS，并且提供 <strong>Headless</strong> 访问策略：隐藏它自动生成的网站页面，但保留公开 Feed。官方文档见 <a href="https://docs.microfeed.org/" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://docs.microfeed.org/">Microfeed 官方文档</a>，Feed 格式见 <a href="https://www.jsonfeed.org/" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://www.jsonfeed.org/">JSON Feed</a>。</p>
<p>把两者拼起来后，职责非常清楚：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Cloudflare Worker（Microfeed）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  ├─ D1  条目、频道、账户</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  ├─ R2  上传的图片和媒体</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  └─ /json/  /rss/   公开只读 Feed</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">             │</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">             ▼</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Zola /moments/（静态外壳）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  └─ 浏览器 fetch Feed → DOMPurify 清洗 → 时间线渲染</span></span>
</code></pre></div>
<p>这样做有几个直接好处：</p>
<ul>
<li>发布说说不需要重新构建 Zola，也不需要等 Pages 部署。</li>
<li>图片、草稿、发布状态由 Microfeed 管理，不需要自己写后台。</li>
<li>文章、相册、音乐仍然完全静态，主站不引入数据库。</li>
<li>Feed 是标准的 JSON Feed 1.1，将来换成别的发布工具也不会被锁死。</li>
</ul>
<p>代价是：<code>/moments/</code> 的首屏内容依赖 JavaScript 和外部 Feed 请求。对个人博客来说，这个取舍可以接受；页面外壳、导航、主题、SEO 仍然是静态的。</p>
<h2 id="一部署-microfeed">一、部署 Microfeed<a href="#一部署-microfeed" class="heading-anchor-link" aria-label="Link to 一、部署 Microfeed"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<h3 id="环境">环境<a href="#环境" class="heading-anchor-link" aria-label="Link to 环境"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>官方要求 Node.js <strong>22.12+</strong>。先确认：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">node</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">v</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npm</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">v</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">v</span></span>
</code></pre></div>
<p>本文使用官方 CLI，不要求把 Microfeed 源码克隆到本地：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> @microfeed/cli manage accounts</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> @microfeed/cli manage instances</span></span>
</code></pre></div>
<p><code>manage</code> 可以从任意目录运行。只有使用 Microfeed 源码仓库里的 <code>yarn manage</code> 时才需要进入源码目录；不要为了找“项目根目录”浪费时间。</p>
<h3 id="创建-worker">创建 Worker<a href="#创建-worker" class="heading-anchor-link" aria-label="Link to 创建 Worker"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> @microfeed/cli manage init</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">instance</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> artist-moments</span></span>
</code></pre></div>
<p>实例名、Worker 名使用同一个短名。创建过程中如果要求 Cloudflare 浏览器授权，由站长本人完成；助手不应索取 API Token，也不要把 Token 粘贴到命令行或聊天里。</p>
<p>创建完成后先做只读检查：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> @microfeed/cli manage status</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">instance</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> artist-moments</span></span>
</code></pre></div>
<p>重点看四件事：</p>
<ul>
<li>Worker 是否存在；</li>
<li>D1 是否创建并绑定；</li>
<li>R2 是否创建并绑定；</li>
<li>管理员账户是否已设置。</li>
</ul>
<p>一个正常的状态大致如下（名称会因实例不同而变化）：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Worker artist-moments: found</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">D1 artist-moments-db: bound resource found</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">R2 artist-moments-media: exact bucket and MEDIA_BUCKET binding found</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Administrator account: ...</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Deployment verified at https://feed.example.com/.well-known/microfeed.json</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Custom domain verified: https://feed.example.com</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">/admin/*: built-in login active</span></span>
</code></pre></div>
<h3 id="自定义域名与-workersdev">自定义域名与 workers.dev<a href="#自定义域名与-workersdev" class="heading-anchor-link" aria-label="Link to 自定义域名与 workers.dev"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>Microfeed 会给出一个 <code>*.workers.dev</code> 地址，但这个地址在某些网络环境下可能持续超时。不要因为 <code>workers.dev</code> 打不开就重建 Worker；更稳妥的做法是绑定自己的子域名：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> @microfeed/cli manage domain </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">instance</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> artist-moments </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">hostname</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> feed.example.com</span></span>
</code></pre></div>
<p>要求：</p>
<ul>
<li>只给 Microfeed Worker 添加一个 Custom Domain；</li>
<li>使用 Production 环境；</li>
<li>让 Cloudflare 自动处理 DNS 和证书；</li>
<li>不修改其他域名、Pages 或现有博客的规范化策略。</li>
</ul>
<p>绑定后，把 <code>feed.example.com</code> 作为真正的入口。<code>workers.dev</code> 通不通不再影响日常使用。</p>
<h3 id="管理员登录">管理员登录<a href="#管理员登录" class="heading-anchor-link" aria-label="Link to 管理员登录"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>如果实例还没有密码，用官方命令生成一次性设置链接：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> @microfeed/cli manage auth setup</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">instance</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> artist-moments</span></span>
</code></pre></div>
<p>链接只应由站长本人在浏览器中打开；不要把链接贴进聊天、文章或仓库。密码设置完成后，访问：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">https://feed.example.com/admin/</span></span>
</code></pre></div>
<p>确认后台需要登录，且公开 Feed 不受登录影响。</p>
<h3 id="headless-模式">Headless 模式<a href="#headless-模式" class="heading-anchor-link" aria-label="Link to Headless 模式"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>在后台进入 <strong>Settings → Access control</strong>，选择 <strong>Headless</strong>。</p>
<p>注意不要误选 <strong>Offline</strong>。Headless 只是隐藏 Microfeed 自动生成的网站页面，不会关闭 JSON Feed、RSS 和媒体：</p>
<table><thead><tr><th>路径</th><th>Headless 预期</th></tr></thead><tbody>
<tr><td><code>/</code></td><td>404</td></tr>
<tr><td><code>/json/</code></td><td>200</td></tr>
<tr><td><code>/rss/</code></td><td>200</td></tr>
<tr><td>已上传媒体</td><td>200</td></tr>
<tr><td><code>/admin/*</code></td><td>需要登录</td></tr>
<tr><td>未发布草稿</td><td>不公开</td></tr>
</tbody></table>
<p>这一步完成后，Microfeed 就是一个纯粹的“说说后端”。</p>
<h2 id="二先理解-feed再写前端">二、先理解 Feed，再写前端<a href="#二先理解-feed再写前端" class="heading-anchor-link" aria-label="Link to 二、先理解 Feed，再写前端"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>不要凭想象写解析代码。先用浏览器或 <code>curl</code> 看一眼实际返回：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">curl</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">sS</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> https://feed.example.com/json/</span></span>
</code></pre></div>
<p>Microfeed 返回的是 JSON Feed 1.1，结构大致如下：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="json" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-json"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">version</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">https://jsonfeed.org/version/1.1</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">title</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">一隅清静 · 说说</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">home_page_url</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">https://artist.example.com/moments/</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">feed_url</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">https://feed.example.com/json/</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">language</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">zh-cn</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">items</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">[</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">id</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">abc123</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">title</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">一条测试说说</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">content_html</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">&lt;p&gt;正文&lt;/p&gt;&lt;p&gt;&lt;img src=</span><span style="color:#005cc5;--shiki-dark:#79B8FF">\"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">/media/production/.../image.jpg</span><span style="color:#005cc5;--shiki-dark:#79B8FF">\"</span><span style="color:#032f62;--shiki-dark:#9ECBFF"> alt=</span><span style="color:#005cc5;--shiki-dark:#79B8FF">\"</span><span style="color:#005cc5;--shiki-dark:#79B8FF">\"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">&gt;&lt;/p&gt;</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">content_text</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">正文</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">date_published</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">2026-10-30T03:20:25.526Z</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">date_modified</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">2026-10-30T03:20:27.409Z</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">image</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">/media/production/.../cover.jpg</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">_microfeed</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">        </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">status</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">published</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      </span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<p>实际实现时要注意几个细节：</p>
<ul>
<li><code>content_html</code> 里的图片地址可能是<strong>相对路径</strong>（如 <code>/media/...</code>）。JSON Feed 规定相对地址以 Feed URL 为基准解析，所以应拼成 <code>https://feed.example.com/media/...</code>，而不是博客域名。</li>
<li><code>content_html</code> 和 <code>content_text</code> 可能同时存在；HTML 为空或清洗后为空时，用 <code>content_text</code> 回退。</li>
<li><code>date_published</code> / <code>date_modified</code> 是 UTC；展示时转换为读者本地时区。</li>
<li><code>_microfeed.status</code> 可用于过滤，但公开 Feed 本身只应出现已发布条目。</li>
<li>当前 Microfeed 1.0.13 的条目编辑界面没有 tags/keywords 字段；标准 <code>tags</code> 可以做可选兼容，但不要伪造标签。</li>
<li>Headless 下条目的 <code>url</code>（<code>/i/.../</code>）通常返回 404，因此不要把标题链到条目页；只展示本站 <code>/moments/</code> 页面。</li>
<li>Feed 当前没有 <code>next_url</code> 或分页字段；没有分页就不要实现“加载更多”。</li>
</ul>
<h2 id="三zola-侧一个配置一个页面">三、Zola 侧：一个配置、一个页面<a href="#三zola-侧一个配置一个页面" class="heading-anchor-link" aria-label="Link to 三、Zola 侧：一个配置、一个页面"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<h3 id="1-只保留一处-feed-地址">1. 只保留一处 Feed 地址<a href="#1-只保留一处-feed-地址" class="heading-anchor-link" aria-label="Link to 1. 只保留一处 Feed 地址"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>在 <code>zola.toml</code> 的 <code>[extra]</code> 中配置：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="toml" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-toml"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[extra]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">moments_feed_url = "https://feed.example.com/json/"</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">moments_image_hosts = ["feed.example.com", "artist.example.com"]</span></span>
</code></pre></div>
<p>模板把地址写到 <code>data-feed-url</code>，前端从 DOM 读取。不要在多个模板或 JavaScript 文件里重复写死 Feed 地址；换域名时只改这一处。</p>
<p><code>moments_image_hosts</code> 是图片域名白名单。Microfeed 上传的图片在 Feed 域名下；本站相册图片在博客域名下。白名单之外的图片不应直接渲染。</p>
<h3 id="2-页面与导航">2. 页面与导航<a href="#2-页面与导航" class="heading-anchor-link" aria-label="Link to 2. 页面与导航"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>新增两个页面文件：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">content/moments/index.md</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">content/moments/index.en.md</span></span>
</code></pre></div>
<p>如果项目使用 <code>site-tool</code> 从 <code>markdown/</code> 生成 <code>content/</code>，不要手改 <code>content/</code>；在生成器里加两页，否则下一次构建会被清掉。</p>
<p>页面模板只负责静态外壳：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="html" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-html"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">div</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">id</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">moments-app</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">     </span><span style="color:#6f42c1;--shiki-dark:#B392F0">data-feed-url</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">{{ config.extra.moments_feed_url }}</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">     </span><span style="color:#6f42c1;--shiki-dark:#B392F0">data-image-hosts</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">{{ config.extra.moments_image_hosts | join(sep=',') }}</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">div</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">id</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">moments-list</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">class</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">timeline</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">aria-live</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">polite</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">div</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">div</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">id</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">moments-state</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">hidden</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">p</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">class</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">moments-state-text</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">p</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">button</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">id</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">moments-retry</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">type</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">button</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">hidden</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">重试</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">button</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">div</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">div</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
</code></pre></div>
<p>导航中加一项“说说”，链接到 <code>/moments/</code> 或 <code>/en/moments/</code>。激活态沿用现有导航的 class，不要另造一套按钮。</p>
<h3 id="3-时间线样式">3. 时间线样式<a href="#3-时间线样式" class="heading-anchor-link" aria-label="Link to 3. 时间线样式"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>本站复用了相册页已有的 <code>.timeline</code> 纵轴：左侧一条细线、一个黄色圆点，右侧是时间、标题和正文。这样无需引入新的 UI 框架。</p>
<p>正文需要处理 Microfeed 编辑器产生的一个细节：它可能把多段文字放在<strong>同一个 <code>&lt;p&gt;</code> 里，用 <code>\n\n</code> 分隔</strong>。可以给文字段落设置：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="css" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-css"><span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">moment-content</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#22863a;--shiki-dark:#85E89D">p</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#005cc5;--shiki-dark:#79B8FF">white-space</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">pre-line</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">moment-content</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#22863a;--shiki-dark:#85E89D">p</span><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">moment-has-image</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#005cc5;--shiki-dark:#79B8FF">white-space</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">normal</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<p>图片段落则恢复正常换行，避免图片周围出现奇怪的空白。</p>
<h2 id="四前端fetch清洗渲染">四、前端：fetch、清洗、渲染<a href="#四前端fetch清洗渲染" class="heading-anchor-link" aria-label="Link to 四、前端：fetch、清洗、渲染"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<h3 id="1-请求-feed">1. 请求 Feed<a href="#1-请求-feed" class="heading-anchor-link" aria-label="Link to 1. 请求 Feed"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="js" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-js"><span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">response</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">await</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">fetch</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">feedUrl</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">method</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">GET</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">headers</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">Accept</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">application/feed+json, application/json;q=0.9</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">credentials</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">omit</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">cache</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">no-cache</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">if</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#d73a49;--shiki-dark:#F97583">!</span><span style="color:#24292e;--shiki-dark:#E1E4E8">response</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#24292e;--shiki-dark:#E1E4E8">ok</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">throw</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">new</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">Error</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">`</span><span style="color:#032f62;--shiki-dark:#9ECBFF">HTTP </span><span style="color:#24292e;--shiki-dark:#E1E4E8">${</span><span style="color:#24292e;--shiki-dark:#E1E4E8">response</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#24292e;--shiki-dark:#E1E4E8">status</span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#032f62;--shiki-dark:#9ECBFF">`</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">feed</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">await</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">response</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">json</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
</code></pre></div>
<p><code>cache: 'no-cache'</code> 表示每次重新校验，但<strong>不要用随机查询参数</strong>绕过缓存。随机参数会污染缓存键，也会让“刷新”变成不可预测的行为。</p>
<h3 id="2-安全清洗-html">2. 安全清洗 HTML<a href="#2-安全清洗-html" class="heading-anchor-link" aria-label="Link to 2. 安全清洗 HTML"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>Microfeed 的 <code>content_html</code> 是远程富文本，不能直接写入 <code>innerHTML</code>。本站使用本地打包的 <a href="https://github.com/cure53/DOMPurify" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/cure53/DOMPurify">DOMPurify</a>，并采用白名单：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="js" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-js"><span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">import</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">DOMPurify</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">from</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">/vendor/dompurify/purify.es.min.mjs</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">config</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ALLOWED_TAGS</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">[</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">p</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">br</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">strong</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">b</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">em</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">i</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">u</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">s</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">del</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">a</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">ul</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">ol</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">li</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">blockquote</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">code</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">pre</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">hr</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">h2</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">h3</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">h4</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">h5</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">h6</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">figure</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">figcaption</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">img</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">]</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ALLOWED_ATTR</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">[</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">href</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">title</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">alt</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">src</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">width</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">height</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">]</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ALLOW_DATA_ATTR</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">false</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ALLOW_ARIA_ATTR</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">false</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ALLOWED_URI_REGEXP</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">/</span><span style="color:#d73a49;--shiki-dark:#F97583">^</span><span style="color:#032f62;--shiki-dark:#DBEDFF">https</span><span style="color:#d73a49;--shiki-dark:#F97583">?</span><span style="color:#032f62;--shiki-dark:#DBEDFF">:</span><span style="color:#032f62;--shiki-dark:#DBEDFF;font-weight:bold;--shiki-dark-font-weight:bold">\/</span><span style="color:#032f62;--shiki-dark:#DBEDFF;font-weight:bold;--shiki-dark-font-weight:bold">\/</span><span style="color:#032f62;--shiki-dark:#9ECBFF">/</span><span style="color:#d73a49;--shiki-dark:#F97583">i</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">FORBID_TAGS</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">[</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">script</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">style</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">iframe</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">object</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">embed</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">form</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">input</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">button</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">textarea</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">select</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">option</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">svg</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">math</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">video</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">audio</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">source</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">track</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">link</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">meta</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">base</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">]</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">FORBID_ATTR</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">[</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">style</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">srcset</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">sizes</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">class</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">id</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">target</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">rel</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">]</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
</code></pre></div>
<p>在清洗前，先把 HTML 解析到惰性的 <code>DOMParser</code> 文档，解析相对链接和图片地址。解析文档不会执行脚本，图片也不会在解析阶段加载：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="js" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-js"><span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">parsed</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">new</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">DOMParser</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">parseFromString</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">rawHtml</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">text/html</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">for</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">anchor</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">of</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">parsed</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">querySelectorAll</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">a[href]</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">href</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">safeUrl</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">anchor</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#005cc5;--shiki-dark:#79B8FF">getAttribute</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">href</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#d73a49;--shiki-dark:#F97583">if</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">href</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">anchor</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#005cc5;--shiki-dark:#79B8FF">setAttribute</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">href</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">href</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#d73a49;--shiki-dark:#F97583">else</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">anchor</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#005cc5;--shiki-dark:#79B8FF">removeAttribute</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">href</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#d73a49;--shiki-dark:#F97583">for</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">image</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">of</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">parsed</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">querySelectorAll</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">img</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#d73a49;--shiki-dark:#F97583">const</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">src</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">safeImageUrl</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">image</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#005cc5;--shiki-dark:#79B8FF">getAttribute</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">src</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#d73a49;--shiki-dark:#F97583">if</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">src</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">image</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#005cc5;--shiki-dark:#79B8FF">setAttribute</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">src</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">src</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#d73a49;--shiki-dark:#F97583">else</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">image</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#005cc5;--shiki-dark:#79B8FF">remove</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<p>如果 HTML 为空，或者清洗后没有文字、没有图片，就回退到 <code>content_text</code>，并且用 <code>textContent</code> 渲染普通文本。</p>
<h3 id="3-图片与灯箱">3. 图片与灯箱<a href="#3-图片与灯箱" class="heading-anchor-link" aria-label="Link to 3. 图片与灯箱"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<ul>
<li>图片必须限制在 <code>moments_image_hosts</code> 白名单内；协议只允许 <code>http:</code> / <code>https:</code>。</li>
<li><code>loading="lazy"</code>、<code>decoding="async"</code>，避免首屏之外的图片拖慢加载。</li>
<li>点击图片打开大图；本站复用了相册页的 lightbox 样式与交互，没有重复注册事件监听。</li>
<li>单张图片加载失败时，用占位提示替换该图，不能让整个说说列表消失。</li>
</ul>
<h3 id="4-状态与主题">4. 状态与主题<a href="#4-状态与主题" class="heading-anchor-link" aria-label="Link to 4. 状态与主题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>页面至少需要四种状态：</p>
<table><thead><tr><th>状态</th><th>行为</th></tr></thead><tbody>
<tr><td>加载中</td><td>显示轻量脉冲点或“正在读取说说…”</td></tr>
<tr><td>空</td><td>显示“还没有说说，晚点再来看看。”</td></tr>
<tr><td>请求失败</td><td>显示原因 + 重试按钮</td></tr>
<tr><td>图片失败</td><td>单图显示占位，其他条目不受影响</td></tr>
</tbody></table>
<p>主题直接沿用博客现有的亮暗切换逻辑；不要给 <code>/moments/</code> 再增加一套主题状态。</p>
<h3 id="5-页面生命周期">5. 页面生命周期<a href="#5-页面生命周期" class="heading-anchor-link" aria-label="Link to 5. 页面生命周期"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>本站在 Zola 输出上保留了原 Astro 的 ClientRouter / View Transitions。内部导航只替换页面主体，<strong>不会重新执行同一个页面模块</strong>。如果说说脚本只在模块顶层自动初始化一次，就可能出现：第一次进入正常，从其他页面再次点击“说说”或使用浏览器前进/后退时，DOM 已换新但脚本不再运行，列表为空、刷新按钮也没有监听；此时整体刷新才会重新执行模块。</p>
<p>解决方式是一个很小的全局 bootstrap，随所有页面加载，但只在 <code>#moments-app</code> 存在时才动态导入 <code>moments.js</code>：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="js" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-js"><span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF">document</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">addEventListener</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">astro:after-swap</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ensure</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF">document</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">addEventListener</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">astro:page-load</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ensure</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF">document</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">addEventListener</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">DOMContentLoaded</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">ensure</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">once</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">true</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF">document</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#e36209;--shiki-dark:#FFAB70">addEventListener</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">astro:before-swap</span><span style="color:#032f62;--shiki-dark:#9ECBFF">'</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">cleanup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
</code></pre></div>
<ul>
<li><code>ensure</code> 检查当前 DOM 是否包含 <code>#moments-app</code>，有则导入并调用 <code>initMoments</code>；</li>
<li><code>initMoments</code> 对同一个 app 幂等，重复事件不会重复绑定；</li>
<li><code>cleanup</code> 在离开页面时取消在途请求、清除 TTL 定时器、关闭灯箱，并用 <code>AbortController</code> 移除本页事件监听；</li>
<li>再次进入时重新初始化，刷新按钮重新绑定；</li>
<li>不使用 <code>setTimeout</code> 等待 DOM 出现，也不引入新的导航框架。</li>
</ul>
<p>这一层只修复“脚本初始化入口”，不改变 60 秒缓存、SWR、DOMPurify、图片灯箱等业务逻辑。</p>
<h2 id="五本地预览与-cors">五、本地预览与 CORS<a href="#五本地预览与-cors" class="heading-anchor-link" aria-label="Link to 五、本地预览与 CORS"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>在本地直接打开 <code>/moments/</code> 时，浏览器会从 <code>127.0.0.1</code> 请求 <code>https://feed.example.com/json/</code>，这是一次跨域请求。</p>
<p>Microfeed 当前返回：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Access-Control-Allow-Origin: *</span></span>
</code></pre></div>
<p>所以浏览器可以直接读取。但本地开发仍建议加一个<strong>仅供本地</strong>的代理：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">/__dev/moments-feed</span></span>
</code></pre></div>
<p>代理只做六件事：</p>
<ol>
<li>只允许 GET；</li>
<li>只请求固定的 <code>https://feed.example.com/json/</code>；</li>
<li>只监听 <code>127.0.0.1</code>；</li>
<li>设置 8 秒超时和 2 MB 响应上限；</li>
<li>不携带管理员凭据、不接受任意 URL、不跟随任意重定向；</li>
<li>提供 30 秒进程内内存缓存，手动刷新用 <code>X-Moments-Refresh: 1</code> 请求头绕过，不用查询参数。</li>
</ol>
<p>这样本地页面读同源路径，生产页面仍然读绝对 Feed 地址。<code>zola serve</code> 没有这个代理时，页面会直接读绝对地址；如果以后 CORS 收紧，再使用带代理的完整预览服务器。</p>
<h2 id="六发布更新与缓存">六、发布、更新与缓存<a href="#六发布更新与缓存" class="heading-anchor-link" aria-label="Link to 六、发布、更新与缓存"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>在 Microfeed 后台：</p>
<ol>
<li><code>Add new item</code> 新建，或打开已有条目；</li>
<li>填写标题和正文；</li>
<li>选择 <code>published</code> / <code>unlisted</code> / <code>unpublished</code>；</li>
<li>点击 <code>Publish</code> 或等待自动保存；</li>
<li>删除条目时确认操作不可恢复。</li>
</ol>
<p>发布后刷新 <code>/moments/</code> 就能看到，不需要重新构建 Zola。本文实测时，页面静态 HTML 没有变化，新增一条说说后列表直接变成 6 条；删除后刷新又回到 5 条。</p>
<p>草稿、未发布条目不会进入 JSON Feed、RSS 和页面。<strong>不要把草稿设成 <code>published</code> 来测试</strong>；直接新建 <code>unpublished</code> 条目即可。</p>
<p>缓存方面：</p>
<ul>
<li>Feed 返回 <code>Cache-Control: no-cache</code>，适合频繁刷新的内容流；</li>
<li>当前没有 <code>ETag</code> / <code>Last-Modified</code>，缓存过期或手动刷新会取回完整 JSON（约 6 KB）；</li>
<li>前端有一层 <strong>60 秒 localStorage SWR</strong>：记录 <code>version</code> / <code>url</code> / <code>cachedAt</code> / <code>data</code>；有缓存先渲染，过期后台更新，失败保留旧内容；工具条显示“缓存于”；</li>
<li>手动刷新绕过前端缓存，并用 <code>X-Moments-Refresh: 1</code> 绕过本地代理的 30 秒内存缓存；不要给 URL 加随机参数；</li>
<li>只缓存公开 JSON Feed，不缓存账户信息或凭据；损坏/版本不匹配的缓存会被丢弃并重新获取；</li>
<li>页面 UI 不展示 <code>JSON Feed</code> 链接，<code>&lt;head&gt;</code> 也不输出 <code>application/feed+json</code> alternate；<code>/json/</code> 端点仍保留，供前端 fetch；</li>
<li>如果将来接入 ETag，本地代理应转发 <code>If-None-Match</code> / <code>If-Modified-Since</code>。</li>
</ul>
<p>首屏和图片：</p>
<ul>
<li>首屏先渲染最新 5 条；更多内容用本地“显示更早的说说”展开，不伪造后端分页；</li>
<li>首张实际可见图片 <code>loading="eager"</code> + <code>fetchpriority="high"</code>，其余 <code>lazy</code>/<code>low</code>；</li>
<li>图片加载后记录自然尺寸，重复访问时提前设置 <code>width</code>/<code>height</code>，减少布局跳动；</li>
<li>缓存更新按条目 <code>id + signature</code> 做 keyed reconciliation，相同 Feed 刷新不重建列表。</li>
</ul>
<h2 id="七验收清单">七、验收清单<a href="#七验收清单" class="heading-anchor-link" aria-label="Link to 七、验收清单"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<table><thead><tr><th>项目</th><th>检查方式</th></tr></thead><tbody>
<tr><td>Worker / D1 / R2</td><td><code>manage status</code> 全部 passed</td></tr>
<tr><td>自定义域名</td><td><code>/.well-known/microfeed.json</code> 返回 200</td></tr>
<tr><td>Headless</td><td><code>/</code> 404；<code>/json/</code>、<code>/rss/</code> 200</td></tr>
<tr><td>草稿</td><td>JSON / RSS / 页面都不出现</td></tr>
<tr><td>多类型</td><td>纯文字、多段、单图、多图、正文+图片、外链</td></tr>
<tr><td>时间</td><td>发布时间、修改时间、排序正确</td></tr>
<tr><td>图片</td><td>懒加载、无横向溢出、点击灯箱、单图失败有占位</td></tr>
<tr><td>状态</td><td>加载、空、失败、重试都可见</td></tr>
<tr><td>安全</td><td>script / iframe / svg / 事件属性 / <code>javascript:</code> 均被移除</td></tr>
<tr><td>缓存</td><td>第二次打开无需等待 Feed；缓存过期后台更新；离线保留旧内容</td></tr>
<tr><td>渐进渲染</td><td>首屏 5 条；更多在本地展开；首图优先加载</td></tr>
<tr><td>实时更新</td><td>后台发布后刷新页面，不重建 Zola</td></tr>
<tr><td>响应式</td><td>1440×900 与 390×844 都检查</td></tr>
<tr><td>回归</td><td>原文章、相册、随拍、音乐、评论、主题和双语路由不变</td></tr>
</tbody></table>
<h2 id="八容易踩的坑">八、容易踩的坑<a href="#八容易踩的坑" class="heading-anchor-link" aria-label="Link to 八、容易踩的坑"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p><strong>1. <code>workers.dev</code> 超时，不代表 Worker 没部署成功。</strong><br />
先看 <code>manage status</code>，再绑定自定义域名。不要因为验证地址超时就重建一套资源。</p>
<p><strong>2. 把 Headless 选成 Offline。</strong><br />
Headless 隐藏网页，但保留 Feed；Offline 会把整个实例下线。</p>
<p><strong>3. 图片用了相对路径却按博客域名解析。</strong><br />
Feed 里的 <code>/media/...</code> 应该拼到 Feed 域名，而不是 <code>artist.example.com</code>。</p>
<p><strong>4. 上传的图片体积失控。</strong><br />
图片上传器可能把 JPEG 转成 PNG；一张大图很快变成几 MB。测试时尽量用小的非私人图片，并在发布前检查实际文件大小。</p>
<p><strong>5. 以为条目一定有标签。</strong><br />
当前 Microfeed 1.0.13 的条目编辑界面没有 tags/keywords 字段。前端可以可选兼容，但不要把频道 Categories 当作每条说说的标签。</p>
<p><strong>6. 直接编辑 <code>content/</code>。</strong><br />
如果使用 Rust <code>site-tool</code>，<code>content/</code> 是构建产物；改 <code>markdown/</code> 或生成器，下一次构建才不会丢。</p>
<p><strong>7. 把管理员密码、Token 或设置链接写进文章。</strong><br />
后台入口可以公开，凭据不行；一次性密码设置链接也只能由站长本人打开。</p>
<h2 id="九备份与恢复">九、备份与恢复<a href="#九备份与恢复" class="heading-anchor-link" aria-label="Link to 九、备份与恢复"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>数据主要在 D1 和 R2。</p>
<p>D1 导出：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> wrangler d1 export artist-moments-db </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">remote</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">output</span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8">backup/artist-moments-20261030.sql</span></span>
</code></pre></div>
<p>恢复前先检查 SQL，并在非生产副本验证：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> wrangler d1 execute artist-moments-db </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">remote</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">file</span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8">backup/artist-moments-20261030.sql</span></span>
</code></pre></div>
<p>R2 对象可以逐个下载：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">npx</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> wrangler r2 object get artist-moments-media/</span><span style="color:#d73a49;--shiki-dark:#F97583">&lt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">object-key</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">remote</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">\</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">  --</span><span style="color:#e36209;--shiki-dark:#FFAB70">file</span><span style="color:#d73a49;--shiki-dark:#F97583">=</span><span style="color:#24292e;--shiki-dark:#E1E4E8">backup/</span><span style="color:#d73a49;--shiki-dark:#F97583">&lt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">file</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span></span>
</code></pre></div>
<p>整桶备份可以使用 Cloudflare 控制台或 S3 兼容客户端。备份文件不要放进博客仓库，也不要把 Token 写进脚本或文章。</p>
<h2 id="十小结">十、小结<a href="#十小结" class="heading-anchor-link" aria-label="Link to 十、小结"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这套方案的关键不是“多了一个后端”，而是把职责切开：</p>
<ul>
<li>Microfeed 管发布、媒体和 Feed；</li>
<li>Zola 管静态页面与阅读体验；</li>
<li>浏览器只读公开 Feed，不接触管理员凭据；</li>
<li>发布说说不触发站点构建。</li>
</ul>
<p>本站最终得到的是一个和文章、相册、随拍并列的 <code>/moments/</code> 页面：有统一的时间线、亮暗主题、图片灯箱和移动端布局，同时保留了“发完即见”的动态体验。</p>
<p>相关实现文件：</p>
<ul>
<li><code>zola.toml</code>：Feed 地址与图片白名单</li>
<li><code>templates/moments.html</code>：页面外壳</li>
<li><code>web/moments.js</code>：fetch、清洗、时间线、灯箱、状态；导出初始化/清理入口</li>
<li><code>web/moments-bootstrap.js</code>：全站生命周期桥接，处理内部导航、前进/后退与重复进入</li>
<li><code>sass/site.scss</code>：时间线与信息流样式</li>
<li><code>scripts/visual-preview.mjs</code>：本地固定 Feed 代理</li>
<li><code>scripts/moments-check.mjs</code>：浏览器验收脚本</li>
<li><code>scripts/moments-perf.mjs</code>、<code>scripts/moments-nav-check.mjs</code>：性能与导航生命周期验收</li>
</ul>
<p>如果只想先跑起来，最小路径是：<strong>部署 Worker → 绑定域名 → 设置密码 → 开 Headless → 在 Zola 配置 Feed 地址 → 写一个 fetch + DOMPurify 的页面</strong>。其余的状态、灯箱、代理和备份，可以按需要逐步补齐。</p>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/konka-led55p7/</id>
    <title>康佳 LED55P7 实战：ADB 去开机广告、清理桌面广告，并用 TVBox 打造简洁电视</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/konka-led55p7/"/>
    <published>2026-09-24T00:00:00+00:00</published>
    <updated>2026-09-24T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>在 KONKA LED55P7 实机上用 ADB 把开机商业广告换成原厂开机片、清掉桌面/悬浮/屏保广告，并记录它的三层自愈机制与最终直接用 TVBox 观看的完整过程。</summary>
    <content type="html"><![CDATA[<blockquote>
<p>本文基于 <strong>KONKA LED55P7 实机操作</strong>整理，文中的系统版本、硬件参数、广告组件、文件路径和命令结果均以本机实际测试为依据。</p>
<p><strong>本文最终目标不是把康佳系统全部删除，而是：</strong></p>
<p><strong>开机跳过商业广告 → 进入桌面不再被广告打扰 → 直接打开 TVBox → 搜索资源并观看。</strong></p>
</blockquote>
<hr />
<h2 id="一先看最终效果">一、先看最终效果<a href="#一先看最终效果" class="heading-anchor-link" aria-label="Link to 一、先看最终效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这次最终采用的方案其实比最开始设想的简单得多：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">电视开机</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">原来的商业开机广告被替换</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">进入康佳桌面</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">桌面广告/悬浮广告/屏保广告被处理</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">直接打开 TVBox</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">搜索资源</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">播放观看</span></span>
</code></pre></div>
<p>本次最终实际达到的核心效果：</p>
<ul>
<li>
<p>开机商业广告被替换为原厂开机片</p>
</li>
<li>
<p>桌面广告、悬浮/角标、屏保/待机广告得到处理</p>
</li>
<li>
<p>TVBox 可以正常安装和运行</p>
</li>
<li>
<p>实际使用 TVBox 搜索和观看视频时没有出现额外广告干扰</p>
</li>
<li>
<p>没有刷机</p>
</li>
<li>
<p>没有删除系统 APK</p>
</li>
<li>
<p>没有更换原厂 Launcher</p>
</li>
<li>
<p>投屏相关组件没有被关闭</p>
</li>
<li>
<p>最终没有为了“彻底清空广告链”继续修改更多系统组件</p>
</li>
</ul>
<p><strong>做到这里，就停止了。</strong></p>
<p>这也是本文最终采用的思路：</p>
<blockquote>
<p><strong>不要为了“看起来更干净”而继续修改已经不影响实际使用的系统部分。</strong></p>
</blockquote>
<hr />
<h2 id="二为什么不把康佳所有广告-apk-全部删掉">二、为什么不把康佳所有广告 APK 全部删掉？<a href="#二为什么不把康佳所有广告-apk-全部删掉" class="heading-anchor-link" aria-label="Link to 二、为什么不把康佳所有广告 APK 全部删掉？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>最开始可能会很容易产生一种想法：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">发现一个广告 APK</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">删掉</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">再发现一个</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">再删掉</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">直到全部删光</span></span>
</code></pre></div>
<p>实际操作后发现，这种做法并不适合这台电视。</p>
<p>因为康佳的广告并不是一个 APK 独立完成的，而是一整条链路：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告服务器</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告素材下载</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告程序</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">桌面/屏保/待机/悬浮窗口</span></span>
</code></pre></div>
<p>而且系统本身还有自动更新、自启动和 Provider 依赖。</p>
<p>所以：</p>
<blockquote>
<p><strong>广告已经不影响使用以后，就没有必要继续为了“少几个 APK”去冒险。</strong></p>
</blockquote>
<p>本次实机最终选择的是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">解决真正影响观看的问题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">        ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">安装自己需要的播放器</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">        ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">绕开康佳自己的内容入口</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">        ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">达到目标后停止修改</span></span>
</code></pre></div>
<p>而不是追求：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">康佳系统一个广告程序都不剩</span></span>
</code></pre></div>
<hr />
<h2 id="三当贝市场可选不是必装">三、当贝市场：可选，不是必装<a href="#三当贝市场可选不是必装" class="heading-anchor-link" aria-label="Link to 三、当贝市场：可选，不是必装"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这一点需要特别说明。</p>
<h3 id="当贝市场是什么">当贝市场是什么？<a href="#当贝市场是什么" class="heading-anchor-link" aria-label="Link to 当贝市场是什么？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>简单来说：</p>
<blockquote>
<p><strong>当贝市场就是电视应用商店。</strong></p>
</blockquote>
<p>它适合：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">想经常安装各种电视 APK</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">        ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">希望直接在电视上搜索应用</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">        ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不想每次都通过电脑 ADB 安装</span></span>
</code></pre></div>
<p>如果你的需求只是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">搜索资源</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">看视频</span></span>
</code></pre></div>
<p>那么当贝市场<strong>完全不是必需品</strong>。</p>
<p>本次实际使用中，我最终<strong>没有安装当贝市场</strong>。</p>
<p>所以本文把它定义为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">当贝市场：可选</span></span>
</code></pre></div>
<p>以后需要安装其他电视应用的时候，再通过 ADB 装上也可以。</p>
<hr />
<h2 id="四我的电视到底是什么配置">四、我的电视到底是什么配置？<a href="#四我的电视到底是什么配置" class="heading-anchor-link" aria-label="Link to 四、我的电视到底是什么配置？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>虽然机器外壳写的是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">KONKA LED55P7</span></span>
</code></pre></div>
<p>但 Android 系统实际报告的是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Konka Android TV 9632</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">KKMT9632</span></span>
</code></pre></div>
<p>实机检测结果：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">型号：KONKA LED55P7</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">平台：MediaTek MT9632</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ro.hardware：m7332</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">CPU：4 核 ARMv7</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Android：9 / API 28</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">RAM：894,288 kB，约 872 MiB</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">eMMC：8 GB</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ABI：armeabi-v7a, armeabi</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ABI64：为空</span></span>
</code></pre></div>
<p>也就是说：</p>
<blockquote>
<p><strong>这是一台纯 32 位 ARM Android TV。</strong></p>
</blockquote>
<p>这一点对安装 TVBox 非常重要。</p>
<hr />
<h2 id="五为什么网上康佳教程不能直接照抄">五、为什么网上康佳教程不能直接照抄？<a href="#五为什么网上康佳教程不能直接照抄" class="heading-anchor-link" aria-label="Link to 五、为什么网上康佳教程不能直接照抄？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>因为不同康佳电视：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不同主板</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不同 SoC</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不同 Android 版本</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不同固件</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不同权限</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不同广告组件</span></span>
</code></pre></div>
<p>可能完全不同。</p>
<p>例如这台 LED55P7 实测存在：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">su</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">SELinux Permissive</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">没有 dm-verity</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">userdebug 固件</span></span>
</code></pre></div>
<p>因此它能够做的一些事情，普通零售康佳电视未必能做。</p>
<p>但这里一定要记住：</p>
<blockquote>
<p><strong>权限高 ≠ 什么都应该删。</strong></p>
</blockquote>
<p>本文最后没有采用刷机、删 <code>/system</code>、改系统分区等方式，就是因为“能做到”和“值得做到”是两回事。</p>
<hr />
<h2 id="六第一步开启-adb">六、第一步：开启 ADB<a href="#六第一步开启-adb" class="heading-anchor-link" aria-label="Link to 六、第一步：开启 ADB"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这台康佳电视可以通过工程菜单开启 ADB。</p>
<p>实际操作：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">遥控器</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">依次输入 2008</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">进入工程菜单</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">开启 ADB 调试</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">查看电视 IP</span></span>
</code></pre></div>
<p>例如（示例地址，请替换为电视实际 IP）：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">192.168.1.100</span></span>
</code></pre></div>
<hr />
<h2 id="七电脑端准备-adb">七、电脑端准备 ADB<a href="#七电脑端准备-adb" class="heading-anchor-link" aria-label="Link to 七、电脑端准备 ADB"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>Windows 电脑准备：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">adb.exe</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">AdbWinApi.dll</span></span>
</code></pre></div>
<p>本次实机使用：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ADB 1.0.41</span></span>
</code></pre></div>
<p>如果 ADB 没加入系统 PATH，可以直接进入 <code>adb.exe</code> 所在目录。</p>
<p>例如 PowerShell：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="powershell" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-powershell"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">cd "你的 adb.exe 所在目录"</span></span>
</code></pre></div>
<p>然后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="powershell" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-powershell"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">.\adb.exe devices</span></span>
</code></pre></div>
<hr />
<h2 id="八连接电视">八、连接电视<a href="#八连接电视" class="heading-anchor-link" aria-label="Link to 八、连接电视"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>示例使用的是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">192.168.1.100:5555</span></span>
</code></pre></div>
<p>连接：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="powershell" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-powershell"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">.\adb.exe connect 192.168.1.100:5555</span></span>
</code></pre></div>
<p>再：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="powershell" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-powershell"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">.\adb.exe devices</span></span>
</code></pre></div>
<p>正常应该看到：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">192.168.1.100:5555    device</span></span>
</code></pre></div>
<p>注意：</p>
<blockquote>
<p><strong>5555 是这台电视实际使用的端口，不代表所有 Android TV 都固定使用 5555。</strong></p>
</blockquote>
<p>如果自己的电视连接不上，不要直接假设是 ADB 坏了，需要先确认电视实际开放的 ADB 端口。</p>
<hr />
<h2 id="九正式修改之前先做只读体检">九、正式修改之前：先做只读体检<a href="#九正式修改之前先做只读体检" class="heading-anchor-link" aria-label="Link to 九、正式修改之前：先做只读体检"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这一部分非常重要。</p>
<p>不要一上来执行：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">pm disable-user</span></span>
</code></pre></div>
<p>更不要：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">pm uninstall</span></span>
</code></pre></div>
<p>先查看：</p>
<h3 id="android-版本">Android 版本<a href="#android-版本" class="heading-anchor-link" aria-label="Link to Android 版本"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.build.version.release</span></span>
</code></pre></div>
<h3 id="固件">固件<a href="#固件" class="heading-anchor-link" aria-label="Link to 固件"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.build.display.id</span></span>
</code></pre></div>
<h3 id="主板">主板<a href="#主板" class="heading-anchor-link" aria-label="Link to 主板"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.product.board</span></span>
</code></pre></div>
<h3 id="硬件">硬件<a href="#硬件" class="heading-anchor-link" aria-label="Link to 硬件"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.hardware</span></span>
</code></pre></div>
<h3 id="cpu-abi">CPU ABI<a href="#cpu-abi" class="heading-anchor-link" aria-label="Link to CPU ABI"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.product.cpu.abilist</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.product.cpu.abilist64</span></span>
</code></pre></div>
<h3 id="root">Root<a href="#root" class="heading-anchor-link" aria-label="Link to Root"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>这台电视的 <code>su</code> 不是 Magisk 常见语法，而是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 id</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>正常：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">uid=0(root)</span></span>
</code></pre></div>
<p>不要写：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su -c id</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>本机实测这种写法会报：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">su: invalid uid/gid '-c'</span></span>
</code></pre></div>
<p>正确语法是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">su [UID] [命令]</span></span>
</code></pre></div>
<p>例如：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 id</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 sh -c '命令'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<hr />
<h2 id="十检查-selinux-和-dm-verity">十、检查 SELinux 和 dm-verity<a href="#十检查-selinux-和-dm-verity" class="heading-anchor-link" aria-label="Link to 十、检查 SELinux 和 dm-verity"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>SELinux：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getenforce</span></span>
</code></pre></div>
<p>本机：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Permissive</span></span>
</code></pre></div>
<p>检查 dm-verity：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">ls /dev/dm-*</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>以及：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">cat /proc/cmdline</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">grep</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">o</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">androidboot.verifiedbootstate=[a-z]*</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>本机没有发现 dm-verity 正常工作的迹象，bootloader 状态为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">orange</span></span>
</code></pre></div>
<p>但是这里不要误解：</p>
<blockquote>
<p><strong>没有发现 dm-verity，并不代表修改系统分区就是安全的。</strong></p>
</blockquote>
<p>它只是说明少了一层完整性校验机制。</p>
<hr />
<h2 id="十一先找出康佳广告链路">十一、先找出康佳广告链路<a href="#十一先找出康佳广告链路" class="heading-anchor-link" aria-label="Link to 十一、先找出康佳广告链路"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>执行：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm list packages</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">grep</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> konka</span></span>
</code></pre></div>
<p>Windows PowerShell 也可以：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="powershell" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-powershell"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">adb shell pm list packages | findstr /i "konka"</span></span>
</code></pre></div>
<p>实际梳理后，主要的广告相关组件包括：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.systemadvert</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.adverttool</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.sticker</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.downloadcenter</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.vadr</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.message</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.appupgrade</span></span>
</code></pre></div>
<p>大致可以理解成：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">systemadvert</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">负责广告显示</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">downloadcenter</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">下载广告素材</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">vadr</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">设备/数据上报</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">message</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">推送消息</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">appupgrade</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">后台更新</span></span>
</code></pre></div>
<hr />
<h2 id="十二最关键的发现开机广告不是普通-apk">十二、最关键的发现：开机广告不是普通 APK<a href="#十二最关键的发现开机广告不是普通-apk" class="heading-anchor-link" aria-label="Link to 十二、最关键的发现：开机广告不是普通 APK"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这是整个实验里最值得记录的一点。</p>
<p>很多人会以为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.systemadvert</span></span>
</code></pre></div>
<p>就是全部广告。</p>
<p>但实际上这台电视的开机广告是由：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">/system/bin/bootvideo</span></span>
</code></pre></div>
<p>这个原生服务播放的。</p>
<p>它读取：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">/data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4</span></span>
</code></pre></div>
<p>因此：</p>
<blockquote>
<p><strong>禁用 <code>com.konka.systemadvert</code>，并不能直接让开机 MP4 消失。</strong></p>
</blockquote>
<p>它解决的是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">屏保</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">悬浮窗</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">待机广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">待机唤醒广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">角标</span></span>
</code></pre></div>
<p>而开机广告视频本身需要单独处理。</p>
<p>这也是很多网上“禁用某个康佳广告 APK 就完事”的教程，在这台电视上并不成立的原因。</p>
<hr />
<h2 id="十三第一批广告组件优先使用-disable">十三、第一批广告组件：优先使用 disable<a href="#十三第一批广告组件优先使用-disable" class="heading-anchor-link" aria-label="Link to 十三、第一批广告组件：优先使用 disable"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>本次第一批处理：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm disable-user</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">user</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0 com.konka.adverttool</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm disable-user</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">user</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0 com.konka.sticker</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm disable-user</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">user</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0 com.konka.fourkshow</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm disable-user</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">user</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0 fusion.android.tv.demo</span></span>
</code></pre></div>
<p>这里故意使用：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">disable-user</span></span>
</code></pre></div>
<p>而不是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">uninstall</span></span>
</code></pre></div>
<p>原因很简单：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">disable</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">关闭</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">以后可以 enable 恢复</span></span>
</code></pre></div>
<p>而：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">uninstall</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">改变系统状态</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">恢复更加麻烦</span></span>
</code></pre></div>
<p>对于老电视这种实验性改造：</p>
<blockquote>
<p><strong>可逆性比“删得干净”重要。</strong></p>
</blockquote>
<hr />
<h2 id="十四广告总闸systemadvert">十四、广告总闸：systemadvert<a href="#十四广告总闸systemadvert" class="heading-anchor-link" aria-label="Link to 十四、广告总闸：systemadvert"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>然后处理真正的核心广告程序：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm disable-user</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">user</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0 com.konka.systemadvert</span></span>
</code></pre></div>
<p>检查：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm list packages</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">d</span></span>
</code></pre></div>
<p>以及：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell dumpsys package com.konka.systemadvert</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">grep</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> enabled</span></span>
</code></pre></div>
<p>Windows：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="powershell" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-powershell"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">adb shell dumpsys package com.konka.systemadvert | findstr /i "enabled"</span></span>
</code></pre></div>
<p>本机实测：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">enabled=3</span></span>
</code></pre></div>
<p>也就是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">COMPONENT_ENABLED_STATE_DISABLED_USER</span></span>
</code></pre></div>
<p>注意：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">enabled=3</span></span>
</code></pre></div>
<p>只能说明用户级禁用状态，不能单独作为“整个服务彻底没有运行”的证明。</p>
<p>最终需要结合：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">实际进程</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">实际广播</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">实际功能</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">重新启动后的状态</span></span>
</code></pre></div>
<p>一起判断。</p>
<hr />
<h2 id="十五开机广告第一次尝试chmod失败">十五、开机广告第一次尝试：chmod，失败<a href="#十五开机广告第一次尝试chmod失败" class="heading-anchor-link" aria-label="Link to 十五、开机广告第一次尝试：chmod，失败"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>最初的想法很简单：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">让广告程序不能写广告 MP4</span></span>
</code></pre></div>
<p>于是尝试：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">chmod</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0555 /data/misc/konka/AdBoot/AdBootMedia</span></span>
</code></pre></div>
<p>但是重启后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">0555</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">恢复成 0777</span></span>
</code></pre></div>
<p>广告 MP4 又被系统换成了新的广告素材。</p>
<p>后来定位到了具体原因：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">/vendor/etc/init/hw/init.m7332.rc</span></span>
</code></pre></div>
<p>里面有：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">mkdir /data/misc/konka                          0777 system system</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">mkdir /data/misc/konka/AdBoot                   0777 system system</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">mkdir /data/misc/konka/AdBoot/AdBootAnimation   0777 system system</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">mkdir /data/misc/konka/AdBoot/KonkaAdBootAnimation 0777 system system</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">mkdir /data/misc/konka/AdBoot/AdBootMedia       0777 system system</span></span>
</code></pre></div>
<p>Android <code>init</code> 每次开机都会执行这些初始化操作。</p>
<p>因此：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">chmod 0555</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">重启</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">init</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">恢复 0777</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告程序重新写文件</span></span>
</code></pre></div>
<p>得到的结论是：</p>
<blockquote>
<p><strong>单纯靠目录 chmod 防止广告回写，这台电视上是经不起一次重启的。</strong></p>
</blockquote>
<hr />
<h2 id="十六最终有效方案锁住广告文件本身">十六、最终有效方案：锁住广告文件本身<a href="#十六最终有效方案锁住广告文件本身" class="heading-anchor-link" aria-label="Link to 十六、最终有效方案：锁住广告文件本身"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>既然目录权限会被重新设置，那么就不锁目录，直接锁文件。</p>
<p>本机发现原厂无广告开机视频位于：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">/kkpanel/link/bootmedia/bootvideo.mp4</span></span>
</code></pre></div>
<p>本机文件大小：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">3,475,603 B</span></span>
</code></pre></div>
<p>将它复制到广告 MP4 的位置：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 sh -c 'cp -f /kkpanel/link/bootmedia/bootvideo.mp4 /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4</span></span>
<span class="line"><span style="color:#032f62;--shiki-dark:#9ECBFF">chown system:system /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4</span></span>
<span class="line"><span style="color:#032f62;--shiki-dark:#9ECBFF">chmod 0444 /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>然后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 toybox chattr +i /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>检查：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 toybox lsattr /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>正常：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">----i--------</span></span>
</code></pre></div>
<p>这里的：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">i</span></span>
</code></pre></div>
<p>就是 immutable。</p>
<p>意思可以简单理解为：</p>
<blockquote>
<p><strong>即使程序重新拿到写权限，也不能直接修改这个文件。</strong></p>
</blockquote>
<hr />
<h2 id="十七为什么-chattr-i-必须这样验证">十七、为什么 <code>chattr +i</code> 必须这样验证？<a href="#十七为什么-chattr-i-必须这样验证" class="heading-anchor-link" aria-label="Link to 十七、为什么 chattr +i 必须这样验证？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>如果用：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">su</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 0</span></span>
</code></pre></div>
<p>测试文件写保护，没有意义。</p>
<p>因为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">root</span></span>
</code></pre></div>
<p>本来就拥有最高权限。</p>
<p>所以真正有意义的测试是模拟广告程序身份，例如：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 1000 sh -c 'echo x &gt; /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>本机测试结果为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Operation not permitted</span></span>
</code></pre></div>
<p>这才说明普通系统身份确实无法改。</p>
<p>而且文件本身使用 immutable 后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">root</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">也不能直接 rm</span></span>
</code></pre></div>
<p>必须先：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">chattr</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">i</span></span>
</code></pre></div>
<p>才能恢复修改。</p>
<hr />
<h2 id="十八千万不要给-adbootanimation-目录乱放占位文件">十八、千万不要给 AdBootAnimation 目录乱放占位文件<a href="#十八千万不要给-adbootanimation-目录乱放占位文件" class="heading-anchor-link" aria-label="Link to 十八、千万不要给 AdBootAnimation 目录乱放占位文件"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>本机：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">AdBootAnimation/</span></span>
</code></pre></div>
<p>目前是空的。</p>
<p>不要为了“保险”随便塞一个假的：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">bootanimation.zip</span></span>
</code></pre></div>
<p>因为：</p>
<blockquote>
<p>如果系统以后真的切换到这个路径播放，而里面是损坏的占位文件，反而可能把开机动画搞坏。</p>
</blockquote>
<p>所以：</p>
<blockquote>
<p><strong>空目录就保持空目录。</strong></p>
</blockquote>
<hr />
<h2 id="十九必须做真实冷启动验证">十九、必须做真实冷启动验证<a href="#十九必须做真实冷启动验证" class="heading-anchor-link" aria-label="Link to 十九、必须做真实冷启动验证"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这是整个方法里很重要的一步。</p>
<p>不能只看：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">lsattr</span></span>
</code></pre></div>
<p>也不能只看：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">enabled=3</span></span>
</code></pre></div>
<p>真正验证：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">冷启动</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Android 完整启动</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">重新读取 bootvideo</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">看 immutable 是否还存在</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">看 MD5 是否改变</span></span>
</code></pre></div>
<p>本机真实冷启动后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">lsattr</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">----i--------</span></span>
</code></pre></div>
<p>并且：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">MD5</span></span>
</code></pre></div>
<p>仍然保持原厂片的 MD5：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">c27ed929a2f9ca8d0053f73cb69d34d7</span></span>
</code></pre></div>
<p>说明：</p>
<blockquote>
<p><strong>本机当前固件下，这套开机广告替换 + immutable 防回写方案已经通过真实冷启动验证。</strong></p>
</blockquote>
<p>注意这里的表述是：</p>
<blockquote>
<p><strong>本机实测有效。</strong></p>
</blockquote>
<p>不要扩展成：</p>
<blockquote>
<p>所有康佳电视都适用。</p>
</blockquote>
<p>不同型号必须重新检测。</p>
<hr />
<h2 id="二十一个非常容易踩的坑遥控器关机不一定是真关机">二十、一个非常容易踩的坑：遥控器“关机”不一定是真关机<a href="#二十一个非常容易踩的坑遥控器关机不一定是真关机" class="heading-anchor-link" aria-label="Link to 二十、一个非常容易踩的坑：遥控器“关机”不一定是真关机"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这台电视存在：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.quickstandby</span></span>
</code></pre></div>
<p>它使用 STR 快速待机机制。</p>
<p>也就是说：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">按遥控器关机</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">不一定真正关闭 Android</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">可能进入假待机</span></span>
</code></pre></div>
<p>这种情况下：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">uptime</span></span>
</code></pre></div>
<p>可能不会归零。</p>
<p>因此测试开机广告时，不要把普通待机唤醒当成真正冷启动。</p>
<p>可以通过：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell getprop ro.boot.bootreason</span></span>
</code></pre></div>
<p>以及：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell cat /proc/uptime</span></span>
</code></pre></div>
<p>辅助判断。</p>
<p>本机真正的冷启动测试，必须确保 Android 实际重新启动。</p>
<hr />
<h2 id="二十一最重要的三层自愈机制">二十一、最重要的三层“自愈机制”<a href="#二十一最重要的三层自愈机制" class="heading-anchor-link" aria-label="Link to 二十一、最重要的三层“自愈机制”"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这次实验最大的价值之一，就是发现康佳电视并不是“你禁掉了它，它就永远没了”。</p>
<h3 id="第一层应用自动更新">第一层：应用自动更新<a href="#第一层应用自动更新" class="heading-anchor-link" aria-label="Link to 第一层：应用自动更新"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p><code>com.konka.appupgrade</code> 会进行后台应用更新。</p>
<p>如果某个系统 APK 被重新安装：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">原来的 disable 状态</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">重新安装</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">恢复默认启用</span></span>
</code></pre></div>
<p>因此：</p>
<blockquote>
<p><strong>先断更新链，再禁广告包</strong>，是继续做深度精简时更合理的顺序。</p>
</blockquote>
<p>但本文最终没有继续做这一步，因为到 TVBox 正常使用以后，实际目标已经达成。</p>
<hr />
<h3 id="第二层initrc-重置目录权限">第二层：init.rc 重置目录权限<a href="#第二层initrc-重置目录权限" class="heading-anchor-link" aria-label="Link to 第二层：init.rc 重置目录权限"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>这就是之前：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">chmod 0555</span></span>
</code></pre></div>
<p>重启失效的原因。</p>
<p>所以：</p>
<blockquote>
<p><strong>依赖目录权限的广告防回写方案，不适合这台电视。</strong></p>
</blockquote>
<p>最终采用的是锁文件本身。</p>
<hr />
<h3 id="第三层persistent-进程">第三层：PERSISTENT 进程<a href="#第三层persistent-进程" class="heading-anchor-link" aria-label="Link to 第三层：PERSISTENT 进程"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>有一些系统应用带：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">PERSISTENT</span></span>
</code></pre></div>
<p>即使禁用，进程也可能仍存在。</p>
<p>因此：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">enabled=3</span></span>
</code></pre></div>
<p>不等于：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">进程一定不存在</span></span>
</code></pre></div>
<p>本机 <code>fourkshow</code> 就曾经出现过这种情况。</p>
<p>所以对于这种程序：</p>
<blockquote>
<p>最终应该看实际进程、PSS、广播和功能，而不是只看一个状态值。</p>
</blockquote>
<hr />
<h2 id="二十二为什么不要随便禁-appupgrade">二十二、为什么不要随便禁 appupgrade？<a href="#二十二为什么不要随便禁-appupgrade" class="heading-anchor-link" aria-label="Link to 二十二、为什么不要随便禁 appupgrade？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这一点对于以后继续折腾电视的人尤其重要。</p>
<p>本机审计发现：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.appupgrade</span></span>
</code></pre></div>
<p>暴露了 Provider。</p>
<p>而：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.livelauncher</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.tvsettings</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.market.main</span></span>
</code></pre></div>
<p>等组件会访问这些 Provider。</p>
<p>因此：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">直接整包禁用 appupgrade</span></span>
</code></pre></div>
<p>有可能产生：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">桌面查询异常</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">设置查询异常</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">应用商店异常</span></span>
</code></pre></div>
<p>更安全的办法，是未来真的要处理它时，先进行 Provider 依赖审计，再考虑只关闭：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">BootCompleteReceiver</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">AlarmReceiver</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">AppUpgradeService</span></span>
</code></pre></div>
<p>也就是说：</p>
<blockquote>
<p><strong>系统 APK 在禁用之前，一定先查 Provider 和组件依赖。</strong></p>
</blockquote>
<p>不要看到名字像“更新”，就直接整包砍掉。</p>
<hr />
<h2 id="二十三为什么没有把系统-apk-全部删除">二十三、为什么没有把系统 APK 全部删除？<a href="#二十三为什么没有把系统-apk-全部删除" class="heading-anchor-link" aria-label="Link to 二十三、为什么没有把系统 APK 全部删除？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>因为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">能删</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">≠</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">值得删</span></span>
</code></pre></div>
<p>例如：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.tvsettings</span></span>
</code></pre></div>
<p>负责系统设置。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.android.packageinstaller</span></span>
</code></pre></div>
<p>负责安装 APK。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.mirror</span></span>
</code></pre></div>
<p>负责手机镜像。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.kkmultiscreen</span></span>
</code></pre></div>
<p>负责多屏互动。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.konka.livelauncher</span></span>
</code></pre></div>
<p>是当前系统桌面。</p>
<p>这些东西虽然不一定与你“看视频”直接相关，但删除以后可能造成：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">设置进不去</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">投屏失效</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">APK 装不上</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">没有桌面</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">电视功能异常</span></span>
</code></pre></div>
<p>所以最终采取：</p>
<blockquote>
<p><strong>只处理明确对应广告、并且经过验证可以处理的组件。</strong></p>
</blockquote>
<hr />
<h2 id="二十四为什么最终直接使用-tvbox">二十四、为什么最终直接使用 TVBox？<a href="#二十四为什么最终直接使用-tvbox" class="heading-anchor-link" aria-label="Link to 二十四、为什么最终直接使用 TVBox？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这才是本次改造真正的“终点”。</p>
<p>我的实际需求并不是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">安装很多电视应用</span></span>
</code></pre></div>
<p>而是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">搜索资源</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">看视频</span></span>
</code></pre></div>
<p>所以只需要：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">TVBox</span></span>
</code></pre></div>
<p>作为主要入口。</p>
<p>整个使用方式变成：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">康佳原厂系统</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">       ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">负责底层电视功能</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">       ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">TVBox</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">       ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">搜索资源</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">       ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">观看视频</span></span>
</code></pre></div>
<p>而不是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">康佳首页</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">康佳推荐</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">康佳内容平台</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广告</span></span>
</code></pre></div>
<p>最终实际使用 TVBox 时没有出现额外广告干扰，因此后续广告链没有再继续处理。</p>
<hr />
<h2 id="二十五tvbox-安装前一定检查-abi">二十五、TVBox 安装前一定检查 ABI<a href="#二十五tvbox-安装前一定检查-abi" class="heading-anchor-link" aria-label="Link to 二十五、TVBox 安装前一定检查 ABI"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这台电视是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">armeabi-v7a</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">armeabi</span></span>
</code></pre></div>
<p>同时：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ro.product.cpu.abilist64</span></span>
</code></pre></div>
<p>为空。</p>
<p>所以这是：</p>
<blockquote>
<p><strong>纯 32 位 Android TV。</strong></p>
</blockquote>
<p>TVBoxOSC 一个 Release 可能同时提供：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">java</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">java32</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">java64</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">python</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">python32</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">python64</span></span>
</code></pre></div>
<p>对于这台机器：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">java32</span></span>
</code></pre></div>
<p>最合适。</p>
<p>不要随便安装：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">arm64-v8a</span></span>
</code></pre></div>
<p>版本。</p>
<hr />
<h2 id="二十六为什么-apk-不能下载下来能打开就算合法">二十六、为什么 APK 不能“下载下来能打开就算合法”？<a href="#二十六为什么-apk-不能下载下来能打开就算合法" class="heading-anchor-link" aria-label="Link to 二十六、为什么 APK 不能“下载下来能打开就算合法”？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这是另一个实际踩过的坑。</p>
<p>某个 APK 即使：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">文件名是 .apk</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">file 命令说 Android package</span></span>
</code></pre></div>
<p>也不能证明：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">文件完整</span></span>
</code></pre></div>
<p>下载过程中如果文件被截断：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">file</span></span>
</code></pre></div>
<p>仍然可能把它识别成 APK。</p>
<p>更可靠的方法是：</p>
<h3 id="1-获取官方-release-的-sha-256">1. 获取官方 Release 的 SHA-256<a href="#1-获取官方-release-的-sha-256" class="heading-anchor-link" aria-label="Link to 1. 获取官方 Release 的 SHA-256"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>例如从 GitHub Release API 获取：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">digest</span></span>
</code></pre></div>
<h3 id="2-本地计算">2. 本地计算<a href="#2-本地计算" class="heading-anchor-link" aria-label="Link to 2. 本地计算"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">sha256sum</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> TVBox.apk</span></span>
</code></pre></div>
<h3 id="3-对比">3. 对比<a href="#3-对比" class="heading-anchor-link" aria-label="Link to 3. 对比"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>必须：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">完全一致</span></span>
</code></pre></div>
<p>再安装。</p>
<hr />
<h2 id="二十七tvbox-安装流程">二十七、TVBox 安装流程<a href="#二十七tvbox-安装流程" class="heading-anchor-link" aria-label="Link to 二十七、TVBox 安装流程"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>先确认 APK：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">TVBox_..._java32.apk</span></span>
</code></pre></div>
<p>再：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> install</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">r</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> TVBox.apk</span></span>
</code></pre></div>
<p>成功：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Success</span></span>
</code></pre></div>
<p>查真实包名：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm list packages</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#e36209;--shiki-dark:#FFAB70">grep</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">i</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> tvbox</span></span>
</code></pre></div>
<p>不要自己猜包名。</p>
<p>例如本机实际包名可能是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">com.github.tvbox.osc.jun</span></span>
</code></pre></div>
<p>然后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell monkey</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">p</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> com.github.tvbox.osc.jun 1</span></span>
</code></pre></div>
<p>实际使用时必须以你自己电视查询出来的真实包名为准。</p>
<hr />
<h2 id="二十八为什么不在教程里提供影视接口">二十八、为什么不在教程里提供影视接口？<a href="#二十八为什么不在教程里提供影视接口" class="heading-anchor-link" aria-label="Link to 二十八、为什么不在教程里提供影视接口？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>TVBox 本身只是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">播放器 / 聚合框架</span></span>
</code></pre></div>
<p>真正决定里面显示什么内容的是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">配置地址 / 内容源</span></span>
</code></pre></div>
<p>所以本文不提供来历不明的影视接口，也不推荐从陌生网站下载配置。</p>
<p>使用时：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">TVBox</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">设置</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">配置地址</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">填写你自己选择并确认可以使用的内容源</span></span>
</code></pre></div>
<p>这样可以把：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">软件本身</span></span>
</code></pre></div>
<p>和：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">内容来源</span></span>
</code></pre></div>
<p>分开。</p>
<p>另外：</p>
<blockquote>
<p><strong>“TVBox 没有广告”不等于“所有内容源的视频流永远没有广告”。</strong></p>
</blockquote>
<p>本次实机使用的配置在实际观看过程中没有出现额外广告，因此本文将其作为<strong>本机实测结果</strong>记录，而不是对所有内容源作绝对保证。</p>
<hr />
<h2 id="二十九内存只有约-872-mib这是为什么要尽量简单">二十九、内存只有约 872 MiB，这是为什么要尽量简单？<a href="#二十九内存只有约-872-mib这是为什么要尽量简单" class="heading-anchor-link" aria-label="Link to 二十九、内存只有约 872 MiB，这是为什么要尽量简单？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这台电视实际总内存：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">894,288 kB</span></span>
</code></pre></div>
<p>约：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">872 MiB</span></span>
</code></pre></div>
<p>Android 开机后本身就已经占用了相当一部分。</p>
<p>而且系统判断：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">status critical</span></span>
</code></pre></div>
<p>因此：</p>
<blockquote>
<p><strong>这台电视并不适合安装一大堆常驻后台的电视 App。</strong></p>
</blockquote>
<p>这也是为什么这次方案选择：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">原厂底层</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">+</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">一个主要播放器</span></span>
</code></pre></div>
<p>而不是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">十几个电视应用同时安装</span></span>
</code></pre></div>
<hr />
<h2 id="三十不要直接把-rss-相加算内存">三十、不要直接把 RSS 相加算内存<a href="#三十不要直接把-rss-相加算内存" class="heading-anchor-link" aria-label="Link to 三十、不要直接把 RSS 相加算内存"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这是另一个很容易误判的问题。</p>
<p>例如：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">ps</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">A</span><span style="color:#e36209;--shiki-dark:#FFAB70"> -</span><span style="color:#e36209;--shiki-dark:#FFAB70">o</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> RSS,NAME</span></span>
</code></pre></div>
<p>看到很多进程以后，直接全部相加，会得到一个非常夸张的数字。</p>
<p>原因是共享内存会被多个进程重复计算。</p>
<p>本机同一时间：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">RSS 合计约 1,647 MB</span></span>
</code></pre></div>
<p>但电视总 RAM 只有：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">约 872 MB</span></span>
</code></pre></div>
<p>显然不可能真的用了 1.6GB 独占内存。</p>
<p>所以真正分析内存，建议看：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell dumpsys meminfo</span></span>
</code></pre></div>
<p>重点关注：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">PSS</span></span>
</code></pre></div>
<p>而不是把所有 RSS 简单相加。</p>
<hr />
<h2 id="三十一一个重要经验一次只改一个变量">三十一、一个重要经验：一次只改一个变量<a href="#三十一一个重要经验一次只改一个变量" class="heading-anchor-link" aria-label="Link to 三十一、一个重要经验：一次只改一个变量"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>本次最初的第一轮实验其实同时做了：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">替换开机视频</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">+</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">chmod</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">+</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">禁用多个广告包</span></span>
</code></pre></div>
<p>结果出现问题以后，需要重新回头定位：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">到底是哪一步失效</span></span>
</code></pre></div>
<p>这很浪费时间。</p>
<p>因此以后再改这种老设备：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">只改一项</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">验证</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">需要重启时人工重启</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">验证</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">再改下一项</span></span>
</code></pre></div>
<p>会可靠得多。</p>
<hr />
<h2 id="三十二以后不要让-agent-自动重启电视">三十二、以后不要让 Agent 自动重启电视<a href="#三十二以后不要让-agent-自动重启电视" class="heading-anchor-link" aria-label="Link to 三十二、以后不要让 Agent 自动重启电视"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这个必须单独写进教程。</p>
<p>不要在 Agent 指令里允许：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">adb reboot</span></span>
</code></pre></div>
<p>或者：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">adb shell reboot</span></span>
</code></pre></div>
<p>或者：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">adb shell su 0 reboot</span></span>
</code></pre></div>
<p>原因很简单：</p>
<p>这台电视真正冷启动之后：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Wi-Fi</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ADB</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">5555</span></span>
</code></pre></div>
<p>可能需要接近：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">110 秒</span></span>
</code></pre></div>
<p>才完全恢复。</p>
<p>中途可能出现：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">offline</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">ping 不通</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">5555 关闭</span></span>
</code></pre></div>
<p>这并不一定代表电视坏了。</p>
<p>而且：</p>
<blockquote>
<p><strong>开机广告到底有没有被解决，只有人在电视屏幕前才能真正确认。</strong></p>
</blockquote>
<p>因此最合理的模式是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">Agent</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">执行修改</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">发现需要重启</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">告诉你</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">停止</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">你自己决定是否重启</span></span>
</code></pre></div>
<hr />
<h2 id="三十三什么时候才需要继续深度清理">三十三、什么时候才需要继续深度清理？<a href="#三十三什么时候才需要继续深度清理" class="heading-anchor-link" aria-label="Link to 三十三、什么时候才需要继续深度清理？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>只有当你发现：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">还有康佳广告</span></span>
</code></pre></div>
<p>或者：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">后台一直自动安装东西</span></span>
</code></pre></div>
<p>或者：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">内存已经影响 TVBox 使用</span></span>
</code></pre></div>
<p>才有必要继续分析：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">downloadcenter</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">vadr</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">message</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">appupgrade</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">market</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">PERSISTENT 服务</span></span>
</code></pre></div>
<p>而不是单纯为了“系统看起来更干净”继续删除。</p>
<p>本次最终没有继续处理这些后续链路，就是因为：</p>
<blockquote>
<p><strong>TVBox 已经绕过了康佳的主要内容入口，而且实际观看已经达到了预期效果。</strong></p>
</blockquote>
<hr />
<h2 id="三十四完整回退思路">三十四、完整回退思路<a href="#三十四完整回退思路" class="heading-anchor-link" aria-label="Link to 三十四、完整回退思路"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>如果以后想恢复广告相关组件，可以：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm enable com.konka.systemadvert</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm enable com.konka.adverttool</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm enable com.konka.sticker</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm enable com.konka.fourkshow</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell pm enable fusion.android.tv.demo</span></span>
</code></pre></div>
<p>如果要恢复开机广告文件：</p>
<p>首先解除 immutable：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 toybox chattr -i /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>然后恢复备份：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">adb</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> shell </span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">su 0 sh -c 'cp -f /data/local/konka_ad_backup/ad_current.mp4 /data/misc/konka/AdBoot/AdBootMedia/bootvideo.mp4'</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span></span>
</code></pre></div>
<p>注意：</p>
<blockquote>
<p><strong>必须先 <code>chattr -i</code>，再执行 <code>cp</code> 或 <code>rm</code>。</strong></p>
</blockquote>
<p>否则 immutable 文件连 root 都无法正常覆盖。</p>
<hr />
<h2 id="三十五本文最终采用的实际方案">三十五、本文最终采用的实际方案<a href="#三十五本文最终采用的实际方案" class="heading-anchor-link" aria-label="Link to 三十五、本文最终采用的实际方案"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>最终没有走：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">刷第三方 ROM</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">替换 Launcher</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">删除系统 APK</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">修改 /system</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">修改 /vendor</span></span>
</code></pre></div>
<p>而是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">① 开启 ADB</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">② 只读检测电视</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">③ 找出康佳广告链</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">④ 禁用低风险广告组件</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑤ 禁用 systemadvert</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑥ 找到真实开机广告 MP4</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑦ 使用原厂开机片覆盖</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑧ chattr +i 锁住文件</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑨ 做真实冷启动验证</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑩ 安装 TVBox</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑪ 实际使用 TVBox 搜索/播放</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑫ 达到目标</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⑬ 停止继续修改</span></span>
</code></pre></div>
<hr />
<h2 id="三十六最终状态">三十六、最终状态<a href="#三十六最终状态" class="heading-anchor-link" aria-label="Link to 三十六、最终状态"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>以本次实际操作结束时的状态为准：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">✅ 开机商业广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 已替换为原厂开机片</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 使用 chattr +i 锁定</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 已通过真实冷启动验证</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">✅ 桌面广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 核心广告组件已处理</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 桌面悬浮/角标/屏保/待机广告得到处理</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">✅ TVBox</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 已安装</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 可以正常启动</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 可以搜索资源并观看</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 本次实际使用没有出现额外广告</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">✅ 原厂桌面</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 保留</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有为了换桌面而冒额外风险</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">✅ 手机投屏</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 相关 `mirror / kkmultiscreen` 组件没有关闭</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">✅ 系统底层</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有刷机</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有删除系统 APK</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有修改 `/system`</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有修改 `/vendor`</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有修改 init.rc</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有修改 build.prop</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⭕ 当贝市场</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 可选，不是必装</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 本次实际没有安装</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">⏸ 后续广告链</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 没有继续处理</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 因为 TVBox 已经绕开康佳内容入口</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">   → 实际观看目标已经达到</span></span>
</code></pre></div>
<hr />
<h2 id="三十七最终复盘这次真正值得记录的是什么">三十七、最终复盘：这次真正值得记录的是什么？<a href="#三十七最终复盘这次真正值得记录的是什么" class="heading-anchor-link" aria-label="Link to 三十七、最终复盘：这次真正值得记录的是什么？"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这次改造最值得记录的，不是某一条 ADB 命令，而是几个实际踩出来的结论。</p>
<h3 id="1-康佳广告不是一个-apk">1. 康佳广告不是一个 APK<a href="#1-康佳广告不是一个-apk" class="heading-anchor-link" aria-label="Link to 1. 康佳广告不是一个 APK"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>它是一条链：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">下载</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">渲染</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">推送</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">更新</span></span>
</code></pre></div>
<p>所以必须先查清楚谁负责什么。</p>
<h3 id="2-开机广告和桌面广告是两件事">2. 开机广告和桌面广告是两件事<a href="#2-开机广告和桌面广告是两件事" class="heading-anchor-link" aria-label="Link to 2. 开机广告和桌面广告是两件事"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>开机广告实际上是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">bootvideo</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">+</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">bootvideo.mp4</span></span>
</code></pre></div>
<p>而不是单纯的：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">systemadvert</span></span>
</code></pre></div>
<h3 id="3-chmod-目录不可靠">3. chmod 目录不可靠<a href="#3-chmod-目录不可靠" class="heading-anchor-link" aria-label="Link to 3. chmod 目录不可靠"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>因为：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">init.rc</span></span>
</code></pre></div>
<p>会在开机重新建立目录并恢复权限。</p>
<h3 id="4-immutable-文件锁是本机实测有效的办法">4. immutable 文件锁是本机实测有效的办法<a href="#4-immutable-文件锁是本机实测有效的办法" class="heading-anchor-link" aria-label="Link to 4. immutable 文件锁是本机实测有效的办法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>不是“网上说有效”。</p>
<p>而是：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">替换原厂片</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">chattr +i</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">真实冷启动</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">MD5 不变</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">实测通过</span></span>
</code></pre></div>
<p>这才算真正验证。</p>
<h3 id="5-enabled3-不代表一切都结束">5. enabled=3 不代表一切都结束<a href="#5-enabled3-不代表一切都结束" class="heading-anchor-link" aria-label="Link to 5. enabled=3 不代表一切都结束"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>还要看：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">进程</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">广播</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">PSS</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">功能</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">重启后的状态</span></span>
</code></pre></div>
<h3 id="6-不要为了彻底而彻底">6. 不要为了彻底而彻底<a href="#6-不要为了彻底而彻底" class="heading-anchor-link" aria-label="Link to 6. 不要为了彻底而彻底"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>这次最大的经验其实是：</p>
<blockquote>
<p><strong>当电视已经没有明显广告，并且 TVBox 已经满足观看需求时，就没有必要再继续修改更多系统组件。</strong></p>
</blockquote>
<hr />
<h2 id="三十八最终结果用一句话概括">三十八、最终结果，用一句话概括<a href="#三十八最终结果用一句话概括" class="heading-anchor-link" aria-label="Link to 三十八、最终结果，用一句话概括"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这次不是把康佳电视“魔改成另一个系统”，而是：</p>
<blockquote>
<p><strong>保留原厂系统负责电视本身的功能，关闭真正影响体验的广告，把观看视频的入口交给 TVBox。</strong></p>
</blockquote>
<p>最终变成：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">开机</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"> ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">没有商业开机广告</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"> ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">进入桌面</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"> ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">没有明显广告干扰</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"> ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">打开 TVBox</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"> ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">搜索资源</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"> ↓</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">直接观看</span></span>
</code></pre></div>
<p>这就是这台 <strong>KONKA LED55P7</strong> 本次实机改造最终采用的方案。</p>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/music-player-lyrics/</id>
    <title>博客音乐播放器：按需加载、歌词滚动与封面自动匹配</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/music-player-lyrics/"/>
    <published>2026-09-21T00:00:00+00:00</published>
    <updated>2026-09-21T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>给静态博客加一个会滚歌词的音乐播放器：首页常驻代码 0.28KB，播放器只在第一次点击时才进浏览器；歌词用对象存储上的 LRC，专辑封面由构建期脚本从公开 API 匹配并缓存。附六个真实 bug 的根因与修法。</summary>
    <content type="html"><![CDATA[<p>大多数博客播放器的做法是把播放器常驻在页面里：即使没人点，首屏也要背上几十 KB 的 JS、CSS 和一轮音频元数据请求。这篇记录的是另一条路线——<strong>首页只留一个按钮，其余全部延后</strong>，以及在这之上做的歌词滚动和专辑封面自动匹配。</p>
<p>所有数字都是构建产物和浏览器里实测的，不是估算。文末附六个踩到的真 bug，其中两个是”自测全绿、真机全废”那一类。</p>
<h2 id="成果概览">成果概览<a href="#成果概览" class="heading-anchor-link" aria-label="Link to 成果概览"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<table><thead><tr><th>指标</th><th>实测值</th></tr></thead><tbody>
<tr><td>首页常驻音乐代码</td><td>0.28 KB gzip（原始 0.4 KB），不含任何 DOM</td></tr>
<tr><td>首屏音乐相关请求</td><td><strong>0</strong></td></tr>
<tr><td>第一次点击 ♪ 新增</td><td>3 个：播放器 JS 5.0 KB、CSS 2.5 KB、<code>songs.json</code> 0.7 KB（压缩后传输体积，合计约 8.1 KB）</td></tr>
<tr><td>封面 / 歌词</td><td>面板打开后各自按需再拉，切歌才拉下一首的</td></tr>
<tr><td>音频</td><td><code>&lt;audio preload="none"&gt;</code>，不点播放不下载一个字节</td></tr>
<tr><td>运行时第三方 API</td><td><strong>0</strong>（封面与元数据在构建期就落进 JSON）</td></tr>
<tr><td>依赖</td><td>无。原生 <code>&lt;audio&gt;</code> + <code>&lt;dialog&gt;</code> + <code>fetch</code>，图标是内联的 Phosphor 官方 SVG path</td></tr>
</tbody></table>
<h2 id="一架构首页只留一个按钮">一、架构：首页只留一个按钮<a href="#一架构首页只留一个按钮" class="heading-anchor-link" aria-label="Link to 一、架构：首页只留一个按钮"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>入口组件不渲染任何标记，只挂一段脚本：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">// MusicLauncher.astro —— 构建后 0.28KB gzip</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">if (!window.__musicLauncherBound) {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  window.__musicLauncherBound = true</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  let busy = false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  document.addEventListener('click', async (event) =&gt; {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    if (!(event.target instanceof Element) || !event.target.closest('#music-toggle')) {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      return</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    if (busy) return</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    busy = true</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    try {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      const { toggleMusicPanel } = await import('./music-player')</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      await toggleMusicPanel()</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    catch { /* 拉取失败时按钮保持可用，下次点击重试 */ }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    finally { busy = false }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  })</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<p><code>window.__musicLauncherBound</code> 那道闸门不是洁癖：Astro 在 ClientRouter 换页后会重跑普通 <code>&lt;script&gt;</code>，不加守卫每次导航就会多叠一层委托监听。</p>
<p>播放器本体是一个懒加载模块，内部只有一个 <code>new Audio()</code> 和一个 <code>&lt;dialog&gt;</code>，DOM 在首次点击时才建。三个坑值得单独记：</p>
<p><strong>CSS 会被提走。</strong> Astro 会把模块里 <code>import './x.css'</code> 的样式提升到每页的 <code>&lt;link rel="stylesheet"&gt;</code>——那就白懒加载了。改成 <code>import cssUrl from './music-player.css?url'</code>，挂载时用 JS 注入 <code>&lt;link id="music-player-css"&gt;</code>，并在 <code>astro:page-load</code> 里幂等重注入（ClientRouter 换 <code>&lt;head&gt;</code> 会把它带走）。</p>
<p><strong>dialog 要跨换页存活。</strong> <code>&lt;dialog&gt;</code> 挂在 <code>body</code> 上，SPA 换页把 body 子节点清空后，节点本身还活着，<code>page-load</code> 里重新 <code>append</code> 回去即可——<strong>正在播的歌不会被打断</strong>，也不需要把播放状态提升到全局。</p>
<p><strong>进度刷新别用 setInterval。</strong> 播放中用 <code>requestAnimationFrame</code> 驱动进度条，暂停即自然停；面板关闭时短路掉刷新逻辑。</p>
<h2 id="二控件做减法">二、控件做减法<a href="#二控件做减法" class="heading-anchor-link" aria-label="Link to 二、控件做减法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>播放行最后只剩三个键：上一首 / 播放 / 下一首。随机播放和”顺序 ↔ 单曲循环”两态按钮都被砍掉了——歌单只有几首的时候它们没有意义。</p>
<p>音量换成手机信号格那样的 5 根阶梯柱：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">const VOLUME_STEPS = [20, 40, 60, 80, 100]   // 柱高 6/10/14/18/22px，底部对齐</span></span>
</code></pre></div>
<p>整组是一个 pointer 表面（柱子本身 <code>pointer-events: none</code>）：<strong>点击</strong>吸附到最近一档，<strong>拖动</strong>连续取值，<strong>滑过左缘</strong>即静音。因为静音由滑动承担了，原来那枚喇叭图标也删了。</p>
<blockquote>
<p>这里有个教训：音量柱是底部对齐的阶梯，它的<strong>视觉重心</strong>比外接框中心低约 4px。按 DOM 几何把喇叭图标和柱子”对齐”了三次，肉眼看还是歪的。最后靠删图标解决——观感问题要用眼睛验收，不能只看 <code>getBoundingClientRect()</code>。</p>
</blockquote>
<h2 id="三歌词滚动">三、歌词滚动<a href="#三歌词滚动" class="heading-anchor-link" aria-label="Link to 三、歌词滚动"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>歌词就是一个标准 <code>.lrc</code>，和 mp3 一起放在对象存储里：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ini" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ini"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[ti:戒不掉（原声版）]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[ar:欧阳耀莹]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[00:14.58]今天开始新出发吗</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[00:18.88]留过了疤</span></span>
</code></pre></div>
<p>解析用一个正则，<code>[ti:]</code> <code>[ar:]</code> <code>[offset:]</code> 这类元数据因为冒号前不是数字而天然不匹配，剥掉标签后为空的行再丢一次，所以不会渲染出空行。一行多个时间戳也会全部收下。</p>
<p><strong>滚动不用 <code>scrollTop</code>，用 <code>transform</code>。</strong> 当前行居中靠给整列加一个位移：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">const y = boxHeight / 2 - (activeLine.offsetTop + activeLine.offsetHeight / 2)</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">list.style.transform = `translateY(${y}px)`</span></span>
</code></pre></div>
<p>好处是位置完全可控、能加 450ms 缓动、上下留白由遮罩决定，也不会和浏览器原生滚动行为打架。上下淡出用一条渐变遮罩，非当前行降透明度并加极轻的模糊：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="css" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-css"><span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">mp-lyrics</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#005cc5;--shiki-dark:#79B8FF">overflow</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">clip</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#005cc5;--shiki-dark:#79B8FF">mask-image</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">linear-gradient</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#d73a49;--shiki-dark:#F97583">to</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">bottom</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">transparent</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF">000</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">32</span><span style="color:#d73a49;--shiki-dark:#F97583">%</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF">000</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">68</span><span style="color:#d73a49;--shiki-dark:#F97583">%</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">transparent</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
<span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">mp-lyric-line</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">opacity</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#005cc5;--shiki-dark:#79B8FF">.32</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">filter</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">blur</span><span style="color:#24292e;--shiki-dark:#E1E4E8">(</span><span style="color:#005cc5;--shiki-dark:#79B8FF">0.4</span><span style="color:#d73a49;--shiki-dark:#F97583">px</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
<span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">mp-lyric-line</span><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">is-active</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">opacity</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">1</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">font-weight</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">600</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">filter</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">none</span><span style="color:#24292e;--shiki-dark:#E1E4E8">;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<p>手动浏览也加在了这套位移模型上：拖拽和滚轮改的是”在自动居中之上再叠一个偏移量”，松手 2.5 秒后把偏移量归零、滑回当前行。拖动过程中歌曲继续往前唱，高亮照常换行，但会反向补偿偏移量让画面纹丝不动，否则你正在看的那句会被突然推走。</p>
<p>点击任意一句 → 跳到该句时间并起播。<strong>每一行是真正的 <code>&lt;button&gt;</code></strong>，<code>aria-label</code> 带上时间（<code>1:12 喜欢这触摸俘虏我</code>），键盘 Tab + Enter 也能跳。</p>
<p>歌词只在面板打开、且这首歌配了 <code>.lrc</code> 时才 <code>fetch</code> 一次，结果按曲目缓存在内存里，重开面板零请求（实测 <code>extraFetches: 0</code>）。没有歌词的曲目整块区域 <code>display: none</code>，布局回到从前。</p>
<h2 id="四专辑封面自动匹配构建期">四、专辑封面自动匹配（构建期）<a href="#四专辑封面自动匹配构建期" class="heading-anchor-link" aria-label="Link to 四、专辑封面自动匹配（构建期）"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>只给歌名和歌手，脚本自动去找专辑封面。数据源优先级：<strong>iTunes Search → MusicBrainz + Cover Art Archive → 返回 null</strong>。</p>
<p>iTunes 这一步的实测结果直接决定了实现：</p>
<table><thead><tr><th>请求</th><th>结果</th></tr></thead><tbody>
<tr><td><code>country=CN</code></td><td><strong>0 条</strong>（国区搜索接口不给结果）</td></tr>
<tr><td>默认 US</td><td>返回 <code>Sunny Day / Cool Music / Piano Instrumental</code> 一类同名钢琴翻弹——典型错配</td></tr>
<tr><td><code>country=TW</code> / <code>HK</code></td><td>✅ <code>晴天 / 周杰倫 / 葉惠美</code>，Live 版排在第 2 位</td></tr>
</tbody></table>
<p>所以查询要打 TW + HK 两个店，并且<strong>不能取第一条了事</strong>，要评分：</p>
<ul>
<li>归一化（NFKC、小写、剥标点空白）后歌名全等 → 高分</li>
<li>歌手是区分同名翻唱的唯一屏障，判得更严：等长且共享过半字符才算同一名字的异体写法</li>
<li>原版查询撞上 <code>Live / Remix / 伴奏 / 翻唱</code> 等版本标记 → 直接丢弃，不进候选</li>
<li>专辑名含 <code>精选 / Best / OST</code> → 降级</li>
<li>两个店同时命中同一 <code>trackId</code> → 互相印证加分</li>
</ul>
<p>封面尺寸按 Apple 的 URL 规则替换即可任意放大：<code>/100x100bb.jpg</code> → <code>/300x300bb.jpg</code>。实测同一张图 <code>100x100bb</code> 3.0 KB、<code>200x200bb</code> 7.1 KB、<code>300x300bb</code> 14.7 KB、<code>600x600bb</code> 82 KB。<strong>取 300</strong>：封面在面板里最大只画到 74px（歌单行 46px），3 倍屏也只要 222px，用 600 等于让首次点开面板多背 65 KB 却看不出差别。</p>
<p><strong>三态输出，宁缺勿滥</strong>：</p>
<table><thead><tr><th>状态</th><th>含义</th><th>是否写封面</th></tr></thead><tbody>
<tr><td><code>matched</code></td><td>标题异体或全等 + 有封面 + 是首位结果 + 无并列候选 + 歌手全等或两店互证</td><td>✅</td></tr>
<tr><td><code>review</code></td><td>差一点（例如结果标题多了 <code>(原聲版)</code> 后缀）</td><td>❌，但把前 3 个候选连封面一起存下来给人看</td></tr>
<tr><td><code>not_found</code></td><td>没有可靠结果</td><td>❌</td></tr>
</tbody></table>
<p><code>review</code> 用 <code>--accept &lt;id&gt;</code> 一键提升为 <code>matched</code>。写盘前还会对封面 URL 发一次 HEAD，不可达就降级——往 <code>songs.json</code> 里写一个坏地址，等于亲手给播放器做破图。</p>
<p>首跑三首歌的真实结果：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[1/3] 戒不掉 - 欧阳耀莹              ! review（候选 8 分：戒不掉 (原聲版) / 歐陽耀瑩）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[2/3] 春娇与志明 - 街道办GDC/欧阳耀莹  ✓ Apple Music  专辑：春嬌與志明 - Single</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[3/3] 我们好像在哪见过 - 杨宗纬/叶蓓    ✗ Apple Music  ✗ MusicBrainz  ! 未找到封面</span></span>
</code></pre></div>
<p>第 3 首是<strong>正确</strong>的失败：Apple 的繁中/港曲库里只有同名翻唱，MusicBrainz 里最接近的是薛之谦的《我好像在哪见过你》——不是同一首歌。找不到就留空，播放器会回落到”歌名首字”的字母砖。</p>
<blockquote>
<p>版权：第三方封面图片的版权/使用许可需要根据来源和具体用途确认，不要默认认为 API 返回的图片可以任意再分发。这条提示也写在了脚本头部注释里。</p>
</blockquote>
<h2 id="五踩到的六个坑">五、踩到的六个坑<a href="#五踩到的六个坑" class="heading-anchor-link" aria-label="Link to 五、踩到的六个坑"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p><strong>1. 重开面板后歌词偏 459.6px。</strong> <code>display: none</code> 的元素 <code>getBoundingClientRect()</code> 全是 0。居中量的是窗口高度，而渲染发生在 <code>showModal()</code> 之前，于是按 0 高度算出了位移。修法：先 <code>showModal()</code> 再渲染。</p>
<p><strong>2. 真机上点歌词完全不跳。</strong> <code>setPointerCapture</code> 会把后续的 <code>pointerup</code> 和它派生的 <code>click</code> <strong>一起改派到捕获元素</strong>，于是 <code>event.target.closest('.mp-lyric-line')</code> 取不到那一句。更阴的是：自测时用的是合成 <code>PointerEvent</code>，<code>pointerId</code> 不存在，<code>setPointerCapture</code> 直接抛错、根本没形成捕获，于是测试一路绿灯。修法：跳转改在 <code>pointerup</code> 里做，用的是 <code>pointerdown</code> 当时记下的行（<code>pointerdown</code> 早于同一个 handler 里设置捕获，target 可信）；<code>click</code> 监听只服务键盘。</p>
<blockquote>
<p>顺带一个测试陷阱：合成 <code>MouseEvent('click')</code> 不传 <code>detail</code> 时默认是 <code>0</code>，会被判成键盘激活。测指针点击必须显式 <code>detail: 1</code>。</p>
</blockquote>
<p><strong>3. 聚焦把歌词容器滚走了。</strong> 歌词行改成可聚焦的 <code>&lt;button&gt;</code> 之后，浏览器在聚焦时会滚动 <code>overflow: hidden</code> 的容器（它仍是可编程滚动的），实测内部 <code>scrollTop</code> 被推了 628px，居中全废。修法：<code>overflow: clip</code>——它不是滚动容器。</p>
<p><strong>4. 切歌从上一首的时间点继续播。</strong> <code>audio.src = ...; audio.load()</code> 之后 <code>currentTime</code> 并不保证立刻归零，实测新曲从 0:07 开始，歌词也跟着先跳再弹回。修法：显式 <code>audio.currentTime = 0</code>，并且在新媒体元数据就绪前不采信 <code>currentTime</code>。</p>
<p><strong>5. 短视口下播放键被裁出卡片。</strong> 歌词窗口占了固定高度后，卡片内容 366px &gt; 可用 246px，播放键整个滚不到。修法：删掉”窄屏换行”分支，改成始终三列 + <code>height: clamp(4.6rem, 22vh, 8.5rem)</code>——矮屏退回封面自身高度，控件永不被裁。</p>
<p><strong>6. 拖拽边界和自动居中打架。</strong> 边界最初写成”内容不能露出空白”（<code>clamp(box - content, 0)</code>），但自动居中时首行上方本来就留了半窗空白，两套规则互相否定：往下拖 60px 被错误夹到 0，而首行的居中位其实是 +24.5。修法：以首行、末行各自的居中位作为上、下限，手动与自动落在同一条连续刻度上。</p>
<h2 id="六搬到你自己的项目">六、搬到你自己的项目<a href="#六搬到你自己的项目" class="heading-anchor-link" aria-label="Link to 六、搬到你自己的项目"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>涉及的文件：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/components/music/MusicLauncher.astro   常驻入口，无 DOM</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/components/music/music-player.ts       懒加载播放器（JS/CSS/数据/音频全在这里延后）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/components/music/music-player.css      面板样式（以 ?url 方式引入）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/pages/music/songs.json.ts              构建期产出 dist/music/songs.json</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/config/music.ts                        手写曲表（id/title/artist/url/lyrics）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/data/music.ts                          合并自动元数据，产出播放器用的字段</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/data/music-metadata.json               匹配结果 + 缓存（脚本写，前端读）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">scripts/music-meta.ts                      封面匹配脚本</span></span>
</code></pre></div>
<p>三步接入：</p>
<ol>
<li>把音频和 <code>.lrc</code> 传到对象存储，在 <code>src/config/music.ts</code> 的 <code>tracks</code> 里各写一条</li>
<li><code>pnpm music-meta</code> 匹配封面（之后 <code>pnpm build</code>，元数据在构建期就固化了）</li>
<li>在导航里放一个 <code>id="music-toggle"</code> 的按钮，在 Layout 末尾挂 <code>&lt;MusicLauncher /&gt;</code></li>
</ol>
<p>日常命令：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> music-meta                    </span><span style="color:#6a737d;--shiki-dark:#6A737D">#</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 只处理未匹配成功的，已 matched 跳过</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> music-meta</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">force            </span><span style="color:#6a737d;--shiki-dark:#6A737D">#</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 全部重查</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> music-meta</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">song</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 晴天 周杰伦  </span><span style="color:#6a737d;--shiki-dark:#6A737D">#</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 单曲试查，只打印不写盘</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> music-meta</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">list-review      </span><span style="color:#6a737d;--shiki-dark:#6A737D">#</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 看哪些在等人工确认</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> music-meta</span><span style="color:#e36209;--shiki-dark:#FFAB70"> --</span><span style="color:#e36209;--shiki-dark:#FFAB70">accept</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#d73a49;--shiki-dark:#F97583">&lt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">id</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">      # 把 review 的首选提升为 matched</span></span>
</code></pre></div>
<p>限速是硬要求：iTunes 每请求间隔 500ms，MusicBrainz 1200ms（它要求 ≤1 req/s 且必须带可识别的 <code>User-Agent</code>），超时 15 秒，5xx/429 退避重试两次。批量绝不并发。</p>
<p>最后一点心得：这套东西真正花时间的地方不在功能，而在**“看起来对了”和”在真机上对了”之间的缝隙**——<code>display: none</code> 下量不到尺寸、捕获改派了 click、聚焦悄悄滚了容器，这三条自测全都没抓到。所以凡是涉及视觉与手势的改动，最后一定要用真实指针走一遍。</p>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/edgeone-twikoo/</id>
    <title>用 EdgeOne 部署 Twikoo 评论系统</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/edgeone-twikoo/"/>
    <published>2026-09-19T00:00:00+00:00</published>
    <updated>2026-09-19T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>本主题内置 Twikoo 评论支持。本文记录如何用腾讯云 EdgeOne Makers 免费部署 Twikoo 后端（twikoo-eo），并将评论系统接入博客。相比 Vercel + MongoDB 的方案，这个方式不需要数据库、免费额度...</summary>
    <content type="html"><![CDATA[<p>本主题内置 <a href="https://twikoo.js.org/" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://twikoo.js.org/">Twikoo</a> 评论支持。本文记录如何用腾讯云 EdgeOne Makers 免费部署 Twikoo 后端（<a href="https://github.com/Mintimate/twikoo-eo" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/Mintimate/twikoo-eo">twikoo-eo</a>），并将评论系统接入博客。相比 Vercel + MongoDB 的方案，这个方式<strong>不需要数据库、免费额度充足、自带全球 CDN</strong>，管理也更简单。</p>
<p>文中示例域名 <code>comments.example.com</code>、<code>your-site.com</code> 请替换为你自己的域名。</p>
<h2 id="部署-twikoo-后端">部署 Twikoo 后端<a href="#部署-twikoo-后端" class="heading-anchor-link" aria-label="Link to 部署 Twikoo 后端"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<ol>
<li>注册腾讯云账号并开通 EdgeOne 服务</li>
<li>前往 GitHub fork <a href="https://github.com/Mintimate/twikoo-eo" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/Mintimate/twikoo-eo">Mintimate/twikoo-eo</a> 到你的账号下</li>
<li>EdgeOne 控制台 → <strong>服务总览 → Makers → 创建项目 → 导入 Git 仓库</strong>，选择你的 fork，等待自动构建部署</li>
<li>部署完成后，项目会分配一个默认访问域名（形如 <code>xxx.edgeone.app</code>）。浏览器访问它，看到如下 JSON 即为部署成功：</li>
</ol>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="json" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-json"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">code</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">message</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">Twikoo 云函数运行正常...</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">,</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">version</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">1.7.19</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<p>存储使用 Makers 自带的 Blob，首次请求自动初始化，<strong>无需任何数据库配置</strong>。到这一步，其实已经可以直接把默认域名填入 <code>envId</code> 使用。</p>
<h2 id="绑定自定义域名可选">绑定自定义域名（可选）<a href="#绑定自定义域名可选" class="heading-anchor-link" aria-label="Link to 绑定自定义域名（可选）"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>默认分配域名可用但不好记。若想绑定自己的子域名（如 <code>comments.example.com</code>），按以下步骤：</p>
<h3 id="1-添加域名">1. 添加域名<a href="#1-添加域名" class="heading-anchor-link" aria-label="Link to 1. 添加域名"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>在 Makers 项目的「域名」中添加自定义域名。<strong>加速区域选择注意</strong>：</p>
<ul>
<li>域名已 ICP 备案 → 可选「全球（含中国内地）」，大陆节点速度最佳</li>
<li>未备案域名 → 只能选「不包含中国内地」，大陆访客仍可正常访问（走海外节点），只是延迟为海外级</li>
</ul>
<h3 id="2-验证域名所有权">2. 验证域名所有权<a href="#2-验证域名所有权" class="heading-anchor-link" aria-label="Link to 2. 验证域名所有权"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>EdgeOne 会要求添加一条 <strong>TXT 记录</strong>（形如 <code>edgeonereclaim.comments</code>，值以 <code>reclaim-</code> 开头）。到你的 DNS 托管商（如 Cloudflare）添加：</p>
<table><thead><tr><th>字段</th><th>填法</th></tr></thead><tbody>
<tr><td>类型</td><td>TXT</td></tr>
<tr><td>名称</td><td>EdgeOne 给出的主机记录（只填子域前缀部分）</td></tr>
<tr><td>内容</td><td>那串 token，原样粘贴</td></tr>
</tbody></table>
<blockquote>
<p>若提示该子域曾被其他账号认领（<code>reclaim</code> 验证不通过），换一个子域名前缀重新添加即可。</p>
</blockquote>
<h3 id="3-添加-cname-记录">3. 添加 CNAME 记录<a href="#3-添加-cname-记录" class="heading-anchor-link" aria-label="Link to 3. 添加 CNAME 记录"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>TXT 验证通过后，EdgeOne 会给出真正的 <strong>CNAME 记录值</strong>（形如 <code>xxx.edgeone.traffic</code>）。回到 DNS 托管商添加 CNAME：</p>
<ul>
<li>名称：<code>comments</code>（前缀，托管商会自动补全）</li>
<li>目标：EdgeOne 给的记录值</li>
<li><strong>代理状态必须选「仅 DNS」（灰云）</strong>，否则流量会被双重代理，验证不通过</li>
</ul>
<h3 id="4-申请-https-证书">4. 申请 HTTPS 证书<a href="#4-申请-https-证书" class="heading-anchor-link" aria-label="Link to 4. 申请 HTTPS 证书"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>在域名的「HTTPS / SSL 证书」设置中开启免费证书（自动验证签发，等待几分钟）。<strong>这一步是必须的</strong>：博客本身是 HTTPS 站点，浏览器会拦截对 HTTP 接口的请求（混合内容），<code>envId</code> 只能填 <code>https://</code> 地址。</p>
<h2 id="主题配置">主题配置<a href="#主题配置" class="heading-anchor-link" aria-label="Link to 主题配置"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>修改 <a href="https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts">src/config.ts</a> 的 <code>comment</code> 部分，共两处：</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">comment: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 开启评论系统</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  enabled: true</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // twikoo 评论系统</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  twikoo: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    envId: 'https://comments.example.com' // 不带末尾斜杠</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // waline 评论系统</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  waline: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 服务器地址</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    serverURL: '' // ⚠️ 必须清空！</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<blockquote>
<p>⚠️ 主题的渲染逻辑是”配置了谁就渲染谁，可叠加”。如果从 Waline 切换过来，<strong>必须清空 <code>waline.serverURL</code></strong>，否则页面会出现两个评论区。</p>
</blockquote>
<p>重新构建并部署博客即可。主题对 Twikoo 的支持开箱即用：滚动到评论区才懒加载、中英文文章自动使用各自语言、<code>comment.css</code> 中已适配主题字体与深色模式。</p>
<h2 id="管理评论">管理评论<a href="#管理评论" class="heading-anchor-link" aria-label="Link to 管理评论"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>这个部署方式<strong>没有独立的 <code>/admin</code> 管理页面</strong>，管理入口集成在评论区：</p>
<ol>
<li>打开任意有评论的文章，滚动到底部评论区</li>
<li>点击评论区右下角的<strong>齿轮图标</strong></li>
<li>首次进入要求<strong>设置管理员密码</strong>——这就是唯一的管理凭证</li>
</ol>
<p>之后删除评论、标记垃圾、导出导入数据、配置邮件通知（SMTP）都在这个面板中完成。注意两点：</p>
<ul>
<li>管理员是”密码制”而非账号制：知道密码的人都是管理员，请保管好密码，可随时在面板设置中更换</li>
<li>普通访客的身份（accessToken）只能管理自己的评论，无法进入后台</li>
</ul>
<h2 id="常见问题">常见问题<a href="#常见问题" class="heading-anchor-link" aria-label="Link to 常见问题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p><strong>评论提交报错 CORS 相关？</strong>
Makers 项目环境变量 <code>CORS_ALLOW_ORIGIN</code> 控制允许的来源域名（逗号分隔，如 <code>your-site.com,www.your-site.com</code>）。<strong>不设置 = 允许所有来源</strong>，个人博客保持默认即可；后续收紧时修改后需重新部署生效。</p>
<p><strong>表情栏偶尔加载不出来？</strong>
OωO 表情资源默认从 Twikoo 作者站点拉取，如遇不稳定可参考 <a href="https://twikoo.js.org/frontend.html" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://twikoo.js.org/frontend.html">Twikoo 表情配置</a> 自托管。</p>
<p><strong>改完配置评论没变化？</strong>
确认 <code>src/config.ts</code> 修改后重新执行了构建部署；Makers 侧改环境变量则需在「部署」页点「重新部署」（或在关联仓库 push 一次提交自动触发）。</p>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/son-dont-come-back/</id>
    <title>《儿子，别回来》</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/son-dont-come-back/"/>
    <published>2026-09-06T00:00:00+00:00</published>
    <updated>2026-09-06T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>一位父亲写给儿子的一封信</summary>
    <content type="html"><![CDATA[<h1 id="儿子别回来">儿子，别回来<a href="#儿子别回来" class="heading-anchor-link" aria-label="Link to 儿子，别回来"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h1>
<img src="/_astro/76-father-1280.616a044b.webp" srcset="/_astro/76-father-640.ff08e8ac.webp 640w, /_astro/76-father-960.3081808b.webp 960w, /_astro/76-father-1280.616a044b.webp 1280w, /_astro/76-father-1600.ef11a220.webp 1600w" sizes="(min-width: 1024px) 613px, 85.5vw" width="613" height="394" loading="lazy" decoding="async" alt="远行" title="">
<p>儿子，你去年去德国的时候，我没送你。你今年回德国，我也不送你。去年我给你写信，写的是：<strong>飞得再远，你的根还连着我们。</strong> 但根这个东西，不是我们替你长好的，根是你自己往下扎的。你在马格德堡那间没有空调的寝室里，一个人过了整个冬天。没有你妈喊你吃饭，没有小区门口那棵樟树，你照样活过来了。在波兰过春节，在意大利看庞贝古城，在巴黎看埃菲尔铁塔，那就是你的根，再往土里钻。我不该把你当成一棵必须长在院子里的树苗。所以今年我想说：  <strong>别回来了。</strong> 这几个字，我写下来的时候手抖了一下。你知道，一个当父亲的要把这几个字说出口不容易。不是不爱，是爱到了深处，才敢这么说。真正的爱有时候不是挽留，是推你出去，再关上门，然后自己站在门后，听你的脚步声越来越远。</p>
<p><br><br></p>
<p>世界正在急剧变化，高墙不仅是在地缘的边界，更应在我们每个人的心里。我们站在历史的十字路口，看着远方的硝烟和近处的围墙。旧的叙事正在崩塌，新的神话尚未诞生。我们唯一能捂住的，或许就是那份源自内心的清醒。那就是不被宏大的口号所裹挟，警惕所有以保护为名的剥夺。而你正处在世界的褶皱里，能听到旧结构嘎吱作响的声音。那是历史在换轨。你这一代人的命运，注定是在两条或者多条轨道之间自己铺路。</p>
<p><br><br></p>
<p>你说还是国内方便、舒服。但是现代化不单单是硬件，你要看到每年1000多万年轻人从大学里出来，像潮水一样涌向有限的城市、有限的岗位、有限的机会。不是他们不够好，是这片土地还不知道如何装下这么多飞鸟。你回头看看你那些留在国内的同学，有几个真正地在做自己喜欢的事？有几个不是在卷，在熬，在等？你不一样，你有一张可以飞出去的票。如果你把这张票糟蹋了，回头硬挤进一个不适合你的罐头里，那才叫对不起你自己，也对不起家人。</p>
<p><br><br></p>
<p>你在德国，先要把自己变成一个在世界任何地方都能站住脚的人。一个真正的现代人，有中国人的筋骨，有不同肤色的人能和你共事。有东北人的倔，你懂得在规则里迂回。有上海人的务实，但不被精致的利己主义捆住手脚。你从我们这里拿到的不是一份需要偿还的债，而是一份需要你用在自己身上的翅膀。</p>
<p><strong>翅膀硬了，才属于你。</strong></p>
<p>你不用，就是一堆羽毛，风一吹就散了。</p>
<p><br><br></p>
<p>我不跟你说“落叶归根”了。这四个字，是中国农业时代留给我们的惯性。你这一代人早就不是土壤里长出来的树，而是被风带走的种子。 <strong>落地生根比落叶归根重要得多。</strong> 哪里的土养人，就在哪里长成树。你要做的是世界公民，不是哪条村的游子。</p>
<p><br><br></p>
<p>你外婆问你明年回不回来，你说看情况。这个回答有分寸，有决断，有年轻人该有的清醒。我希望你明年不回来，后年也不回来。你能请我们过去，让我们看看你的新天地，那当然好。如果我们去不了，你也不用歉疚。你能在视频里让我看看你的书架，看看你窗外的那条路，看看你走路带风的样子，就足够了。</p>
<p><br><br></p>
<p>你爸这一辈子，十岁从怀德走到长春，四十五岁从长春走到上海。我是在中国的地图上用脚底板丈量自己。你今天用的是世界地图。马格德堡只是第一站。柏林的图书馆在等你，慕尼黑的实验室在等你，苏黎世的银行在等你，旧金山的车库在等你。不是说你一定要去，而是说当这些门还开着的时候，要赶快一点。以后门会一扇扇关上。你正站在门还留着一道缝的时刻，趁现在侧身进去。进去之后，就别老回头张望门口有没有人送你。</p>
<p><br><br></p>
<p>儿子，你飞的是地球，将来你的孩子也许能到月球或者火星上去。一代人有一代人的远方。你不能因为眷恋家里的沙发，就把自己绑在客厅里。我也不会因为你不在病床前，就觉得你不孝。你只要在外面活得好，活得正，活得有劲儿，你就是最好的儿子。</p>
<p><br><br></p>
<p>你走吧，把根扎在遥远的地方去。哪一天你在外面撑起了自己的天，那一天就是对我们最好的告慰。我们不会站在路口等你，但你心里知道，家永远为你在这个世界上留着一盏灯。只是那盏灯不是用来照你回来的路，而是用来告诉你：</p>
<p><strong>你从哪里来，你永远有来处。</strong></p>
<h1 id="飞吧儿子">飞吧，儿子<a href="#飞吧儿子" class="heading-anchor-link" aria-label="Link to 飞吧，儿子"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h1>
<p><strong>把世界踩在脚下。</strong></p>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/computer-configuration/</id>
    <title>DIY电脑配置</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/computer-configuration/"/>
    <published>2026-08-23T00:00:00+00:00</published>
    <updated>2026-08-23T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>分享一套 DIY 电脑配置，以及选择硬件时的预算和搭配思路。</summary>
    <content type="html"><![CDATA[<p>今天来讲一下我的DIY电脑配置，买的时候行情还行，还没大涨价，自己动手DIY电脑其实不难，这给我省了不少钱，不过就是需要点时间去了解一下，先讲个电脑DIY大致的流程吧。</p>
<h5 id="最大预算">最大预算</h5>
<p>这个没什么好说的，取决自己有多少钱能买得上哪个层级的电脑，先看口袋有多少钱，再去看对应价位的产品，建议少搜那些高端的看，因为看得太好的话，容易对下层价位产品产生看不上的想法，一对比后虚荣心就会作祟了，就得不断的提前消费买买买了，当然是有钱的话另当别论了，直接全部最顶级就是了。</p>
<h5 id="自身需求">自身需求</h5>
<p>配电脑当然第一步是清楚自己用电脑来是干什么，比如，打游戏、办公。这两个是前者囊括了后者，因为能打游戏的电脑对于办公这种场景来说是小意思，所以想什么都玩一玩的，还是尽量往高一点的配置来靠，但是这又得花上不少钱，对于预算卡得很紧的就没有办法了，只能在预算中选最优解，所以是以上面第一步为基准的。</p>
<h5 id="产品对比">产品对比</h5>
<p>考虑好前两步后，就是要自己去了解电脑硬件产品，然后多方面进行对比了，组成电脑主机所需要的硬件有以下八样， <code>CPU</code> ，<code>主板</code>， <code>内存</code> ，<code>显卡</code>，<code>硬盘</code>，<code>散热器</code>，<code>电源</code>，<code>机箱</code>。最后一个机箱随便自己喜欢，不要也不会影响性能，反正就一个壳子。显卡最重要，负责画面输出，所以要占预算的大头，再就是CPU，到内存，再到硬盘，电源，散热器。可以直接在网上搜，对应的预算的电脑大概的配置，再根据自己的需要或喜好，哪一部分应该减点预算加到另一个上面，使得性能最大化。</p>
<style type="text/css"></style>
<table><thead><tr><th>配置</th><th>推荐品牌（一线 + 二三线）</th><th>简要说明</th></tr></thead><tbody>
<tr><td><strong>CPU（处理器）</strong></td><td>AMD、Intel</td><td>AMD游戏性价比高；Intel多核与兼容性好。</td></tr>
<tr><td><strong>主板</strong></td><td>华硕（ASUS）、微星（MSI）、技嘉（GIGABYTE）、华擎（ASRock） <strong>二三线</strong>：七彩虹（Colorful）、铭瑄（MAXSUN）、映泰（Biostar）</td><td>一线BIOS完善、稳定性强。七彩虹、铭瑄性价比高、扩展够用，适合中低端；映泰做工不错，价格友好。</td></tr>
<tr><td><strong>内存（RAM）</strong></td><td>金士顿（Kingston）、海盗船（Corsair）、芝奇（G.Skill）、三星（Samsung） <strong>二三线</strong>：十铨（TeamGroup）、威刚（ADATA/XPG）、英睿达（Crucial）</td><td>一线超频与稳定性顶尖。十铨、威刚颗粒好、性价比突出；英睿达原厂颗粒可靠，适合追求稳定不追求极致超频。</td></tr>
<tr><td><strong>固态硬盘（SSD）</strong></td><td>三星（Samsung）、西部数据/闪迪（WD/SanDisk）、金士顿（Kingston）、致态（ZhiTai） <strong>二三线</strong>：雷克沙（Lexar）、铠侠（Kioxia）、七彩虹、英睿达（Crucial）</td><td>三星/致态耐用性与速度优秀。雷克沙、铠侠原厂盘性价比高；七彩虹、英睿达日常使用稳定可靠。优先PCIe 4.0/5.0 NVMe。</td></tr>
<tr><td><strong>显卡（GPU）</strong></td><td>华硕（ASUS）、微星（MSI）、技嘉（GIGABYTE）、七彩虹（Colorful）、影驰（Galaxy） <strong>二三线</strong>：索泰（Zotac）、铭瑄（MAXSUN）、瀚铠（AMD卡）</td><td>一线散热与做工优秀。七彩虹/影驰国内渠道好、售后方便；索泰、铭瑄价格更友好，性能释放正常。芯片以NVIDIA RTX 50系列为主，AMD可选瀚铠等。</td></tr>
<tr><td><strong>电源（PSU）</strong></td><td>海韵（Seasonic）、海盗船（Corsair）、全汉（FSP）、安钛克（Antec）、振华（Super Flower） <strong>二三线</strong>：航嘉（Huntkey）、鑫谷（Segotep）、酷冷至尊（Cooler Master）、长城</td><td>海韵/振华品质顶尖。航嘉、鑫谷性价比高、渠道广；酷冷至尊中端稳定。建议80 Plus金牌及以上，功率留足余量。</td></tr>
<tr><td><strong>机箱</strong></td><td>联力（Lian Li）、恩杰（NZXT）、追风者（Phanteks）、酷冷至尊（Cooler Master）、乔思伯（Jonsbo） <strong>二三线</strong>：先马（Sama）、鑫谷、航嘉</td><td>一线风道与颜值优秀。先马、鑫谷、航嘉价格实惠、空间够用，适合普通装机。关注显卡长度与散热支持。</td></tr>
<tr><td><strong>散热器（CPU冷却）</strong></td><td>猫头鹰（Noctua）、利民（Thermalright）、九州风神（Deepcool）、酷冷至尊（Cooler Master） <strong>二三线</strong>：ID-Cooling、超频三、乔思伯</td><td>猫头鹰静音顶级；利民性价比之王。ID-Cooling、超频三散热表现好、价格低；适合中低端风冷或入门水冷。</td></tr>
</tbody></table>
<p>可以根据上面表格的品牌进行选择购买，一线的品控会比二三线的要好些，出问题的情况会比较少，二三线就是性价比了，可以通过合理的搭配用最少的钱达到最大的性能，这要看个人的选择了。</p>
<h4 id="下面是我diy满意的配置">下面是我DIY满意的配置：<a href="#下面是我diy满意的配置" class="heading-anchor-link" aria-label="Link to 下面是我DIY满意的配置："><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<h5 id="cpu主板intel-i7-14650hx-天邦modt">CPU+主板：Intel i7 14650HX 天邦Modt</h5>
<p><img src="/_astro/68_Z1y9Ygg.webp" srcset="/_astro/68_Z1y9Ygg-800.webp 800w, /_astro/68_Z1y9Ygg-1200.webp 1200w, /_astro/68_Z1y9Ygg.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="574" style="--lqip:#ccdbdbf7" loading="lazy" decoding="async" alt=""></p>
<h5 id="内存玖合3200mhz--8g2--c16">内存：玖合3200Mhz  8G*2  C16</h5>
<p><img src="/_astro/69_Z2dixm7.webp" srcset="/_astro/69_Z2dixm7-800.webp 800w, /_astro/69_Z2dixm7-1200.webp 1200w, /_astro/69_Z2dixm7.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="712" style="--lqip:#dcddff6e" loading="lazy" decoding="async" alt=""></p>
<h5 id="硬盘雷克沙ares-790战神-1tb">硬盘：雷克沙ARES 790战神 1TB</h5>
<p><img src="/_astro/70_ZLDwIW.webp" srcset="/_astro/70_ZLDwIW-800.webp 800w, /_astro/70_ZLDwIW-1200.webp 1200w, /_astro/70_ZLDwIW.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="748" style="--lqip:#eedfff76" loading="lazy" decoding="async" alt=""></p>
<h5 id="显卡耕升3080-10g--lhr">显卡：耕升3080 10G  LHR</h5>
<p><img src="/_astro/73_wxDfg.webp" srcset="/_astro/73_wxDfg-800.webp 800w, /_astro/73_wxDfg-1200.webp 1200w, /_astro/73_wxDfg.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="856" style="--lqip:#bbbbdbf7" loading="lazy" decoding="async" alt=""></p>
<h5 id="电源研风tx850w">电源：研风TX850w</h5>
<p><img src="/_astro/71_1cav73.webp" srcset="/_astro/71_1cav73-800.webp 800w, /_astro/71_1cav73-1200.webp 1200w, /_astro/71_1cav73.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="750" style="--lqip:#ccdddf76" loading="lazy" decoding="async" alt=""></p>
<h5 id="散热器酷里奥b60t-v2-双塔散热">散热器：酷里奥B60T V2 双塔散热</h5>
<p><img src="/_astro/72_bVdWG.webp" srcset="/_astro/72_bVdWG-800.webp 800w, /_astro/72_bVdWG-1200.webp 1200w, /_astro/72_bVdWG.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="756" style="--lqip:#ccdddf76" loading="lazy" decoding="async" alt=""></p>
<p>CPU+主板：Intel i7 14650HX 天邦Modt</p>
<p>内存：玖合3200Mhz 8G*2 C16</p>
<p>硬盘：雷克沙ARES 790战神 1TB</p>
<p>显卡：耕升3080 10G LHR</p>
<p>电源：研风TX850w</p>
<p>散热器：酷里奥B60T V2 双塔散热</p>
<p>以上就是目前在使用的主机了，总花费：1510+193+333+1655+281+120=4092元。显卡买的时候pdd返了95，所以是1655，买硬件的时候多刷优惠卷更便宜，我只有显卡买了二手的，如果不在乎新旧，去咸鱼淘还能更便宜，买二手最好是带质保的，因为说不定用着什么时候就挂了。我对这套配置很满意，基本什么游戏都能畅玩，使用一年左右了，没有出现什么大问题，此外还入手了一个4k显示器，虽然便宜但观感也不错。</p>
<p><img src="/_astro/74_Zujnmf.webp" srcset="/_astro/74_Zujnmf-800.webp 800w, /_astro/74_Zujnmf-1200.webp 1200w, /_astro/74_Zujnmf.webp 1264w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1264" height="734" style="--lqip:#dcdbdb65" loading="lazy" decoding="async" alt=""></p>
<p>显示器返了28块实付685元，面板用的还是LG的，外壳质感不怎么样，显示还是很OK的。此外比较的满意的外设还有键盘，用的套件，自己买了轴体和键帽组装起来的，乐趣十足。</p>
<figure><img src="/_astro/75_Z1i4lLD.webp" srcset="/_astro/75_Z1i4lLD-800.webp 800w, /_astro/75_Z1i4lLD-1200.webp 1200w, /_astro/75_Z1i4lLD.webp 1435w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1435" height="1274" style="--lqip:#28a938c5" loading="lazy" decoding="async" alt="电脑主机配置"><figcaption>电脑主机配置</figcaption></figure>
<p>对于自己DIY出来的电脑不仅是一种乐趣成就，又像是自己亲自赋予了它一种特殊的情感</p>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/markdown-extended-features/</id>
    <title>Markdown 扩展功能</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/markdown-extended-features/"/>
    <published>2025-04-25T00:00:00+00:00</published>
    <updated>2025-04-25T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>本文介绍 Retypeset 主题支持的 Markdown 扩展功能，包括语法示例与效果展示。使用标准的 Markdown 图像语法 ![alt](src)，即可自动生成图注。在 alt 前添加下划线 _ 或留空 alt，即可隐藏图注。使用...</summary>
    <content type="html"><![CDATA[<p>本文介绍 Retypeset 主题支持的 Markdown 扩展功能，包括语法示例与效果展示。</p>
<h2 id="图注">图注<a href="#图注" class="heading-anchor-link" aria-label="Link to 图注"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用标准的 Markdown 图像语法 <code>![alt](src)</code>，即可自动生成图注。在 <code>alt</code> 前添加下划线 <code>_</code> 或留空 <code>alt</code>，即可隐藏图注。</p>
<h3 id="语法">语法<a href="#语法" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![图片描述](https://music.artist.cc.cd/images/13.webp)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![_图片描述](https://music.artist.cc.cd/images/13.webp)</span></span>
</code></pre></div>
<h3 id="效果">效果<a href="#效果" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<figure><img src="/_astro/13_Z1EwgiU.webp" srcset="/_astro/13_Z1EwgiU-800.webp 800w, /_astro/13_Z1EwgiU-1200.webp 1200w, /_astro/13_Z1EwgiU-1440.webp 1440w, /_astro/13_Z1EwgiU.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1081" style="--lqip:#6430a631" loading="lazy" decoding="async" alt="图片描述"><figcaption>图片描述</figcaption></figure>
<p><img src="/_astro/13_Z1EwgiU.webp" srcset="/_astro/13_Z1EwgiU-800.webp 800w, /_astro/13_Z1EwgiU-1200.webp 1200w, /_astro/13_Z1EwgiU-1440.webp 1440w, /_astro/13_Z1EwgiU.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1081" style="--lqip:#6430a631" loading="lazy" decoding="async" alt="_图片描述"></p>
<h2 id="提示块">提示块<a href="#提示块" class="heading-anchor-link" aria-label="Link to 提示块"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用 GitHub 语法 <code>&gt; [!TYPE]</code> 或三冒号语法 <code>:::type</code>，即可创建提示块。支持 <code>note</code>、<code>tip</code>、<code>important</code>、<code>warning</code>、<code>caution</code> 五种类型。</p>
<h3 id="语法-1">语法<a href="#语法-1" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt; [!NOTE]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt; 即使快速浏览，也值得用户留意的信息。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt; [!TIP]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt; 可选信息，可帮助用户更轻松地完成操作。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt; [!IMPORTANT]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt; 用户成功所需的关键信息。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::warning</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">由于存在潜在风险，需要用户立即关注的关键内容。</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::caution</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">某些操作可能带来的负面后果。</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::note[自定义标题]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">这是一个自定义标题的提示块。</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::</span></span>
</code></pre></div>
<h3 id="效果-1">效果<a href="#效果-1" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<blockquote class="admonition-note"><span class="admonition-title">NOTE</span>
<p>即使快速浏览，也值得用户留意的信息。</p>
</blockquote>
<blockquote class="admonition-tip"><span class="admonition-title">TIP</span>
<p>可选信息，可帮助用户更轻松地完成操作。</p>
</blockquote>
<blockquote class="admonition-important"><span class="admonition-title">IMPORTANT</span>
<p>用户成功所需的关键信息。</p>
</blockquote>
<blockquote class="admonition-warning"><span class="admonition-title">WARNING</span>
<p>由于存在潜在风险，需要用户立即关注的关键内容。</p>
</blockquote>
<blockquote class="admonition-caution"><span class="admonition-title">CAUTION</span>
<p>某些操作可能带来的负面后果。</p>
</blockquote>
<blockquote class="admonition-note"><span class="admonition-title">自定义标题</span>
<p>这是一个自定义标题的提示块。</p>
</blockquote>
<h2 id="折叠块">折叠块<a href="#折叠块" class="heading-anchor-link" aria-label="Link to 折叠块"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用三冒号语法 <code>:::fold[title]</code>，即可创建折叠块。点击标题可以展开或收起。</p>
<h3 id="语法-2">语法<a href="#语法-2" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::fold[使用提示]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">如果需要添加并非所有读者都会感兴趣的内容，可以将其放在折叠块中。</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::</span></span>
</code></pre></div>
<h3 id="效果-2">效果<a href="#效果-2" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<details><summary>使用提示</summary>
<p>如果需要添加并非所有读者都会感兴趣的内容，可以将其放在折叠块中。</p>
</details>
<h2 id="mermaid-图表">Mermaid 图表<a href="#mermaid-图表" class="heading-anchor-link" aria-label="Link to Mermaid 图表"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用代码块包裹 Mermaid 语法，并标注语言类型 <code>mermaid</code>，即可创建 Mermaid 图表。</p>
<h3 id="语法-3">语法<a href="#语法-3" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">```mermaid</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">graph TD;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    A--&gt;B;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    A--&gt;C;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    B--&gt;D;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    C--&gt;D;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">```</span></span>
</code></pre></div>
<h3 id="效果-3">效果<a href="#效果-3" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<pre class="mermaid" data-code="graph TD;
    A--&gt;B;
    A--&gt;C;
    B--&gt;D;
    C--&gt;D;
" data-mermaid-code="graph TD;
    A--&gt;B;
    A--&gt;C;
    B--&gt;D;
    C--&gt;D;
">graph TD;
    A--&gt;B;
    A--&gt;C;
    B--&gt;D;
    C--&gt;D;
</pre>
<h2 id="画廊">画廊<a href="#画廊" class="heading-anchor-link" aria-label="Link to 画廊"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用三冒号语法 <code>:::gallery</code>，即可创建图片画廊。水平滚动以查看更多图片。</p>
<h3 id="语法-4">语法<a href="#语法-4" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::gallery</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![春日植物园 1](https://music.artist.cc.cd/images/14.webp)</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![春日植物园 2](https://music.artist.cc.cd/images/15.webp)</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![海边日落 1](https://music.artist.cc.cd/images/16.webp)</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![海边日落 2](https://music.artist.cc.cd/images/17.webp)</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![海边日落 3](https://music.artist.cc.cd/images/18.webp)</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">:::</span></span>
</code></pre></div>
<h3 id="效果-4">效果<a href="#效果-4" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="gallery-container">
<figure class="gallery-item"><img src="/_astro/14_Zg5fp.webp" srcset="/_astro/14_Zg5fp-800.webp 800w, /_astro/14_Zg5fp-1200.webp 1200w, /_astro/14_Zg5fp-1440.webp 1440w, /_astro/14_Zg5fp.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1280" style="--lqip:#12224400" loading="lazy" decoding="async" alt="春日植物园 1"><figcaption>春日植物园 1</figcaption></figure>
<figure class="gallery-item"><img src="/_astro/15_Z20zrCy.webp" srcset="/_astro/15_Z20zrCy-800.webp 800w, /_astro/15_Z20zrCy-1200.webp 1200w, /_astro/15_Z20zrCy-1440.webp 1440w, /_astro/15_Z20zrCy.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1282" style="--lqip:#cdd99a4c" loading="lazy" decoding="async" alt="春日植物园 2"><figcaption>春日植物园 2</figcaption></figure>
<figure class="gallery-item"><img src="/_astro/16_4dezr.webp" srcset="/_astro/16_4dezr-800.webp 800w, /_astro/16_4dezr-1200.webp 1200w, /_astro/16_4dezr-1440.webp 1440w, /_astro/16_4dezr.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1280" style="--lqip:#332eec92" loading="lazy" decoding="async" alt="海边日落 1"><figcaption>海边日落 1</figcaption></figure>
<figure class="gallery-item"><img src="/_astro/17_RvW01.webp" srcset="/_astro/17_RvW01-800.webp 800w, /_astro/17_RvW01-1200.webp 1200w, /_astro/17_RvW01-1440.webp 1440w, /_astro/17_RvW01.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1344" style="--lqip:#ccb332e5" loading="lazy" decoding="async" alt="海边日落 2"><figcaption>海边日落 2</figcaption></figure>
<figure class="gallery-item"><img src="/_astro/18_8Gypi.webp" srcset="/_astro/18_8Gypi-800.webp 800w, /_astro/18_8Gypi-1200.webp 1200w, /_astro/18_8Gypi-1440.webp 1440w, /_astro/18_8Gypi.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1280" style="--lqip:#452eed29" loading="lazy" decoding="async" alt="海边日落 3"><figcaption>海边日落 3</figcaption></figure>
</div>
<h2 id="github-仓库">GitHub 仓库<a href="#github-仓库" class="heading-anchor-link" aria-label="Link to GitHub 仓库"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用双冒号语法 <code>::github{repo="owner/repo"}</code>，即可嵌入 GitHub 仓库。</p>
<h3 id="语法-5">语法<a href="#语法-5" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::github{repo="radishzzz/astro-theme-retypeset"}</span></span>
</code></pre></div>
<h3 id="效果-5">效果<a href="#效果-5" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<a href="https://github.com/radishzzz/astro-theme-retypeset" class="no-heti gc-container" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/radishzzz/astro-theme-retypeset" data-repo="radishzzz/astro-theme-retypeset">
<div class="gc-title-bar"><div class="gc-owner-avatar" style="background-size: cover; background-position: center;" aria-hidden="true"></div><span class="gc-repo-title"><span>radishzzz<span class="gc-slash" aria-hidden="true">/</span><strong>astro-theme-retypeset</strong></span></span>
<svg class="gc-github-icon" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"></path></svg></div>
<p class="gc-repo-description">Loading repository data...</p><div class="gc-info-bar">
<svg class="gc-info-icon" height="16" width="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span class="gc-stars-count" aria-label="Stars count">--</span>
<svg class="gc-info-icon" height="16" width="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg><span class="gc-forks-count" aria-label="Forks count">--</span>
<svg class="gc-info-icon" height="16" width="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg><span class="gc-license-info" aria-label="License">--</span></div></a>
<h2 id="视频">视频<a href="#视频" class="heading-anchor-link" aria-label="Link to 视频"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用双冒号语法 <code>::youtube{id="video-id"}</code>，即可嵌入视频。</p>
<h3 id="语法-6">语法<a href="#语法-6" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::youtube{id="9pP0pIgP2kE"}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::bilibili{id="BV1sK4y1Z7KG"}</span></span>
</code></pre></div>
<h3 id="效果-6">效果<a href="#效果-6" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<figure><lite-youtube videoid="9pP0pIgP2kE"></lite-youtube></figure>
<figure><iframe class="bilibili-player" src="//player.bilibili.com/player.html?isOutside=true&amp;bvid=BV1sK4y1Z7KG&amp;p=1&amp;autoplay=0&amp;muted=0" title="Bilibili video player" allowfullscreen loading="lazy"></iframe></figure>
<h2 id="spotify">Spotify<a href="#spotify" class="heading-anchor-link" aria-label="Link to Spotify"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用双冒号语法 <code>::spotify{url="spotify-url"}</code>，即可嵌入 Spotify 内容。</p>
<h3 id="语法-7">语法<a href="#语法-7" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::spotify{url="https://open.spotify.com/track/0HYAsQwJIO6FLqpyTeD3l6"}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::spotify{url="https://open.spotify.com/album/03QiFOKDh6xMiSTkOnsmMG"}</span></span>
</code></pre></div>
<h3 id="效果-7">效果<a href="#效果-7" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<figure><iframe class="spotify-embed" src="https://open.spotify.com/embed/track/0HYAsQwJIO6FLqpyTeD3l6" title="Spotify Embed" height="152" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe></figure>
<figure><iframe class="spotify-embed" src="https://open.spotify.com/embed/album/03QiFOKDh6xMiSTkOnsmMG" title="Spotify Embed" height="352" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe></figure>
<h2 id="x-推文">X 推文<a href="#x-推文" class="heading-anchor-link" aria-label="Link to X 推文"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用双冒号语法 <code>::tweet{url="tweet-url"}</code>，即可嵌入 X 推文。</p>
<h3 id="语法-8">语法<a href="#语法-8" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::tweet{url="https://x.com/hachi_08/status/1906456524337123549"}</span></span>
</code></pre></div>
<h3 id="效果-8">效果<a href="#效果-8" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<figure><blockquote class="twitter-tweet" data-dnt="true"><a href="https://twitter.com/hachi_08/status/1906456524337123549" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://twitter.com/hachi_08/status/1906456524337123549"></a></blockquote></figure>
<h2 id="codepen">CodePen<a href="#codepen" class="heading-anchor-link" aria-label="Link to CodePen"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用双冒号语法 <code>::codepen{url="codepen-url"}</code>，即可嵌入 CodePen 演示。</p>
<h3 id="语法-9">语法<a href="#语法-9" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">::codepen{url="https://codepen.io/jh3y/pen/NWdNMBJ"}</span></span>
</code></pre></div>
<h3 id="效果-9">效果<a href="#效果-9" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<figure><iframe class="codepen-embed" src="https://codepen.io/jh3y/embed/NWdNMBJ?default-tab=result" title="CodePen Embed" loading="lazy"></iframe></figure>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/theme-color-schemes/</id>
    <title>主题配色指南</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/theme-color-schemes/"/>
    <published>2025-04-11T00:00:00+00:00</published>
    <updated>2025-04-11T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>Retypeset 基于 OKLCH 颜色空间来定义主题配色，默认为模拟印刷风格的黑白灰配色。为满足个性化需求，我为主题制作了一些配色方案。你可以在 src/config.ts 中替换默认配色，并重启开发服务器以预览新配色。</summary>
    <content type="html"><![CDATA[<p>Retypeset 基于 <a href="https://oklch.com/" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://oklch.com/">OKLCH</a> 颜色空间来定义主题配色，默认为模拟印刷风格的黑白灰配色。</p>
<p>为满足个性化需求，我为主题制作了一些配色方案。你可以在 <a href="https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts">src/config.ts</a> 中替换默认配色，并重启开发服务器以预览新配色。</p>
<h2 id="葱白">葱白<a href="#葱白" class="heading-anchor-link" aria-label="Link to 葱白"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<img src="/_astro/1-light.ClVuZxd5_21HiG1.webp" srcset="/_astro/1-light.ClVuZxd5_21HiG1-800.webp 800w, /_astro/1-light.ClVuZxd5_21HiG1-1200.webp 1200w, /_astro/1-light.ClVuZxd5_21HiG1.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#bcddfed5" loading="lazy" decoding="async" alt="Light mode">
<img src="/_astro/1-dark.BivCfSmu_Z1FcXLT.webp" srcset="/_astro/1-dark.BivCfSmu_Z1FcXLT-800.webp 800w, /_astro/1-dark.BivCfSmu_Z1FcXLT-1200.webp 1200w, /_astro/1-dark.BivCfSmu_Z1FcXLT.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#55644522" loading="lazy" decoding="async" alt="Dark mode">
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">light: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.25 0.03 211.86)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.40 0.03 211.86)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.99 0.0039 106.47)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">dark: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.92 0.0015 106.47)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.79 0.0015 106.47)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.24 0.0039 106.47)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.2)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
</code></pre></div>
<h2 id="鸦青">鸦青<a href="#鸦青" class="heading-anchor-link" aria-label="Link to 鸦青"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<img src="/_astro/2-light.DLXS38ks_2j3zhb.webp" srcset="/_astro/2-light.DLXS38ks_2j3zhb-800.webp 800w, /_astro/2-light.DLXS38ks_2j3zhb-1200.webp 1200w, /_astro/2-light.DLXS38ks_2j3zhb.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#bbddded6" loading="lazy" decoding="async" alt="Light mode">
<img src="/_astro/2-dark.prgZMrfY_Z1i4yAx.webp" srcset="/_astro/2-dark.prgZMrfY_Z1i4yAx-800.webp 800w, /_astro/2-dark.prgZMrfY_Z1i4yAx-1200.webp 1200w, /_astro/2-dark.prgZMrfY_Z1i4yAx.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#55644523" loading="lazy" decoding="async" alt="Dark mode">
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">light: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.24 0.0172 280.05)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.40 0.0172 280.05)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.98 0.0172 280.05)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">dark: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.92 0.0172 280.05)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.79 0.0172 280.05)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.24 0.0172 280.05)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.2)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
</code></pre></div>
<h2 id="墨蓝">墨蓝<a href="#墨蓝" class="heading-anchor-link" aria-label="Link to 墨蓝"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<img src="/_astro/4-light.DIUeDw9p_Z2fbxhe.webp" srcset="/_astro/4-light.DIUeDw9p_Z2fbxhe-800.webp 800w, /_astro/4-light.DIUeDw9p_Z2fbxhe-1200.webp 1200w, /_astro/4-light.DIUeDw9p_Z2fbxhe.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#bcdffede" loading="lazy" decoding="async" alt="Light mode">
<img src="/_astro/4-dark.CKqTknpt_2n6Qrb.webp" srcset="/_astro/4-dark.CKqTknpt_2n6Qrb-800.webp 800w, /_astro/4-dark.CKqTknpt_2n6Qrb-1200.webp 1200w, /_astro/4-dark.CKqTknpt_2n6Qrb.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#55644523" loading="lazy" decoding="async" alt="Dark mode">
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">light: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.24 0.053 261.24)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.39 0.053 261.24)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(1 0 0)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">dark: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.92 0 0)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.79 0 0)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.24 0.016 265.21)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.2)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
</code></pre></div>
<h2 id="米黄">米黄<a href="#米黄" class="heading-anchor-link" aria-label="Link to 米黄"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<img src="/_astro/3-light.8aAAK8Ad_BewEA.webp" srcset="/_astro/3-light.8aAAK8Ad_BewEA-800.webp 800w, /_astro/3-light.8aAAK8Ad_BewEA-1200.webp 1200w, /_astro/3-light.8aAAK8Ad_BewEA.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#bbdfdad5" loading="lazy" decoding="async" alt="Light mode">
<img src="/_astro/3-dark.CGQcMuXC_Z2c4VKc.webp" srcset="/_astro/3-dark.CGQcMuXC_Z2c4VKc-800.webp 800w, /_astro/3-dark.CGQcMuXC_Z2c4VKc-1200.webp 1200w, /_astro/3-dark.CGQcMuXC_Z2c4VKc.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="5088" height="3346" style="--lqip:#55644522" loading="lazy" decoding="async" alt="Dark mode">
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">light: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.25 0 0)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.41 0 0)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.95 0.0237 59.39)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">dark: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  primary: 'oklch(0.93 0.019 59.39)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  secondary: 'oklch(0.80 0.017 59.39)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  background: 'oklch(0.23 0 0)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  highlight: 'oklch(0.93 0.195089 103.2532 / 0.2)',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">},</span></span>
</code></pre></div>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/markdown-style-guide/</id>
    <title>Markdown 样式指南</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/markdown-style-guide/"/>
    <published>2025-03-08T00:00:00+00:00</published>
    <updated>2025-03-23T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>以下是一些基本的 Markdown 语法示例，及其在 Retypeset 主题中的样式效果。在文本前添加井号 # 与空格，即可创建标题。井号数量对应标题等级。使用空行分隔文本，即可创建段落。孔乙己一到店，所有喝酒的人便都看着他笑，有的叫道...</summary>
    <content type="html"><![CDATA[<p>以下是一些基本的 Markdown 语法示例，及其在 Retypeset 主题中的样式效果。</p>
<h2 id="标题">标题<a href="#标题" class="heading-anchor-link" aria-label="Link to 标题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>在文本前添加井号 <code>#</code> 与空格，即可创建标题。井号数量对应标题等级。</p>
<h3 id="语法">语法<a href="#语法" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8"># 一级标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">## 二级标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">### 三级标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">#### 四级标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">##### 五级标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">###### 六级标题</span></span>
</code></pre></div>
<h3 id="效果">效果<a href="#效果" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h1 id="一级标题">一级标题<a href="#一级标题" class="heading-anchor-link" aria-label="Link to 一级标题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h1>
<h2 id="二级标题">二级标题<a href="#二级标题" class="heading-anchor-link" aria-label="Link to 二级标题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<h3 id="三级标题">三级标题<a href="#三级标题" class="heading-anchor-link" aria-label="Link to 三级标题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="四级标题">四级标题<a href="#四级标题" class="heading-anchor-link" aria-label="Link to 四级标题"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<h5 id="五级标题">五级标题</h5>
<h6 id="六级标题">六级标题</h6>
<h2 id="段落">段落<a href="#段落" class="heading-anchor-link" aria-label="Link to 段落"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用空行分隔文本，即可创建段落。</p>
<h3 id="语法-1">语法<a href="#语法-1" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">孔乙己一到店，所有喝酒的人便都看着他笑，有的叫道：“孔乙己，你脸上又添上新伤疤了！”他不回答，对柜里说：“温两碗酒，要一碟茴香豆。”便排出九文大钱。他们又故意的高声嚷道：“你一定又偷了人家的东西了！”孔乙己睁大眼睛说：“你怎么这样凭空污人清白……”“什么清白？我前天亲眼见你偷了何家的书，吊着打。”孔乙己便涨红了脸，额上的青筋条条绽出，争辩道：“窃书不能算偷……窃书！……读书人的事，能算偷么？”接连便是难懂的话，什么“君子固穷”，什么“者乎”之类，引得众人都哄笑起来：店内外充满了快活的空气。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">听人家背地里谈论，孔乙己原来也读过书，但终于没有进学，又不会营生；于是愈过愈穷，弄到将要讨饭了。</span></span>
</code></pre></div>
<h3 id="效果-1">效果<a href="#效果-1" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>孔乙己一到店，所有喝酒的人便都看着他笑，有的叫道：“孔乙己，你脸上又添上新伤疤了！”他不回答，对柜里说：“温两碗酒，要一碟茴香豆。”便排出九文大钱。他们又故意的高声嚷道：“你一定又偷了人家的东西了！”孔乙己睁大眼睛说：“你怎么这样凭空污人清白……”“什么清白？我前天亲眼见你偷了何家的书，吊着打。”孔乙己便涨红了脸，额上的青筋条条绽出，争辩道：“窃书不能算偷……窃书！……读书人的事，能算偷么？”接连便是难懂的话，什么“君子固穷”，什么“者乎”之类，引得众人都哄笑起来：店内外充满了快活的空气。</p>
<p>听人家背地里谈论，孔乙己原来也读过书，但终于没有进学，又不会营生；于是愈过愈穷，弄到将要讨饭了。</p>
<h2 id="图片">图片<a href="#图片" class="heading-anchor-link" aria-label="Link to 图片"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用感叹号 <code>!</code> 方括号 <code>[]</code> 与圆括号 <code>()</code>，即可添加图片。这些都是半角符号，而非全角符号。</p>
<h3 id="语法-2">语法<a href="#语法-2" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![图片描述](../_images/image-01.jpeg)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">![图片描述](https://music.artist.cc.cd/images/20.webp)</span></span>
</code></pre></div>
<h3 id="效果-2">效果<a href="#效果-2" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<figure><img src="/_astro/19_aVdOI.webp" srcset="/_astro/19_aVdOI-800.webp 800w, /_astro/19_aVdOI-1200.webp 1200w, /_astro/19_aVdOI.webp 1600w" sizes="(min-width: 1024px) 704px, 85.5vw" width="1920" height="1280" style="--lqip:#0022288a" loading="lazy" decoding="async" alt="图片示例"><figcaption>图片示例</figcaption></figure>
<h2 id="块引用">块引用<a href="#块引用" class="heading-anchor-link" aria-label="Link to 块引用"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用 <code>&gt;</code> 符号和空格，即可创建块引用，其中可包含多个段落。使用 <code>&lt;cite&gt;</code> 或 <code>&lt;footer&gt;</code> 标签，即可标注引用来源，同时可通过 <code>[^1]</code> 或 <code>[^note]</code> 格式插入脚注。</p>
<h3 id="多个段落">多个段落<a href="#多个段落" class="heading-anchor-link" aria-label="Link to 多个段落"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="语法-3">语法<a href="#语法-3" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="markdown" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-markdown"><span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">&gt;</span><span style="color:#22863a;--shiki-dark:#85E89D"> 天地不仁，以万物为刍狗。</span></span>
<span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">&gt;</span></span>
<span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">&gt;</span><span style="color:#22863a;--shiki-dark:#85E89D"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">**</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">提示</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">**</span><span style="color:#22863a;--shiki-dark:#85E89D">：引用块内可使用 </span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">_</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">Markdown 语法</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">_</span><span style="color:#22863a;--shiki-dark:#85E89D">。</span></span>
</code></pre></div>
<h4 id="效果-3">效果<a href="#效果-3" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<blockquote>
<p>天地不仁，以万物为刍狗。</p>
<p><strong>提示</strong>：引用块内可使用 <em>Markdown 语法</em>。</p>
</blockquote>
<h3 id="标注引用来源">标注引用来源<a href="#标注引用来源" class="heading-anchor-link" aria-label="Link to 标注引用来源"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="语法-4">语法<a href="#语法-4" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="markdown" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-markdown"><span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">&gt;</span><span style="color:#22863a;--shiki-dark:#85E89D"> 在我的后园，可以看见墙外有两株树，一株是枣树，还有一株也是枣树。</span></span>
<span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">&gt;</span></span>
<span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">&gt;</span><span style="color:#22863a;--shiki-dark:#85E89D"> —— &lt;cite&gt;《秋夜》[^1]&lt;/cite&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">[</span><span style="color:#6f42c1;--shiki-dark:#B392F0">^1</span><span style="color:#24292e;--shiki-dark:#E1E4E8">]</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8;text-decoration:underline;--shiki-dark-text-decoration:underline">《[秋夜](https://zh.wikisource.org/wiki/%E7%A7%8B%E5%A4%9C_(%E9%AD%AF%E8%BF%85))》是鲁迅散文诗集《野草》中的第一首散文诗，创作于</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#b31d28;--shiki-dark:#FDAEB7;font-style:italic;--shiki-dark-font-style:italic">1924 年。</span></span>
</code></pre></div>
<h4 id="效果-4">效果<a href="#效果-4" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<blockquote>
<p>在我的后园，可以看见墙外有两株树，一株是枣树，还有一株也是枣树。</p>
<p>—— <cite>《秋夜》<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></cite></p>
</blockquote>
<h2 id="表格">表格<a href="#表格" class="heading-anchor-link" aria-label="Link to 表格"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用三个或多个连字符 <code>---</code> 分隔标题，并使用管道符 <code>|</code> 分隔每列，即可创建表格。</p>
<h3 id="语法-5">语法<a href="#语法-5" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="markdown" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-markdown"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 斜体   </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 粗体     </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 代码   </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-----</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-------</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">------</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">_</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">斜体</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">_</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">**</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">粗体</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">**</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">`</span><span style="color:#24292e;--shiki-dark:#E1E4E8">代码</span><span style="color:#24292e;--shiki-dark:#E1E4E8">`</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">_</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">斜体</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-style:italic;--shiki-dark-font-style:italic">_</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">**</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">粗体</span><span style="color:#24292e;--shiki-dark:#E1E4E8;font-weight:bold;--shiki-dark-font-weight:bold">**</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">`</span><span style="color:#24292e;--shiki-dark:#E1E4E8">代码</span><span style="color:#24292e;--shiki-dark:#E1E4E8">`</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">|</span></span>
</code></pre></div>
<h3 id="效果-5">效果<a href="#效果-5" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<table><thead><tr><th>斜体</th><th>粗体</th><th>代码</th></tr></thead><tbody>
<tr><td><em>斜体</em></td><td><strong>粗体</strong></td><td><code>代码</code></td></tr>
<tr><td><em>斜体</em></td><td><strong>粗体</strong></td><td><code>代码</code></td></tr>
</tbody></table>
<h2 id="代码块">代码块<a href="#代码块" class="heading-anchor-link" aria-label="Link to 代码块"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>使用三个反引号 <code>```</code> 包裹代码，即可创建代码块。在顶部的反引号后标注语言类型，例如 html、javascript、css、markdown 等，即可实现语法高亮。</p>
<h3 id="语法-6">语法<a href="#语法-6" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="text" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-text"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">```html</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;!doctype html&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;html lang="zh-CN"&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  &lt;head&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    &lt;meta charset="utf-8" /&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    &lt;title&gt;HTML5 示例文档&lt;/title&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  &lt;/head&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  &lt;body&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    &lt;p&gt;测试&lt;/p&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  &lt;/body&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/html&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">```</span></span>
</code></pre></div>
<h3 id="效果-6">效果<a href="#效果-6" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="html" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-html"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;!</span><span style="color:#22863a;--shiki-dark:#85E89D">doctype</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> html</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">html</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">lang</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">zh-CN</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">head</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">meta</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">charset</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">utf-8</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> /&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">title</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">HTML5 示例文档</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">title</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">head</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">body</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">p</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">测试</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">p</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">body</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">html</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
</code></pre></div>
<h2 id="列表">列表<a href="#列表" class="heading-anchor-link" aria-label="Link to 列表"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<h3 id="有序列表">有序列表<a href="#有序列表" class="heading-anchor-link" aria-label="Link to 有序列表"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="语法-7">语法<a href="#语法-7" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="markdown" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-markdown"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">1</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">第一项</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">2</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 第二项</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">3</span><span style="color:#24292e;--shiki-dark:#E1E4E8">.</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 第三项</span></span>
</code></pre></div>
<h4 id="效果-7">效果<a href="#效果-7" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<ol>
<li>第一项</li>
<li>第二项</li>
<li>第三项</li>
</ol>
<h3 id="无序列表">无序列表<a href="#无序列表" class="heading-anchor-link" aria-label="Link to 无序列表"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="语法-8">语法<a href="#语法-8" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="markdown" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-markdown"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">列表项</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 图表项</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 更多项</span></span>
</code></pre></div>
<h4 id="效果-8">效果<a href="#效果-8" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<ul>
<li>列表项</li>
<li>图表项</li>
<li>更多项</li>
</ul>
<h3 id="嵌套列表">嵌套列表<a href="#嵌套列表" class="heading-anchor-link" aria-label="Link to 嵌套列表"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="语法-9">语法<a href="#语法-9" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="markdown" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-markdown"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">水果</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 苹果</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 橙子</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 香蕉</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 蔬菜</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 青菜</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 萝卜</span></span>
</code></pre></div>
<h4 id="效果-9">效果<a href="#效果-9" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<ul>
<li>水果
<ul>
<li>苹果</li>
<li>橙子</li>
<li>香蕉</li>
</ul>
</li>
<li>蔬菜
<ul>
<li>青菜</li>
<li>萝卜</li>
</ul>
</li>
</ul>
<h2 id="其他元素">其他元素<a href="#其他元素" class="heading-anchor-link" aria-label="Link to 其他元素"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>包括 <code>&lt;sup&gt;</code> 上标，<code>&lt;sub&gt;</code> 下标，<code>&lt;abbr&gt;</code> 缩写，<code>&lt;del&gt;</code> 删除线，<code>&lt;u&gt;</code> 波浪线，<code>&lt;kbd&gt;</code> 键盘输入，<code>&lt;mark&gt;</code> 高亮，<code>&lt;hr&gt;</code> 分隔线。</p>
<h3 id="语法-10">语法<a href="#语法-10" class="heading-anchor-link" aria-label="Link to 语法"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="html" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-html"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">H</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">sub</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">2</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">sub</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">O</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">X</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">sup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">n</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">sup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> + Y</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">sup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">n</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">sup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> = Z</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">sup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">n</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">sup</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">abbr</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">title</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">Graphics Interchange Format</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">GIF</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">abbr</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 是一种位图图像格式。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">书籍是人类进步的</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">del</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">楼梯</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">del</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">阶梯。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">优秀的作家总是会仔细检查</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">u</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">title</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">拼写</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">拚写</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">u</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">问题。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">按下 </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">kbd</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">Ctrl</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">kbd</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> + </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">kbd</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">Alt</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">kbd</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> + </span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">kbd</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">Delete</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">kbd</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 以结束会话。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">大多数</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">mark</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">蝾螈</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">mark</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">昼伏夜出，以昆虫、蠕虫等小生物为食。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">使用三个连字符 `---` 或 `</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">hr</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">` 标签，即可创建如下分隔线。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">---</span></span>
</code></pre></div>
<h3 id="效果-10">效果<a href="#效果-10" class="heading-anchor-link" aria-label="Link to 效果"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>H<sub>2</sub>O</p>
<p>X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup></p>
<p><abbr title="Graphics Interchange Format">GIF</abbr> 是一种位图图像格式。</p>
<p>书籍是人类进步的<del>楼梯</del>阶梯。</p>
<p>优秀的作家总是会仔细检查<u title="拼写">拚写</u>问题。</p>
<p>按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以结束会话。</p>
<p>大多数<mark>蝾螈</mark>昼伏夜出，以昆虫、蠕虫等小生物为食。</p>
<p>使用三个连字符 <code>---</code> 或 <code>&lt;hr&gt;</code> 标签，即可创建如下分隔线。</p>
<hr />
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>《<a href="https://zh.wikisource.org/wiki/%E7%A7%8B%E5%A4%9C_(%E9%AD%AF%E8%BF%85)" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://zh.wikisource.org/wiki/%E7%A7%8B%E5%A4%9C_(%E9%AD%AF%E8%BF%85)">秋夜</a>》是鲁迅散文诗集《野草》中的第一首散文诗，创作于 1924 年。 <a href="#user-content-fnref-1" data-footnote-backref class="data-footnote-backref" aria-label="Back to reference 1">&#8617;</a> </p></li>
</ol></section>
]]></content>
  </entry><entry>
    <id>https://artist.cc.cd/posts/theme-guide/</id>
    <title>主题上手指南</title>
    <link rel="alternate" type="text/html" href="https://artist.cc.cd/posts/theme-guide/"/>
    <published>2025-01-26T00:00:00+00:00</published>
    <updated>2025-04-13T00:00:00+00:00</updated>
    <author><name>Liviruy</name></author>
    <summary>Retypeset 是一款基于 Astro 框架的静态博客主题，中文名为重新编排。本文为 Retypeset 主题上手指南，主要介绍如何修改主题配置与创建新文章，来帮助你快速搭建个人博客。通过修改配置文件 src/config.ts 来自定...</summary>
    <content type="html"><![CDATA[<p>Retypeset 是一款基于 <a href="https://astro.build/" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://astro.build/">Astro</a> 框架的静态博客主题，中文名为重新编排。本文为 Retypeset 主题上手指南，主要介绍如何修改主题配置与创建新文章，来帮助你快速搭建个人博客。</p>
<h2 id="主题配置">主题配置<a href="#主题配置" class="heading-anchor-link" aria-label="Link to 主题配置"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>通过修改配置文件 <a href="https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts">src/config.ts</a> 来自定义你的博客。</p>
<h3 id="站点信息">站点信息<a href="#站点信息" class="heading-anchor-link" aria-label="Link to 站点信息"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">site: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  title: 'Retypeset'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点副标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  subtitle: 'Revive the beauty of typography'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点描述</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  description: 'Retypeset is a static blog theme...'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 使用 src/i18n/ui.ts 中的多语言标题/副标题/站点描述，代替上方静态配置</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  i18nTitle: true // true | false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 作者名称</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  author: 'radishzz'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点地址</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  url: 'https://lartist.top'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 基础路径</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 所有页面和资产的根目录</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  base: '/' // 例如 '/blog', '/docs'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点图标</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 推荐格式：svg, png, ico</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  favicon: '/icons/favicon.svg' // 或 https://example.com/favicon.svg</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="主题配色">主题配色<a href="#主题配色" class="heading-anchor-link" aria-label="Link to 主题配色"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">color: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 默认主题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  mode: 'light' // light | dark | auto</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 亮色模式</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  light: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 主要颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 用于站点标题、鼠标悬停效果等</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    primary: 'oklch(25% 0.005 298)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 次要颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 用于普通文本</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    secondary: 'oklch(40% 0.005 298)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 背景色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    background: 'oklch(96% 0.005 298)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 高亮颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 用于导航栏、选中文本等</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 暗色模式</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  dark: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 主要颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    primary: 'oklch(92% 0.005 298)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 次要颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    secondary: 'oklch(77% 0.005 298)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 背景色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    background: 'oklch(22% 0.005 298)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 高亮颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="全局设置">全局设置<a href="#全局设置" class="heading-anchor-link" aria-label="Link to 全局设置"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">global: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 默认语言</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点根路径 '/' 的语言</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  locale: 'zh' // zh | en</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 更多语言</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 生成 '/en/' 等多语言路径</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 不要重复填写默认语言，可以为空 []</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  moreLocales: ['en']</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 字体样式</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  fontStyle: 'sans' // sans | serif</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 文章日期格式</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // YYYY-MM-DD | MM-DD-YYYY | DD-MM-YYYY | MMM D YYYY | D MMM YYYY</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 2025-04-13, 04-13-2025, 13-04-2025, Apr 13 2025，13 Apr 2025</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  dateFormat: 'YYYY-MM-DD'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 开启文章目录</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  toc: true // true | false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 开启 KaTeX 数学渲染</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  katex: true // true | false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 减少动画效果</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  reduceMotion: false // true | false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="评论系统">评论系统<a href="#评论系统" class="heading-anchor-link" aria-label="Link to 评论系统"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">comment: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 开启评论系统</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  enabled: true // true | false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // twikoo 评论系统</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  twikoo: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    envId: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // version: 前端版本可在 package.json 中修改</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="搜索引擎优化">搜索引擎优化<a href="#搜索引擎优化" class="heading-anchor-link" aria-label="Link to 搜索引擎优化"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">seo: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // @twitter ID</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  twitterID: '@radishzz_'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 站点验证</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  verification: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // google 搜索控制台</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    google: 'AUCrz5F1e5qbnmKKDXl2Sf8u6y0kOpEO1wLs6HMMmlM'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // bing 网站管理员工具</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    bing: '64708CD514011A7965C84DDE1D169F87'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // yandex 网站管理员</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    yandex: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // baidu 站长工具</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    baidu: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // google 网站分析</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  googleAnalyticsID: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // umami 网站分析</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  umamiAnalyticsID: 'dab0e4b9-9cbf-43c3-af60-b09d3b545c38'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // folo 验证</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  folo: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 订阅 ID</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    feedID: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // 用户 ID</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    userID: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // apiflash 访问密钥</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 生成网站截图用于 open graph</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 获取访问密钥：https://apiflash.com/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  apiflashKey: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="自定义页脚">自定义页脚<a href="#自定义页脚" class="heading-anchor-link" aria-label="Link to 自定义页脚"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">footer: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 社交链接</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  links: [</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      name: 'RSS',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      url: '/atom.xml', // 或 /rss.xml</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      name: 'GitHub',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      url: 'https://github.com/radishzzz/astro-theme-retypeset',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      name: 'Email',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      url: 'email@example.com',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    //   name: 'X',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    //   url: 'https://x.com/radishzz_',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    // },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  ]</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 建站年份</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  startYear: 2025</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="资源预加载">资源预加载<a href="#资源预加载" class="heading-anchor-link" aria-label="Link to 资源预加载"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">preload: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 图床地址</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 优化远程图片并生成低质量占位符</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  imageHostURL: 'music.artist.cc.cd'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 定制 google analytics 跟踪脚本</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 适用于代理跟踪脚本到自定义域名的用户</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  customGoogleAnalyticsJS: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 定制 umami 跟踪脚本</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 适用于自部署 umami 或代理跟踪脚本到自定义域名的用户</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  customUmamiAnalyticsJS: 'https://views.radishzz.cc/script.js'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h2 id="更多配置">更多配置<a href="#更多配置" class="heading-anchor-link" aria-label="Link to 更多配置"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>除了配置文件 <code>src/config.ts</code> 外，还有部分配置项位于其它文件中。</p>
<h3 id="语法高亮">语法高亮<a href="#语法高亮" class="heading-anchor-link" aria-label="Link to 语法高亮"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>代码块的语法高亮主题。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">// astro.config.ts</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">shikiConfig: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 可选主题：https://shiki.style/themes</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 背景色固定跟随博客主题，而非语法高亮主题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  themes: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    light: 'github-light' // 亮色主题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    dark: 'github-dark' // 暗色主题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="文章摘要">文章摘要<a href="#文章摘要" class="heading-anchor-link" aria-label="Link to 文章摘要"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>文章自动摘要的字符数量。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">// src/utils/description.ts</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">const excerptLengths: Record&lt;ExcerptScene, {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  cjk: number // 中文、日文、韩文</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  other: number // 其他语言</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}&gt; = {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  list: { // 首页文章列表</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    cjk: 120, // 自动摘要前 120 字</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    other: 240, // 自动摘要前 240 字</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span></span>
</code></pre></div>
<h3 id="open-graph">Open Graph<a href="#open-graph" class="heading-anchor-link" aria-label="Link to Open Graph"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p><a href="https://orcascan.com/tools/open-graph-validator?url=https%3A%2F%2Flartist.top%2Fposts%2Ftheme-guide%2F" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://orcascan.com/tools/open-graph-validator?url=https%3A%2F%2Flartist.top%2Fposts%2Ftheme-guide%2F">Open Graph 社交卡片</a> 样式。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="ts" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-ts"><span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">// src/pages/og/[...image].ts</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">getImageOptions: (_path, page) =&gt; ({</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  logo: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    path: './public/icons/og-logo.png', // 本地路径的 PNG 图片</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    size: [250], // logo 宽度</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  font: {</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    title: { // 标题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      families: ['Noto Sans SC'], // 字体</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      weight: 'Bold', // 字重</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      color: [34, 33, 36], // 颜色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">      lineHeight: 1.5, // 行高</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  },</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  fonts: [ // 字体路径（本地或远程）</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    'https://cdn.jsdelivr.net/gh/notofonts/noto-cjk@main/Sans/SubsetOTF/SC/NotoSansSC-Bold.otf',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">    'https://cdn.jsdelivr.net/gh/notofonts/noto-cjk@main/Sans/SubsetOTF/SC/NotoSansSC-Regular.otf',</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  ],</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  bgGradient: [[242, 241, 245]], // 背景色</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  // 更多配置：https://github.com/delucis/astro-og-canvas/tree/latest/packages/astro-og-canvas</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">})</span></span>
</code></pre></div>
<h3 id="rss-订阅">RSS 订阅<a href="#rss-订阅" class="heading-anchor-link" aria-label="Link to RSS 订阅"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p><a href="https://lartist.top/atom.xml" target="_blank" rel="noopener noreferrer" data-umami-event="outbound-link-click" data-umami-event-url="https://lartist.top/atom.xml">RSS 订阅页</a> 配色。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="html" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-html"><span class="line"><span style="color:#6a737d;--shiki-dark:#6A737D">&lt;!--</span><span style="color:#6a737d;--shiki-dark:#6A737D"> public/feeds/xxx-style.xsl </span><span style="color:#6a737d;--shiki-dark:#6A737D">--&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;</span><span style="color:#22863a;--shiki-dark:#85E89D">style</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6f42c1;--shiki-dark:#B392F0">type</span><span style="color:#24292e;--shiki-dark:#E1E4E8">=</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#032f62;--shiki-dark:#9ECBFF">text/css</span><span style="color:#032f62;--shiki-dark:#9ECBFF">"</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
<span class="line"><span style="color:#22863a;--shiki-dark:#85E89D">body</span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#005cc5;--shiki-dark:#79B8FF">color</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8">oklch(</span><span style="color:#005cc5;--shiki-dark:#79B8FF">25</span><span style="color:#d73a49;--shiki-dark:#F97583">%</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#005cc5;--shiki-dark:#79B8FF">.005</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">298</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)</span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6a737d;--shiki-dark:#6A737D">/*</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 字体颜色 </span><span style="color:#6a737d;--shiki-dark:#6A737D">*/</span></span>
<span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">bg-white</span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#005cc5;--shiki-dark:#79B8FF">background-color</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8">oklch(</span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#005cc5;--shiki-dark:#79B8FF">.96</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#005cc5;--shiki-dark:#79B8FF">.005</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">298</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)!</span><span style="color:#005cc5;--shiki-dark:#79B8FF">important</span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6a737d;--shiki-dark:#6A737D">/*</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 背景颜色 </span><span style="color:#6a737d;--shiki-dark:#6A737D">*/</span></span>
<span class="line"><span style="color:#6f42c1;--shiki-dark:#B392F0">.</span><span style="color:#6f42c1;--shiki-dark:#B392F0">text-gray</span><span style="color:#24292e;--shiki-dark:#E1E4E8">{</span><span style="color:#005cc5;--shiki-dark:#79B8FF">color</span><span style="color:#24292e;--shiki-dark:#E1E4E8">:</span><span style="color:#24292e;--shiki-dark:#E1E4E8">oklch(</span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#005cc5;--shiki-dark:#79B8FF">.25</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">0</span><span style="color:#005cc5;--shiki-dark:#79B8FF">.005</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF">298</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> / </span><span style="color:#005cc5;--shiki-dark:#79B8FF">75</span><span style="color:#d73a49;--shiki-dark:#F97583">%</span><span style="color:#24292e;--shiki-dark:#E1E4E8">)!</span><span style="color:#005cc5;--shiki-dark:#79B8FF">important</span><span style="color:#24292e;--shiki-dark:#E1E4E8">}</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#6a737d;--shiki-dark:#6A737D">/*</span><span style="color:#6a737d;--shiki-dark:#6A737D"> 次要字体颜色 </span><span style="color:#6a737d;--shiki-dark:#6A737D">*/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">&lt;/</span><span style="color:#22863a;--shiki-dark:#85E89D">style</span><span style="color:#24292e;--shiki-dark:#E1E4E8">&gt;</span></span>
</code></pre></div>
<h2 id="创建新文章">创建新文章<a href="#创建新文章" class="heading-anchor-link" aria-label="Link to 创建新文章"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h2>
<p>执行 <code>pnpm new-post &lt;filename&gt;</code> 创建新文章，可在 <code>src/content/posts/</code> 目录中编辑。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> new-post                      -</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">  src/content/posts/new-post.md</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> new-post first-post           -</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">  src/content/posts/first-post.md</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> new-post 2025/03/first-post   -</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">  src/content/posts/2025/03/first-post.md</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> new-post first-post.mdx       -</span><span style="color:#d73a49;--shiki-dark:#F97583">&gt;</span><span style="color:#24292e;--shiki-dark:#E1E4E8">  src/content/posts/first-post.mdx</span></span>
</code></pre></div>
<h3 id="front-matter">Front Matter<a href="#front-matter" class="heading-anchor-link" aria-label="Link to Front Matter"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p><code>title</code> 和 <code>published</code> 为必填项，其余配置均可删除。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="md" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-md"><span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">---</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">必填</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">title: 主题上手指南</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">published: 2025-01-26</span></span>
<span class="line"></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">可选</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">description: 自动选取文章前 120 字作为摘要。</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">updated: 2025-03-26</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">tags:</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> </span><span style="color:#24292e;--shiki-dark:#E1E4E8">博客主题</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">  </span><span style="color:#24292e;--shiki-dark:#E1E4E8">-</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> 指南</span></span>
<span class="line"></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">进阶，可选</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">draft: true/false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">pin: 0-99</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">toc: true/false</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">lang: zh/en</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">abbrlink: theme-guide</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">---</span></span>
</code></pre></div>
<h3 id="进阶配置">进阶配置<a href="#进阶配置" class="heading-anchor-link" aria-label="Link to 进阶配置"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<h4 id="draft">draft<a href="#draft" class="heading-anchor-link" aria-label="Link to draft"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<p>是否标记文章为草稿。设为 true 时无法发布文章，仅供本地开发预览。默认为 false。</p>
<h4 id="pin">pin<a href="#pin" class="heading-anchor-link" aria-label="Link to pin"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<p>是否置顶文章。数字越大，文章的置顶优先级越高。默认为 0，即不置顶。</p>
<h4 id="toc">toc<a href="#toc" class="heading-anchor-link" aria-label="Link to toc"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<p>是否生成目录。显示 h2 至 h4 标题。默认由全局配置项 <code>global.toc</code> 决定，可在文章中单独设置以覆盖全局配置。</p>
<h4 id="lang">lang<a href="#lang" class="heading-anchor-link" aria-label="Link to lang"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<p>指定文章语言。只能指定一种语言，不指定则默认显示在所有语言路径下。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="md" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-md"><span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">src/config.ts</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">locale: 'zh'</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">moreLocales: ['en']</span></span>
<span class="line"></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">lang: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/apple.md   -&gt;  example.com/posts/apple/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">                             -&gt;  example.com/en/posts/apple/</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">lang: en</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/apple.md   -&gt;  example.com/posts/apple/</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">lang: zh</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/apple.md   -&gt;  example.com/posts/apple/</span></span>
</code></pre></div>
<h4 id="abbrlink">abbrlink<a href="#abbrlink" class="heading-anchor-link" aria-label="Link to abbrlink"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h4>
<p>自定义文章 URL。只能包含小写字母、数字和连字符 <code>-</code>。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="md" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-md"><span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">src/config.ts</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">locale: 'zh'</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">moreLocales: ['en']</span></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">lang: 'en'</span></span>
<span class="line"></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">abbrlink: ''</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/apple.md           -&gt;  example.com/en/posts/apple/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/guide/apple.md     -&gt;  example.com/en/posts/guide/apple/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/2025/03/apple.md   -&gt;  example.com/en/posts/2025/03/apple/</span></span>
<span class="line"></span>
<span class="line"><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">#</span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold"> </span><span style="color:#005cc5;--shiki-dark:#79B8FF;font-weight:bold;--shiki-dark-font-weight:bold">abbrlink: 'banana'</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/apple.md           -&gt;  example.com/en/posts/banana/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/guide/apple.md     -&gt;  example.com/en/posts/banana/</span></span>
<span class="line"><span style="color:#24292e;--shiki-dark:#E1E4E8">src/content/posts/2025/03/apple.md   -&gt;  example.com/en/posts/banana/</span></span>
</code></pre></div>
<h3 id="混排优化">混排优化<a href="#混排优化" class="heading-anchor-link" aria-label="Link to 混排优化"><svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M2.6 21.4c2 2 5.9 2.9 8.9 0l3.5-3.5-1-1-3.5 3.5c-1.4 1.4-4.2 1.9-6.4-.3s-1.8-5-.3-6.4l3.5-3.5-1-1-3.5 3.5c-3 3-2 6.9 0 8.9ZM21.4 2.6c2 2 2.9 5.9 0 8.9L17.9 15l-1-1 3.5-3.5c1.4-1.4 1.9-4.2-.3-6.4s-5-1.8-6.4-.3l-3.5 3.5-1-1 3.5-3.5c3-3 6.9-2 8.9 0Z"></path><path d="m8.01 14.97 6.93-6.93 1.061 1.06-6.93 6.93z"></path></svg></a></h3>
<p>执行 <code>pnpm format-posts</code>，可优化 <code>src/content/</code> 目录中 Markdown 文件的排版格式。在 CJK（中文、日文、韩文）与英文混写的场景下，补充正确的空格，纠正标点符号等。</p>
<div class="code-block-wrapper"><button class="code-copy-button" type="button" aria-label="Copy code"><svg class="icon-copy" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6.9.8v18h14.5V.8zm12.8 16h-11v-14h11z"></path><path d="M4.3 21.2V5.6l-1.7.5v17.1h14.3l.6-2z"></path></svg><svg class="icon-check" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m23.1 6.4-1.3-1.3L9.4 16.6l-6.3-5.4-1.2 1.2L9.4 20z"></path></svg></button><pre class="astro-code" tabindex="0" data-language="bash" style="background-color:#ffffff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;overflow-x:auto"><code class="language-bash"><span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">pnpm</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> format-posts</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">🔍</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> Scanning Markdown files...</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">📦</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> Found 8 Markdown files</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">✅</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> src/content/posts/guides/Theme Guide-zh.md</span></span>
<span class="line"><span style="color:#e36209;--shiki-dark:#FFAB70">✨</span><span style="color:#24292e;--shiki-dark:#E1E4E8"> Formatted 1 file successfully</span></span>
</code></pre></div>
]]></content>
  </entry>
</feed>
