<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Yong 的博客</title>
  <subtitle>Yong 的个人博客：Agent、工具、短剧和生活里真做过的事。</subtitle>
  <link href="https://yong.best/atom.xml" rel="self"/>
  <link href="https://yong.best/"/>
  <id>https://yong.best/</id>
  <updated>2026-11-30T00:00:00+08:00</updated>
  <author><name>Yong</name></author>
  <entry>
    <title>这个博客是怎么搭起来的</title>
    <link href="https://yong.best/posts/hello-blog/"/>
    <id>https://yong.best/posts/hello-blog/</id>
    <updated>2026-11-30T00:00:00+08:00</updated>
    <summary>一台美国 VPS、一个 Caddy、一个三百来行的 Python 脚本：写一篇 Markdown，敲一条命令，文章就上线。</summary>
    <content type="html">&lt;p&gt;想要一个自己的博客，要求只有两条：&lt;strong&gt;不用登录就能看&lt;/strong&gt;，&lt;strong&gt;发文章不麻烦&lt;/strong&gt;。最后的做法很朴素。&lt;/p&gt;
&lt;h2 id=&quot;_1&quot;&gt;结构&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;文章是 &lt;code&gt;posts/&lt;/code&gt; 目录下的 Markdown 文件，文件名带日期，比如 &lt;code&gt;2026-11-30-hello-blog.md&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;一个 Python 脚本把它们生成成纯静态页面：首页、文章页、归档、标签、RSS。&lt;/li&gt;
&lt;li&gt;生成好的页面用 &lt;code&gt;rsync&lt;/code&gt; 推到 VPS，由 &lt;a href=&quot;https://caddyserver.com/&quot;&gt;Caddy&lt;/a&gt; 直接当静态文件发出去，HTTPS 证书它自己申请和续期。&lt;/li&gt;
&lt;li&gt;域名的 DNS 放在 Cloudflare，一条 A 记录指向 VPS。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;没有数据库，没有后台，没有评论系统。服务器上只有一堆 HTML 文件，出问题的地方很少。&lt;/p&gt;
&lt;h2 id=&quot;_2&quot;&gt;发一篇文章&lt;/h2&gt;
&lt;p&gt;新建一个 Markdown 文件，开头写几行元信息：&lt;/p&gt;
&lt;div class=&quot;codehilite&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;---
title: 标题
date: 2026-11-30
summary: 列表里显示的一句话
&lt;span class=&quot;gu&quot;&gt;tags: Agent, 工具&lt;/span&gt;
&lt;span class=&quot;gu&quot;&gt;---&lt;/span&gt;

正文……
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;然后一条命令：&lt;/p&gt;
&lt;div class=&quot;codehilite&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;bin/blog&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;publish
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;它会重新生成整站、推到服务器。写草稿时加一行 &lt;code&gt;draft: true&lt;/code&gt;，就只在本地预览里出现。&lt;/p&gt;
&lt;h2 id=&quot;_3&quot;&gt;样式&lt;/h2&gt;
&lt;p&gt;配色和字体是用 &lt;a href=&quot;https://github.com/Leonxlnx/taste-skill&quot;&gt;taste-skill&lt;/a&gt; 发牌发出来的：暖石灰底、深棕字、一个绿色强调色，西文用 Onest，中文交给系统黑体。悬停时卡片轻轻上浮、标题下划线画出来，首屏只在打开时入场一次，其他地方都不动。&lt;/p&gt;
&lt;p&gt;能读、好读，就够了。&lt;/p&gt;</content>
  </entry>
</feed>
