<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://duke123123.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://duke123123.github.io/" rel="alternate" type="text/html" /><updated>2026-06-17T02:51:49+08:00</updated><id>https://duke123123.github.io/feed.xml</id><title type="html">滴墨</title><subtitle>木漏れ日的个人博客</subtitle><author><name>Dimo</name></author><entry><title type="html">周末去西湖喝杯龙井</title><link href="https://duke123123.github.io/2026/06/21/life-diary/" rel="alternate" type="text/html" title="周末去西湖喝杯龙井" /><published>2026-06-21T00:00:00+08:00</published><updated>2026-06-21T00:00:00+08:00</updated><id>https://duke123123.github.io/2026/06/21/life-diary</id><content type="html" xml:base="https://duke123123.github.io/2026/06/21/life-diary/"><![CDATA[<p>这周连续肝了几个大需求，趁着周末天气好，决定去西湖边走走。</p>

<p>找了一家靠湖的茶馆，点了一杯明前龙井。水墨主题博客的灵感，其实就源于这杯茶和眼前的这片湖光山色。</p>

<blockquote>
  <p>所谓“水墨”，不仅是一种视觉风格，更是一种留白的心境。在繁杂的代码世界里，我们也需要给自己留一点喘息的空间。</p>
</blockquote>

<p>下周一又要开始新的迭代了，但此刻，我只想看着湖面上的水波发呆。</p>

<p><img src="https://placehold.co/800x400/2f7068/f5f4ef.png?text=West+Lake" alt="西湖茶馆" /></p>]]></content><author><name>Dimo</name></author><category term="随笔" /><summary type="html"><![CDATA[短暂逃离代码，去湖边寻找一点宁静。]]></summary></entry><entry><title type="html">Vue 学习心得与避坑指南</title><link href="https://duke123123.github.io/2026/06/20/vue-thoughts/" rel="alternate" type="text/html" title="Vue 学习心得与避坑指南" /><published>2026-06-20T00:00:00+08:00</published><updated>2026-06-20T00:00:00+08:00</updated><id>https://duke123123.github.io/2026/06/20/vue-thoughts</id><content type="html" xml:base="https://duke123123.github.io/2026/06/20/vue-thoughts/"><![CDATA[<p>学完前两章的内容，我想跳出具体的代码细节，来谈谈我在实际项目中使用 Vue 的一些心得。</p>

<p>（注意：这篇例文虽然也属于 <code class="language-plaintext highlighter-rouge">vue教学</code> 分类，但它没有配置 <code class="language-plaintext highlighter-rouge">category_path</code>，所以它不会被收纳到具体的章节折叠面板中，而是会直接平铺在 <code class="language-plaintext highlighter-rouge">vue教学</code> 这个大类的最下方。）</p>

<h3 id="1-不要滥用-watcher">1. 不要滥用 Watcher</h3>

<p>很多初学者喜欢用 <code class="language-plaintext highlighter-rouge">watch</code> 来监听数据的变化并执行逻辑。但实际上，大多数情况下，你应该优先使用 <code class="language-plaintext highlighter-rouge">computed</code> 计算属性。<code class="language-plaintext highlighter-rouge">computed</code> 具有缓存机制，性能更好，而且代码意图更明确。</p>

<h3 id="2-组件拆分不要过度">2. 组件拆分不要过度</h3>

<p>虽然组件化很好，但把一个只有几十行代码、完全没有复用价值的区块硬拆成三个组件，只会增加状态管理的负担和代码阅读的成本。保持克制，在“可复用”和“好维护”之间找到平衡点。</p>

<p>希望这些小建议对你有所帮助！</p>]]></content><author><name>Dimo</name></author><category term="vue教学" /><summary type="html"><![CDATA[记录我在学习 Vue 过程中遇到的一些常见问题和心得体会。]]></summary></entry><entry><title type="html">Vue基础概念解析</title><link href="https://duke123123.github.io/2026/06/18/vue-basics/" rel="alternate" type="text/html" title="Vue基础概念解析" /><published>2026-06-18T00:00:00+08:00</published><updated>2026-06-18T00:00:00+08:00</updated><id>https://duke123123.github.io/2026/06/18/vue-basics</id><content type="html" xml:base="https://duke123123.github.io/2026/06/18/vue-basics/"><![CDATA[<p>欢迎来到《Vue教学》系列的第一章！</p>

<p>在这篇文章中，我们将探讨 Vue.js 的两大核心基石：<strong>响应式系统</strong>和<strong>虚拟 DOM</strong>。</p>

<h2 id="什么是响应式">什么是响应式？</h2>

<p>Vue 最独特的特性之一，是其非侵入性的响应式系统。数据模型仅仅是普通的 JavaScript 对象。而当你修改它们时，视图会进行更新。</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">app</span> <span class="o">=</span> <span class="nx">Vue</span><span class="p">.</span><span class="nx">createApp</span><span class="p">({</span>
  <span class="nx">data</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">return</span> <span class="p">{</span>
      <span class="na">message</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Hello Vue!</span><span class="dl">'</span>
    <span class="p">}</span>
  <span class="p">}</span>
<span class="p">})</span>
</code></pre></div></div>

<h2 id="虚拟-dom-的优势">虚拟 DOM 的优势</h2>

<p>虚拟 DOM (Virtual DOM) 允许我们在内存中以 JavaScript 对象的形式维护一份对真实 DOM 的描述，通过对比差异（Diff 算法）来最小化对真实 DOM 的操作，从而提升性能。</p>

<blockquote>
  <p>“在复杂的应用中，合理的利用虚拟 DOM 可以极大地减少直接操作 DOM 带来的性能损耗。”</p>
</blockquote>

<p>这也是为什么我们在开发大型 Vue 应用时，依然能保持丝滑体验的原因。</p>]]></content><author><name>Dimo</name></author><category term="vue教学" /><summary type="html"><![CDATA[深入浅出地讲解Vue的核心概念：响应式原理与虚拟DOM。]]></summary></entry><entry><title type="html">水墨风博客写作指南</title><link href="https://duke123123.github.io/2026/06/17/how-to-write/" rel="alternate" type="text/html" title="水墨风博客写作指南" /><published>2026-06-17T00:00:00+08:00</published><updated>2026-06-17T00:00:00+08:00</updated><id>https://duke123123.github.io/2026/06/17/how-to-write</id><content type="html" xml:base="https://duke123123.github.io/2026/06/17/how-to-write/"><![CDATA[<p>欢迎使用本博客！本博客基于 Jekyll 构建，采用了优雅的“水墨（Shuimo）”主题，并经过了一系列深度优化。</p>

<p>本文将向你展示如何在这里优雅地创作文章。</p>

<h2 id="1-文章结构-front-matter">1. 文章结构 (Front Matter)</h2>

<p>每一篇文章的开头都需要有一段 YAML 格式的配置信息，我们称之为 Front Matter。这是一篇文章的“骨架”。</p>

<p>新建文章时，在 <code class="language-plaintext highlighter-rouge">_posts/</code> 目录下创建一个命名格式为 <code class="language-plaintext highlighter-rouge">YYYY-MM-DD-你的标题拼音.md</code> 的文件，然后在文件开头写入：</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">layout</span><span class="pi">:</span> <span class="s">post</span>
<span class="na">title</span><span class="pi">:</span> <span class="s2">"</span><span class="s">你的文章标题"</span>
<span class="na">category_path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">开发/前端/React"</span>  <span class="c1"># 树状分类路径</span>
<span class="na">cover</span><span class="pi">:</span> <span class="s2">"</span><span class="s">https://你的图片地址.png"</span> <span class="c1"># 封面图（可选）</span>
<span class="na">description</span><span class="pi">:</span> <span class="s2">"</span><span class="s">文章的一句话简介，用于</span><span class="nv"> </span><span class="s">SEO</span><span class="nv"> </span><span class="s">和列表展示。"</span>
<span class="na">keywords</span><span class="pi">:</span> <span class="s2">"</span><span class="s">标签1,</span><span class="nv"> </span><span class="s">标签2"</span>
<span class="nn">---</span>
</code></pre></div></div>

<h3 id="关于-category_path">关于 <code class="language-plaintext highlighter-rouge">category_path</code></h3>
<p>这是我们特别优化的功能。你可以通过斜杠 <code class="language-plaintext highlighter-rouge">/</code> 来定义多级分类，比如 <code class="language-plaintext highlighter-rouge">随笔/生活/2026</code>。这会自动在“分类”页面生成可折叠的树状菜单，并且文章底部的“上一篇/下一篇”会优先推荐同一路径下的文章。</p>

<h2 id="2-插入图片-自动-webp">2. 插入图片 (自动 WebP)</h2>

<p>你完全不需要担心图片格式和体积问题！</p>

<p>你只需要像平常写 Markdown 一样插入本地的 <code class="language-plaintext highlighter-rouge">png</code> 或 <code class="language-plaintext highlighter-rouge">jpg</code> 图片：</p>

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">![</span><span class="nv">美丽的风景</span><span class="p">](</span><span class="sx">/assets/images/scenery.jpg</span><span class="p">)</span>
</code></pre></div></div>

<p><strong>发生了什么？</strong> 
当你推送到 GitHub 后，我们配置好的后台机器人（GitHub Actions）会自动拦截这张图片，将其无损压缩并转换为体积更小的 <code class="language-plaintext highlighter-rouge">WebP</code> 格式，同时悄悄把你文章里的链接也改掉。
<strong>你只管贴图，剩下的交给我们。</strong></p>

<h2 id="3-归档与时间线">3. 归档与时间线</h2>

<p>你可能注意到了本博客独特的“归档”页面。
所有的文章都会自动按照<strong>年份</strong>收纳进折叠面板中。年份节点旁边的圆点，当你把鼠标悬停上去时，会呈现出一种<strong>水墨晕染扩散</strong>的呼吸感动效。</p>

<p>这一切都不需要你额外配置，只要写文章，时间线就会自动生成。</p>

<h2 id="4-图表与代码">4. 图表与代码</h2>

<p>作为一个科技与文艺并重的博客，我们内置了对程序员极其友好的功能。</p>

<h3 id="代码高亮">代码高亮</h3>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// 你的代码会自动拥有优雅的高亮配色和一键复制按钮</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="dl">"</span><span class="s2">Hello, Shuimo!</span><span class="dl">"</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="mermaid-矢量图">Mermaid 矢量图</h3>
<p>你可以直接在 Markdown 中画流程图，它们会被自动渲染成符合当前主题颜色（墨青色）的矢量图：</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>` ``mermaid
graph TD
    A[构思] --&gt; B(写作)
    B --&gt; C{是否配图?}
    C --&gt;|是| D[上传 PNG/JPG]
    C --&gt;|否| E[发布]
    D --&gt; E
    E --&gt; F[自动转为 WebP 并上线]
` ``
</code></pre></div></div>

<p><em>(注意：实际书写时请去掉 ` ``` ` 之间的空格)</em></p>

<h2 id="5-发布文章">5. 发布文章</h2>

<p>完成写作后，只需将 <code class="language-plaintext highlighter-rouge">.md</code> 文件提交并 Push 到 GitHub 仓库的 <code class="language-plaintext highlighter-rouge">main</code> 分支。
我们的自动化工作流将在几分钟内完成构建，你的文章就会带着最完美的排版和最优化的图片，呈现在读者面前。</p>

<p>祝你创作愉快！</p>]]></content><author><name>Dimo</name></author><summary type="html"><![CDATA[一篇关于如何使用 Markdown 在本博客优雅创作的详细教程。]]></summary></entry></feed>