<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://blog.zgqinc.gq/feed.xml" rel="self" type="application/atom+xml" /><link href="https://blog.zgqinc.gq/" rel="alternate" type="text/html" hreflang="zh-CN" /><updated>2026-07-31T12:45:27+08:00</updated><id>https://blog.zgqinc.gq/feed.xml</id><title type="html">ZGQ’s Blog</title><subtitle>记录技术、生活与思考 · A developer&apos;s digital garden</subtitle><author><name>ZGQ</name></author><entry><title type="html">Jekyll + Cloudflare + Telegram 博客系统上线了！</title><link href="https://blog.zgqinc.gq/posts/hello-world/" rel="alternate" type="text/html" title="Jekyll + Cloudflare + Telegram 博客系统上线了！" /><published>2026-07-31T10:00:00+08:00</published><updated>2026-07-31T10:00:00+08:00</updated><id>https://blog.zgqinc.gq/posts/hello-world</id><content type="html" xml:base="https://blog.zgqinc.gq/posts/hello-world/"><![CDATA[<h2 id="为什么做这个">为什么做这个？</h2>

<p>一直想要一个真正「属于自己」的博客，不依赖任何第三方平台，数据完全掌控在手里。同时，作为一个重度 Telegram 用户，希望能在 TG 频道里也能看到博客更新，甚至直接在 Telegram 里发文章。</p>

<p>于是就有了这套系统。</p>

<h2 id="技术架构">技术架构</h2>

<h3 id="前端">前端</h3>

<ul>
  <li><strong>Jekyll</strong>：静态网站生成器，Markdown 写作，Git 管理</li>
  <li><strong>Material Design 3</strong>：Google 最新设计规范，完整 Monet 色彩系统</li>
  <li><strong>Glassmorphism</strong>：毛玻璃效果侧边栏 + 顶部导航</li>
  <li><strong>Cloudflare Pages</strong>：全球 CDN 托管，秒级部署</li>
</ul>

<h3 id="后端">后端</h3>

<ul>
  <li><strong>Cloudflare Worker</strong>：TypeScript 编写，处理所有 API 请求</li>
  <li><strong>Cloudflare D1</strong>：SQLite 兼容的 Serverless 数据库，存储文章与 TG 消息的映射</li>
  <li><strong>Cloudflare R2</strong>：对象存储，保存 Telegram 上传的媒体文件</li>
</ul>

<h3 id="自动化">自动化</h3>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
</pre></td><td class="rouge-code"><pre><span class="c1"># 发布流程 (Git Push → Telegram)</span>
<span class="s">Push to GitHub</span>
  <span class="s">→ GitHub Actions</span><span class="err">:</span> <span class="s">Jekyll Build</span>
  <span class="s">→ Cloudflare Pages</span><span class="err">:</span> <span class="s">静态部署</span>
  <span class="s">→ Worker /api/notify</span><span class="err">:</span> <span class="s">推送 TG 频道</span>
  <span class="s">→ D1</span><span class="err">:</span> <span class="s">记录 post_id ↔ message_id</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h2 id="双向发布工作流">双向发布工作流</h2>

<h3 id="方式一vs-code--git-push标准流程">方式一：VS Code + Git Push（标准流程）</h3>

<ol>
  <li>在 <code class="language-plaintext highlighter-rouge">_posts/</code> 目录下创建 Markdown 文件</li>
  <li>Front Matter 填写 <code class="language-plaintext highlighter-rouge">id</code>, <code class="language-plaintext highlighter-rouge">summary</code>, <code class="language-plaintext highlighter-rouge">tags</code></li>
  <li><code class="language-plaintext highlighter-rouge">git push</code> 触发 GitHub Actions</li>
  <li>Actions 自动部署 + 推送 TG 摘要</li>
</ol>

<h3 id="方式二telegram-bot-直发">方式二：Telegram Bot 直发</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre>/post 2026-002|文章标题|这是摘要|Tag1,Tag2
</pre></td></tr></tbody></table></code></pre></div></div>

<p>Bot 会自动：</p>
<ul>
  <li>如果附带图片/文件 → 上传到 R2</li>
  <li>生成 Markdown 文件 → 提交到 GitHub</li>
  <li>推送摘要到 TG 频道</li>
  <li>写入 D1 数据库</li>
</ul>

<h2 id="主题系统">主题系统</h2>

<p>支持 <strong>6 种 Monet 色彩方案</strong> + 亮/暗/跟随系统三种模式：</p>

<table>
  <thead>
    <tr>
      <th>方案</th>
      <th>主色</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>🔵 海洋蓝</td>
      <td>#0061A4</td>
    </tr>
    <tr>
      <td>💜 紫色梦境</td>
      <td>#6750A4</td>
    </tr>
    <tr>
      <td>🌿 森林绿意</td>
      <td>#006E2C</td>
    </tr>
    <tr>
      <td>🍊 秋日橙光</td>
      <td>#9D4000</td>
    </tr>
    <tr>
      <td>🌹 玫瑰红</td>
      <td>#B3261E</td>
    </tr>
    <tr>
      <td>🩵 青色清风</td>
      <td>#006A6A</td>
    </tr>
  </tbody>
</table>

<p>点击右上角调色板图标即可切换，设置持久化到 localStorage。</p>

<h2 id="接下来">接下来</h2>

<ul class="task-list">
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />搜索功能优化（algolia 或 pagefind）</li>
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />文章阅读量统计（D1 + Worker）</li>
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />更多 Telegram Bot 指令</li>
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />RSS to TG 频道自动转发</li>
</ul>

<p>欢迎在 Telegram 频道留言交流！</p>]]></content><author><name>ZGQ</name></author><category term="Tech" /><category term="Jekyll" /><category term="Cloudflare" /><category term="Telegram" /><category term="Serverless" /><summary type="html"><![CDATA[为什么做这个？]]></summary></entry></feed>