<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>emicyx blog</title><description>个人技术博客</description><link>https://emiblog.vercel.app/</link><language>zh_CN</language><item><title>博客测试文章</title><link>https://emiblog.vercel.app/posts/%E5%8D%9A%E5%AE%A2%E6%B5%8B%E8%AF%95%E6%96%87%E7%AB%A0/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/%E5%8D%9A%E5%AE%A2%E6%B5%8B%E8%AF%95%E6%96%87%E7%AB%A0/</guid><description>这是我新建的第一篇测试文章。</description><pubDate>Fri, 07 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;博客测试文章&lt;/h1&gt;
&lt;p&gt;这是一篇用于测试的文章，用来确认博客的编辑和发布流程是否正常。&lt;/p&gt;
&lt;h2&gt;我可以写点什么&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;支持 &lt;strong&gt;加粗&lt;/strong&gt;、&lt;em&gt;斜体&lt;/em&gt;、&lt;code&gt;行内代码&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;支持代码块：&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;console.log(&quot;Hello, emiblog!&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;注意：&lt;code&gt;draft: false&lt;/code&gt; 表示这篇文章已经公开发布；如果想暂不发布，改成 &lt;code&gt;true&lt;/code&gt; 即可。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>前端小宠物 pet-widget 开发日记</title><link>https://emiblog.vercel.app/posts/pet-widget-dev-diary/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/pet-widget-dev-diary/</guid><description>给博客加上一个会眨眼、会打盹、还能被拎起来晃悠的小宠物。纯 CSS + 原生 JS 实现，记录从零开发到接入 Astro 博客的全过程。</description><pubDate>Fri, 07 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;前端小宠物 pet-widget 开发日记&lt;/h1&gt;
&lt;p&gt;这两天给博客写了一个会动的&quot;电子宠物&quot;，就是你现在看到右下角那个小家伙——它会随机眨眼、发呆久了会坐下打盹、鼠标还能把它拎起来晃悠。这篇日记记录一下整个开发过程和踩过的坑。&lt;/p&gt;
&lt;h2&gt;起因&lt;/h2&gt;
&lt;p&gt;博客搭好之后总觉得页面上少了点&quot;活物&quot;。Fuwari 主题本身已经很完整了，但再精致的静态页面也少一点互动感。于是决定塞一个吉祥物进去，要求也很简单：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;不用引框架，纯 CSS + 原生 JS，方便以后迁移&lt;/li&gt;
&lt;li&gt;不挡页面操作（把宠物放角落，别碍事）&lt;/li&gt;
&lt;li&gt;有几个小动作：眨眼、打盹、能被拖动&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;整体设计&lt;/h2&gt;
&lt;h3&gt;四种状态&lt;/h3&gt;
&lt;p&gt;宠物本质上是一个&lt;strong&gt;有限状态机&lt;/strong&gt;，四个状态来回切换：&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;状态&lt;/th&gt;
&lt;th&gt;触发&lt;/th&gt;
&lt;th&gt;表现&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;standing&lt;/code&gt; 站立&lt;/td&gt;
&lt;td&gt;默认 / 拖动放下 / 睡醒&lt;/td&gt;
&lt;td&gt;上下漂浮 + 随机眨眼&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sitting&lt;/code&gt; 坐下&lt;/td&gt;
&lt;td&gt;无操作超过 &lt;code&gt;idleTime&lt;/code&gt;（默认 30s）&lt;/td&gt;
&lt;td&gt;轻轻摇晃 + 飘音符&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lifted&lt;/code&gt; 拎起&lt;/td&gt;
&lt;td&gt;鼠标按住拖动&lt;/td&gt;
&lt;td&gt;悬空左右摆动&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dropping&lt;/code&gt; 落下&lt;/td&gt;
&lt;td&gt;松手&lt;/td&gt;
&lt;td&gt;掉落回弹动画后回站立&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;所有状态都挂在 &lt;code&gt;body&lt;/code&gt; 的 class 上，动画交给 CSS，JS 只负责&quot;什么时候切换状态&quot;。&lt;/p&gt;
&lt;h3&gt;图片资源&lt;/h3&gt;
&lt;p&gt;每张图都是 &lt;strong&gt;2048×2048 的透明背景 PNG&lt;/strong&gt;，一个状态一张：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;assets/
  standing.png   # 站姿
  blink.png      # 眨眼瞬间（闭眼）
  sitting.png    # 坐姿
  lifted.png     # 被拎起
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;图很大（单张 2~5MB），所以做了&lt;strong&gt;预加载 + 失败兜底&lt;/strong&gt;：启动时用 &lt;code&gt;Promise.all&lt;/code&gt; 把所有图先拉一遍，&lt;code&gt;onerror&lt;/code&gt; 也 resolve（返回 &lt;code&gt;ok:false&lt;/code&gt;），加载失败的图就跳过，不阻塞初始化。&lt;/p&gt;
&lt;h3&gt;动画全用 CSS&lt;/h3&gt;
&lt;p&gt;写轮播级粒子动画太奢侈，这种小宠物用 CSS keyframes 就够，还省 JS 主线程。核心几个：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;petFloat&lt;/code&gt;：站立时上下漂浮 + 轻微左右摇摆 + 弹性缩放&lt;/li&gt;
&lt;li&gt;&lt;code&gt;petShake&lt;/code&gt;：坐下时的摇头晃脑&lt;/li&gt;
&lt;li&gt;&lt;code&gt;petDrop&lt;/code&gt;：松手后的落地回弹（下坠 → 弹起 → 落定）&lt;/li&gt;
&lt;li&gt;&lt;code&gt;petSquash&lt;/code&gt;：眨眼时身体压扁一下&lt;/li&gt;
&lt;li&gt;&lt;code&gt;petDangle&lt;/code&gt;：被拎起时以头顶为轴心左右摆动&lt;/li&gt;
&lt;li&gt;&lt;code&gt;petNote&lt;/code&gt;：坐下时头顶飘出的小音符&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;外加一个 &lt;code&gt;drop-shadow&lt;/code&gt; 投影，宠物就&quot;站&quot;在页面上了。&lt;/p&gt;
&lt;h2&gt;几个关键实现&lt;/h2&gt;
&lt;h3&gt;空闲坐下&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;function resetIdle() {
  clearTimeout(idleTimer);
  if (state !== &apos;standing&apos;) return;
  idleTimer = setTimeout(function () {
    if (state === &apos;standing&apos; &amp;amp;&amp;amp; !document.hidden) enterSitting();
  }, cfg.idleTime);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;每次有交互（睡醒、放下、鼠标靠近）都会重置这个计时器。&lt;strong&gt;标签页切到后台时不触发坐下&lt;/strong&gt;，回到前台再重新计时——不然宠物在你看不见的时候偷懒就很出戏。&lt;/p&gt;
&lt;h3&gt;随机眨眼&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;var delay = cfg.blinkMin + Math.random() * (cfg.blinkMax - cfg.blinkMin);
blinkTimer = setTimeout(blinkNow, delay);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;间隔在 2.5s~6.5s 之间随机，避免像秒表一样机械。眨眼瞬间换 &lt;code&gt;blink.png&lt;/code&gt;，150ms 后换回站姿；如果眨眼图没加载成功，就降级用 CSS 的 &lt;code&gt;petSquash&lt;/code&gt; 压扁一下，体验也不至于断档。&lt;/p&gt;
&lt;h3&gt;拖动&lt;/h3&gt;
&lt;p&gt;拖动这块踩了点坑：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;平滑跟随&lt;/strong&gt;：不直接把元素钉在鼠标上，而是用 &lt;code&gt;requestAnimationFrame&lt;/code&gt; 每帧朝目标位置插值 &lt;code&gt;+= (target - cur) * 0.32&lt;/code&gt;，拖起来有&quot;重力跟随&quot;的黏滞感，而不是生硬地瞬移。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;惯性摇摆&lt;/strong&gt;：记录横向速度，拖动时让身体向运动方向倾斜，停下来还能回弹，手感立刻不一样。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;指针捕获&lt;/strong&gt;：用 &lt;code&gt;stage.setPointerCapture()&lt;/code&gt;，防止拖太快时指针跑到元素外面导致 &lt;code&gt;pointerup&lt;/code&gt; 丢失、宠物卡在&quot;拎起&quot;状态。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;边界钳制&lt;/strong&gt;：坐标 clamp 在可视区内，不会被甩到屏幕外。&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;图片切换的淡入淡出&lt;/h3&gt;
&lt;p&gt;直接换 &lt;code&gt;src&lt;/code&gt; 会&quot;啪&quot;地一下变脸，很生硬。写了个 &lt;code&gt;swapImg(src, fade)&lt;/code&gt;：先置 &lt;code&gt;opacity:0&lt;/code&gt;，180ms 后再换图并淡入，过渡就自然了。&lt;/p&gt;
&lt;h2&gt;接入 Astro 博客（Fuwari 主题）&lt;/h2&gt;
&lt;h3&gt;1. 静态资源放进 public&lt;/h3&gt;
&lt;p&gt;把 &lt;code&gt;pet-widget/&lt;/code&gt; 整个目录拷到 &lt;code&gt;public/&lt;/code&gt; 下，这样 Astro 会原样发布为 &lt;code&gt;/pet-widget/...&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public/pet-widget/
  pet-widget.css
  pet-widget.js
  assets/*.png
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. 全站布局挂载&lt;/h3&gt;
&lt;p&gt;在 &lt;code&gt;src/layouts/Layout.astro&lt;/code&gt; 的 &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; 前加入挂载点、样式和脚本：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;pet-widget&quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/pet-widget/pet-widget.css&quot; is:inline /&amp;gt;
&amp;lt;script is:inline&amp;gt;
  window.PetWidgetConfig = {
    size: 200,
    idleTime: 5000,   // 测试用 5s，正式改回 30000
    dock: &apos;bottom-right&apos;,
    assets: {
      standing: &apos;/pet-widget/assets/standing.png&apos;,
      blink:    &apos;/pet-widget/assets/blink.png&apos;,
      sitting:  &apos;/pet-widget/assets/sitting.png&apos;,
      lifted:   &apos;/pet-widget/assets/lifted.png&apos;
    }
  };
&amp;lt;/script&amp;gt;
&amp;lt;script src=&quot;/pet-widget/pet-widget.js&quot; is:inline defer&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. &lt;code&gt;is:inline&lt;/code&gt; 是关键&lt;/h3&gt;
&lt;p&gt;Astro 默认会把 &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; 收集起来打包，插件 &lt;code&gt;is:inline&lt;/code&gt; 后脚本会&lt;strong&gt;原样输出、不被 Astro 处理&lt;/strong&gt;。这很重要，因为：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;配置脚本要在宠物 JS 之前执行，一旦被 Astro 重新排序就可能读到空配置&lt;/li&gt;
&lt;li&gt;宠物脚本用的是全局状态，不需要被打包成模块&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;另外挂载点放在 body 里、&lt;strong&gt;Swup 的容器之外&lt;/strong&gt;，页面切换时宠物不会被重新初始化、也不会有动画重放的闪断。&lt;/p&gt;
&lt;h2&gt;调试技巧&lt;/h2&gt;
&lt;p&gt;空闲 30s 太久，等起来很难受。做了两件事加速验证：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;支持 &lt;strong&gt;URL 参数覆盖配置&lt;/strong&gt;：&lt;code&gt;?idle=5000&lt;/code&gt; &lt;code&gt;?size=160&lt;/code&gt; &lt;code&gt;?offsetx=100&lt;/code&gt; 直接在地址栏改，不用改代码&lt;/li&gt;
&lt;li&gt;暴露 &lt;code&gt;window.__petWidget&lt;/code&gt; API：控制台直接调 &lt;code&gt;__petWidget.sit()&lt;/code&gt; / &lt;code&gt;wake()&lt;/code&gt; / &lt;code&gt;blink()&lt;/code&gt; 手动触发状态&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;可配置项一览&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;配置&lt;/th&gt;
&lt;th&gt;默认&lt;/th&gt;
&lt;th&gt;说明&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dock&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bottom-right&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;停靠位置：四角任意&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;220&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;宠物边长 px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;idleTime&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;无操作多久后坐下&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;blinkMin/Max&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2500/6500&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;眨眼随机间隔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;returnToDock&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;拖放后是否飞回原位&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hideOnMobile&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;小屏（&amp;lt;640px）隐藏&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;respectReducedMotion&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;尊重系统&quot;减少动效&quot;设置&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;humAudio&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&apos;&apos;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;可选哼歌声效 URL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;还没做完的 TODO&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;[ ] 眨眼 + 下蹲的组合动作&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;sitting-closed.png&lt;/code&gt;：坐下后偶尔闭眼&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;standing.png&lt;/code&gt; 换成更精美的正式立绘&lt;/li&gt;
&lt;li&gt;[ ] 更多可交互动作（点击摸摸头？）&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;总之，一个能陪你在写博客时发呆的电子宠物就上线了。如果你也在用 Fuwari/Astro，直接按上面的三步就能把它搬进自己的博客。&lt;/p&gt;
</content:encoded></item><item><title>Markdown Extended Features</title><link>https://emiblog.vercel.app/posts/markdown-extended/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/markdown-extended/</guid><description>Read more about Markdown features in Fuwari</description><pubDate>Wed, 01 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;GitHub Repository Cards&lt;/h2&gt;
&lt;p&gt;You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.&lt;/p&gt;
&lt;p&gt;::github{repo=&quot;Fabrizz/MMM-OnSpotify&quot;}&lt;/p&gt;
&lt;p&gt;Create a GitHub repository card with the code &lt;code&gt;::github{repo=&quot;&amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;&quot;}&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::github{repo=&quot;saicaca/fuwari&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Admonitions&lt;/h2&gt;
&lt;p&gt;Following types of admonitions are supported: &lt;code&gt;note&lt;/code&gt; &lt;code&gt;tip&lt;/code&gt; &lt;code&gt;important&lt;/code&gt; &lt;code&gt;warning&lt;/code&gt; &lt;code&gt;caution&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;:::note
Highlights information that users should take into account, even when skimming.
:::&lt;/p&gt;
&lt;p&gt;:::tip
Optional information to help a user be more successful.
:::&lt;/p&gt;
&lt;p&gt;:::important
Crucial information necessary for users to succeed.
:::&lt;/p&gt;
&lt;p&gt;:::warning
Critical content demanding immediate user attention due to potential risks.
:::&lt;/p&gt;
&lt;p&gt;:::caution
Negative potential consequences of an action.
:::&lt;/p&gt;
&lt;h3&gt;Basic Syntax&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;:::note
Highlights information that users should take into account, even when skimming.
:::

:::tip
Optional information to help a user be more successful.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Custom Titles&lt;/h3&gt;
&lt;p&gt;The title of the admonition can be customized.&lt;/p&gt;
&lt;p&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;GitHub Syntax&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
&lt;a href=&quot;https://github.com/orgs/community/discussions/16925&quot;&gt;The GitHub syntax&lt;/a&gt; is also supported.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; [!NOTE]
&amp;gt; The GitHub syntax is also supported.

&amp;gt; [!TIP]
&amp;gt; The GitHub syntax is also supported.
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Spoiler&lt;/h3&gt;
&lt;p&gt;You can add spoilers to your text. The text also supports &lt;strong&gt;Markdown&lt;/strong&gt; syntax.&lt;/p&gt;
&lt;p&gt;The content :spoiler[is hidden &lt;strong&gt;ayyy&lt;/strong&gt;]!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The content :spoiler[is hidden **ayyy**]!

&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Expressive Code Example</title><link>https://emiblog.vercel.app/posts/expressive-code/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/expressive-code/</guid><description>How code blocks look in Markdown using Expressive Code.</description><pubDate>Wed, 10 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here, we&apos;ll explore how code blocks look using &lt;a href=&quot;https://expressive-code.com/&quot;&gt;Expressive Code&lt;/a&gt;. The provided examples are based on the official documentation, which you can refer to for further details.&lt;/p&gt;
&lt;h2&gt;Expressive Code&lt;/h2&gt;
&lt;h3&gt;Syntax Highlighting&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/syntax-highlighting/&quot;&gt;Syntax Highlighting&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Regular syntax highlighting&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;This code is syntax highlighted!&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Rendering ANSI escape sequences&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;ANSI colors:
- Regular: [31mRed[0m [32mGreen[0m [33mYellow[0m [34mBlue[0m [35mMagenta[0m [36mCyan[0m
- Bold:    [1;31mRed[0m [1;32mGreen[0m [1;33mYellow[0m [1;34mBlue[0m [1;35mMagenta[0m [1;36mCyan[0m
- Dimmed:  [2;31mRed[0m [2;32mGreen[0m [2;33mYellow[0m [2;34mBlue[0m [2;35mMagenta[0m [2;36mCyan[0m

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

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

Text formatting: [1mBold[0m [2mDimmed[0m [3mItalic[0m [4mUnderline[0m
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Editor &amp;amp; Terminal Frames&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/frames/&quot;&gt;Editor &amp;amp; Terminal Frames&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Code editor frames&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;Title attribute example&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- src/content/index.html --&amp;gt;
&amp;lt;div&amp;gt;File name comment example&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Terminal frames&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;This terminal frame has no title&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;Write-Output &quot;This one has a title!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Overriding frame types&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;Look ma, no frame!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;# Without overriding, this would be a terminal frame
function Watch-Tail { Get-Content -Tail 20 -Wait $args }
New-Alias tail Watch-Tail
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Text &amp;amp; Line Markers&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/text-markers/&quot;&gt;Text &amp;amp; Line Markers&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Marking full lines &amp;amp; line ranges&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Line 1 - targeted by line number
// Line 2
// Line 3
// Line 4 - targeted by line number
// Line 5
// Line 6
// Line 7 - targeted by range &quot;7-8&quot;
// Line 8 - targeted by range &quot;7-8&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Selecting line marker types (mark, ins, del)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  console.log(&apos;this line is marked as deleted&apos;)
  // This line and the next one are marked as inserted
  console.log(&apos;this is the second inserted line&apos;)

  return &apos;this line uses the neutral default marker type&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Adding labels to line markers&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// labeled-line-markers.jsx
&amp;lt;button
  role=&quot;button&quot;
  {...props}
  value={value}
  className={buttonClassName}
  disabled={disabled}
  active={active}
&amp;gt;
  {children &amp;amp;&amp;amp;
    !active &amp;amp;&amp;amp;
    (typeof children === &apos;string&apos; ? &amp;lt;span&amp;gt;{children}&amp;lt;/span&amp;gt; : children)}
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Adding long labels on their own lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// labeled-line-markers.jsx
&amp;lt;button
  role=&quot;button&quot;
  {...props}

  value={value}
  className={buttonClassName}

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

  {children &amp;amp;&amp;amp;
    !active &amp;amp;&amp;amp;
    (typeof children === &apos;string&apos; ? &amp;lt;span&amp;gt;{children}&amp;lt;/span&amp;gt; : children)}
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Using diff-like syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;+this line will be marked as inserted
-this line will be marked as deleted
this is a regular line
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
+this is an actual diff file
-all contents will remain unmodified
 no whitespace will be removed either
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Combining syntax highlighting with diff-like syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;  function thisIsJavaScript() {
    // This entire block gets highlighted as JavaScript,
    // and we can still add diff markers to it!
-   console.log(&apos;Old code to be removed&apos;)
+   console.log(&apos;New and shiny code!&apos;)
  }
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Marking individual text inside lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  // Mark any given text inside lines
  return &apos;Multiple matches of the given text are supported&apos;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Regular expressions&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;The words yes and yep will be marked.&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Escaping forward slashes&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;Test&quot; &amp;gt; /home/test.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Selecting inline marker types (mark, ins, del)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  console.log(&apos;These are inserted and deleted marker types&apos;);
  // The return statement uses the default marker type
  return true;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Word Wrap&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/word-wrap/&quot;&gt;Word Wrap&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Configuring word wrap per block&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Example with wrap
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Example with wrap=false
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Configuring indentation of wrapped lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Example with preserveIndent (enabled by default)
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Example with preserveIndent=false
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Collapsible Sections&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/plugins/collapsible-sections/&quot;&gt;Collapsible Sections&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// All this boilerplate setup code will be collapsed
import { someBoilerplateEngine } from &apos;@example/some-boilerplate&apos;
import { evenMoreBoilerplate } from &apos;@example/even-more-boilerplate&apos;

const engine = someBoilerplateEngine(evenMoreBoilerplate())

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

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

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

// All this code until the end of the block will be collapsed again
engine.closeConnection()
engine.freeMemory()
engine.shutdown({ reason: &apos;End of example boilerplate code&apos; })
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Line Numbers&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/plugins/line-numbers/&quot;&gt;Line Numbers&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Displaying line numbers per block&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;// This code block will show line numbers
console.log(&apos;Greetings from line 2!&apos;)
console.log(&apos;I am on line 3&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Line numbers are disabled for this block
console.log(&apos;Hello?&apos;)
console.log(&apos;Sorry, do you know what line I am on?&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Changing the starting line number&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;Greetings from line 5!&apos;)
console.log(&apos;I am on line 6&apos;)
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Simple Guides for Fuwari</title><link>https://emiblog.vercel.app/posts/guide/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/guide/</guid><description>How to use this blog template.</description><pubDate>Mon, 01 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Cover image source: &lt;a href=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This blog template is built with &lt;a href=&quot;https://astro.build/&quot;&gt;Astro&lt;/a&gt;. For the things that are not mentioned in this guide, you may find the answers in the &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro Docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Front-matter of Posts&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The title of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;published&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The date the post was published.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A short description of the post. Displayed on index page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The cover image path of the post.&amp;lt;br/&amp;gt;1. Start with &lt;code&gt;http://&lt;/code&gt; or &lt;code&gt;https://&lt;/code&gt;: Use web image&amp;lt;br/&amp;gt;2. Start with &lt;code&gt;/&lt;/code&gt;: For image in &lt;code&gt;public&lt;/code&gt; dir&amp;lt;br/&amp;gt;3. With none of the prefixes: Relative to the markdown file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The tags of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;category&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The category of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;draft&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If this post is still a draft, which won&apos;t be displayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Where to Place the Post Files&lt;/h2&gt;
&lt;p&gt;Your post files should be placed in &lt;code&gt;src/content/posts/&lt;/code&gt; directory. You can also create sub-directories to better organize your posts and assets.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/content/posts/
├── post-1.md
└── post-2/
    ├── cover.png
    └── index.md
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Markdown Example</title><link>https://emiblog.vercel.app/posts/markdown/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/markdown/</guid><description>A simple example of a Markdown blog post.</description><pubDate>Sun, 01 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;An h1 header&lt;/h1&gt;
&lt;p&gt;Paragraphs are separated by a blank line.&lt;/p&gt;
&lt;p&gt;2nd paragraph. &lt;em&gt;Italic&lt;/em&gt;, &lt;strong&gt;bold&lt;/strong&gt;, and &lt;code&gt;monospace&lt;/code&gt;. Itemized lists
look like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;this one&lt;/li&gt;
&lt;li&gt;that one&lt;/li&gt;
&lt;li&gt;the other one&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Block quotes are
written like so.&lt;/p&gt;
&lt;p&gt;They can span multiple paragraphs,
if you like.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., &quot;it&apos;s all
in chapters 12--14&quot;). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺&lt;/p&gt;
&lt;h2&gt;An h2 header&lt;/h2&gt;
&lt;p&gt;Here&apos;s a numbered list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;first item&lt;/li&gt;
&lt;li&gt;second item&lt;/li&gt;
&lt;li&gt;third item&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here&apos;s a code sample:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define foobar() {
    print &quot;Welcome to flavor country!&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(which makes copying &amp;amp; pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import time
# Quick, count to ten!
for i in range(10):
    # (but not *too* quick)
    time.sleep(0.5)
    print i
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;An h3 header&lt;/h3&gt;
&lt;p&gt;Now a nested list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, get these ingredients:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;carrots&lt;/li&gt;
&lt;li&gt;celery&lt;/li&gt;
&lt;li&gt;lentils&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boil some water.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dump everything in the pot and follow
this algorithm:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; find wooden spoon
 uncover pot
 stir
 cover pot
 balance wooden spoon precariously on pot handle
 wait 10 minutes
 goto first step (or shut off burner when done)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do not bump wooden spoon or it will fall.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).&lt;/p&gt;
&lt;p&gt;Here&apos;s a link to &lt;a href=&quot;http://foo.bar&quot;&gt;a website&lt;/a&gt;, to a &lt;a href=&quot;local-doc.html&quot;&gt;local
doc&lt;/a&gt;, and to a &lt;a href=&quot;#an-h2-header&quot;&gt;section heading in the current
doc&lt;/a&gt;. Here&apos;s a footnote [^1].&lt;/p&gt;
&lt;p&gt;[^1]: Footnote text goes here.&lt;/p&gt;
&lt;p&gt;Tables can look like this:&lt;/p&gt;
&lt;p&gt;size material color&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;9 leather brown
10 hemp canvas natural
11 glass transparent&lt;/p&gt;
&lt;p&gt;Table: Shoes, their sizes, and what they&apos;re made of&lt;/p&gt;
&lt;p&gt;(The above is the caption for the table.) Pandoc also supports
multi-line tables:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;keyword text&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;red Sunsets, apples, and
other red or reddish
things.&lt;/p&gt;
&lt;p&gt;green Leaves, grass, frogs
and other things it&apos;s
not easy being.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;A horizontal rule follows.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Here&apos;s a definition list:&lt;/p&gt;
&lt;p&gt;apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There&apos;s no &quot;e&quot; in tomatoe.&lt;/p&gt;
&lt;p&gt;Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)&lt;/p&gt;
&lt;p&gt;Here&apos;s a &quot;line block&quot;:&lt;/p&gt;
&lt;p&gt;| Line one
| Line too
| Line tree&lt;/p&gt;
&lt;p&gt;and images can be specified like so:&lt;/p&gt;
&lt;p&gt;Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:&lt;/p&gt;
&lt;p&gt;$$I = \int \rho R^{2} dV$$&lt;/p&gt;
&lt;p&gt;$$
\begin{equation*}
\pi
=3.1415926535
;8979323846;2643383279;5028841971;6939937510;5820974944
;5923078164;0628620899;8628034825;3421170679;\ldots
\end{equation*}
$$&lt;/p&gt;
&lt;p&gt;And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.&lt;/p&gt;
</content:encoded></item><item><title>Include Video in the Posts</title><link>https://emiblog.vercel.app/posts/video/</link><guid isPermaLink="true">https://emiblog.vercel.app/posts/video/</guid><description>This post demonstrates how to include embedded video in a blog post.</description><pubDate>Tue, 01 Aug 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: Include Video in the Post
published: 2023-10-19
// ...
---

&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;YouTube&lt;/h2&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/p&gt;
&lt;h2&gt;Bilibili&lt;/h2&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;//player.bilibili.com/player.html?bvid=BV1fK4y1s7Qf&amp;amp;p=1&quot; scrolling=&quot;no&quot; border=&quot;0&quot; frameborder=&quot;no&quot; framespacing=&quot;0&quot; allowfullscreen=&quot;true&quot;&amp;gt; &amp;lt;/iframe&amp;gt;&lt;/p&gt;
</content:encoded></item></channel></rss>