<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>songling715</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <id>https://songling715.pages.dev/</id>
  <link href="https://songling715.pages.dev/" rel="alternate"/>
  <link href="https://songling715.pages.dev/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, songling715</rights>
  <subtitle>记录 · 思考 · 沉淀</subtitle>
  <title>songling715 的博客</title>
  <updated>2026-11-24T08:33:15.651Z</updated>
  <entry>
    <author>
      <name>songling715</name>
    </author>
    <category term="折腾" scheme="https://songling715.pages.dev/categories/%E6%8A%98%E8%85%BE/"/>
    <category term="Hexo" scheme="https://songling715.pages.dev/tags/Hexo/"/>
    <category term="Cloudflare" scheme="https://songling715.pages.dev/tags/Cloudflare/"/>
    <category term="建站" scheme="https://songling715.pages.dev/tags/%E5%BB%BA%E7%AB%99/"/>
    <content>
      <![CDATA[<p>这个博客的整套东西：<strong>Hexo 生成静态页 + Argon 主题 + Cloudflare Pages 托管</strong>。没有服务器、没有数据库、没有续费提醒，一年的固定成本是 0 元。</p><p>顺手把关键环节记下来，免得下次换电脑又从头查一遍。</p><span id="more"></span><h2 id="为什么不用-WordPress"><a href="#为什么不用-WordPress" class="headerlink" title="为什么不用 WordPress"></a>为什么不用 WordPress</h2><p>一开始看的教程给的是 WordPress 源码，WordPress 的 Argon 主题确实好看，但它要求 PHP + MySQL 常驻运行。免费的 PHP 主机要么隔三差五挂掉，要么带广告、限速、跑不动；想稳定就只能买服务器，一年几百块起步，还得自己防渗透、打补丁、备份。</p><p>静态站把这堆问题一次性绕开了：页面在本地生成成纯 HTML，托管方只负责分发文件。没有可执行的后端，就没有后台被拖库、被挂马的问题。</p><h2 id="技术栈"><a href="#技术栈" class="headerlink" title="技术栈"></a>技术栈</h2><table><thead><tr><th>环节</th><th>选择</th><th>说明</th></tr></thead><tbody><tr><td>生成器</td><td>Hexo 7</td><td>Node 生态，Markdown 写作，构建秒级</td></tr><tr><td>主题</td><td><a href="https://github.com/solstice23/hexo-theme-argon">Argon</a></td><td>与 WordPress 版 Argon 同一作者，界面一致</td></tr><tr><td>托管</td><td>Cloudflare Pages</td><td>免费额度够用，全球 CDN，自带 HTTPS</td></tr><tr><td>部署</td><td><code>wrangler</code> 直传</td><td>一条命令，几十秒上线</td></tr></tbody></table><h2 id="写作流程"><a href="#写作流程" class="headerlink" title="写作流程"></a>写作流程</h2><p>新建一篇文章：</p><pre><code class="bash">npx hexo new &quot;文章标题&quot;</code></pre><p>这会在 <code>source/_posts/</code> 下生成一个 Markdown 文件，写好内容后本地预览：</p><pre><code class="bash">npx hexo server</code></pre><p>打开 <code>http://localhost:4000</code> 看效果。确认没问题就发布：</p><pre><code class="bash">npm run deploy</code></pre><p><code>deploy</code> 会先生成静态文件，再把 <code>public/</code> 目录整体推到 Cloudflare Pages，几秒钟后线上就是新的。</p><h2 id="目录结构"><a href="#目录结构" class="headerlink" title="目录结构"></a>目录结构</h2><pre><code class="text">blog/├── _config.yml          # 站点配置：标题、URL、分页├── package.json         # 依赖与命令├── scaffolds/           # 新建文章的模板├── source/│   ├── _data/argon.yml  # 主题配置（改这里，主题更新不会覆盖）│   ├── _posts/          # 所有文章│   ├── about/           # 关于页│   ├── message/         # 留言板│   └── img/             # 图片素材└── themes/argon/        # 主题本体，一般不动</code></pre><h2 id="几个容易踩的点"><a href="#几个容易踩的点" class="headerlink" title="几个容易踩的点"></a>几个容易踩的点</h2><p><strong>别直接改 <code>themes/argon/_config.yml</code>。</strong> 主题一更新，改动就没了。所有配置都写在 <code>source/_data/argon.yml</code> 里，Hexo 会用它覆盖主题默认值。</p><p><strong>图片先压再用。</strong> 首页横幅原图 1.4 MB，压到 35 KB 之后国内打开快了一个量级。文章里的截图同理，PNG 换 WebP 或者 JPEG，肉眼几乎看不出差别。</p><p><strong><code>_config.yml</code> 里的 <code>url</code> 要写对。</strong> RSS、站点地图、分享链接都靠它拼绝对地址，写错了分享出去就是死链。</p><h2 id="成本"><a href="#成本" class="headerlink" title="成本"></a>成本</h2><p>域名可以先用平台送的二级域名，一直免费。想换成自己的域名，一年几十块，是这套方案里唯一可能花钱的地方——而且不换也完全能用。</p><p>写博客真正贵的是持续产出的时间，其他的都能省。</p>]]>
    </content>
    <id>https://songling715.pages.dev/2026/11/24/how-this-blog-works/</id>
    <link href="https://songling715.pages.dev/2026/11/24/how-this-blog-works/"/>
    <published>2026-11-24T09:10:00.000Z</published>
    <summary>
      <![CDATA[<p>这个博客的整套东西：<strong>Hexo 生成静态页 + Argon 主题 + Cloudflare Pages 托管</strong>。没有服务器、没有数据库、没有续费提醒，一年的固定成本是 0 元。</p>
<p>顺手把关键环节记下来，免得下次换电脑又从头查一遍。</p>]]>
    </summary>
    <title>本站是怎么搭起来的</title>
    <updated>2026-11-24T08:33:15.651Z</updated>
  </entry>
  <entry>
    <author>
      <name>songling715</name>
    </author>
    <category term="随笔" scheme="https://songling715.pages.dev/categories/%E9%9A%8F%E7%AC%94/"/>
    <category term="开站" scheme="https://songling715.pages.dev/tags/%E5%BC%80%E7%AB%99/"/>
    <content>
      <![CDATA[<p>这里是我的新博客。</p><p>以前看完文档、踩完坑，笔记散落在各个本地文件夹和聊天记录里，回头再找的时候几乎等于丢了。所以干脆搭个自己的地方，把学到的东西写下来——写下来的过程，本身就是把知识重新过一遍脑子。</p><span id="more"></span><h2 id="这里会有什么"><a href="#这里会有什么" class="headerlink" title="这里会有什么"></a>这里会有什么</h2><ul><li><strong>技术笔记</strong>：学习路径、工具用法、踩坑记录，尽量写到“三个月后的自己能看懂”的程度。</li><li><strong>折腾实录</strong>：服务器、博客、自动化、各种半路弃坑又捡起来的小项目。</li><li><strong>一些想法</strong>：读书、效率、以及对某些事的看法，不那么技术的那部分。</li></ul><h2 id="关于这个站点"><a href="#关于这个站点" class="headerlink" title="关于这个站点"></a>关于这个站点</h2><p>静态生成、全球 CDN、零服务器成本，具体怎么搭的写在另一篇文章里：<a href="/2026/11/24/how-this-blog-works/">本站是怎么搭起来的</a>。</p><h2 id="怎么联系我"><a href="#怎么联系我" class="headerlink" title="怎么联系我"></a>怎么联系我</h2><p>侧边栏有 GitHub 和 Bilibili，有问题欢迎在评论区或者留言板聊。</p><p>写博客这件事，最难的从来不是搭建，而是持续地写。那就从这一篇开始吧。</p>]]>
    </content>
    <id>https://songling715.pages.dev/2026/11/24/hello-world/</id>
    <link href="https://songling715.pages.dev/2026/11/24/hello-world/"/>
    <published>2026-11-24T08:30:00.000Z</published>
    <summary>
      <![CDATA[<p>这里是我的新博客。</p>
<p>以前看完文档、踩完坑，笔记散落在各个本地文件夹和聊天记录里，回头再找的时候几乎等于丢了。所以干脆搭个自己的地方，把学到的东西写下来——写下来的过程，本身就是把知识重新过一遍脑子。</p>]]>
    </summary>
    <title>你好，世界</title>
    <updated>2026-11-24T08:33:07.676Z</updated>
  </entry>
</feed>
