<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>我的个人博客</title>
  <subtitle>记录技术、思考与生活 —— 一个用 Markdown 写的纯静态博客</subtitle>
  <link href="https://zhefeng.eu.org/"/>
  <link rel="self" href="https://zhefeng.eu.org/atom.xml"/>
  <id>https://zhefeng.eu.org/</id>
  <updated>2026-10-22T00:00:00Z</updated>
  <entry>
    <title>欢迎来到我的博客</title>
    <link href="https://zhefeng.eu.org/posts/welcome.html"/>
    <id>https://zhefeng.eu.org/posts/welcome.html</id>
    <updated>2026-10-22T00:00:00Z</updated>
    <summary>这是用纯静态博客生成器搭建的第一篇文章，介绍这个站点是怎么来的。</summary>
    <content type="html"><h1 id="_1">欢迎来到我的博客</h1>
<p>这是站点的第一篇文章。整个站点是用 <strong>Markdown 写文章 + 本地生成器</strong> 产出的纯静态网站，部署到任何支持静态文件的服务器（Nginx / Apache / 对象存储）都能跑。</p>
<h2 id="_2">这个博客有什么特点</h2>
<ul>
<li><strong>零运行时依赖</strong>：服务器上不需要 Node、Python 或数据库。</li>
<li><strong>写作即发布</strong>：你只管写 <code>.md</code> 文件，运行一下生成脚本即可得到整站。</li>
<li><strong>快</strong>：纯静态，加载速度极快，SEO 友好。</li>
</ul>
<blockquote>
<p>简单，往往是最可靠的方案。</p>
</blockquote>
<h2 id="_3">接下来</h2>
<p>下面这篇《如何写一篇文章》会告诉你文章怎么写、放在哪、怎么生成。把示例文章删掉，换成你自己的内容即可。</p></content>
  </entry>
  <entry>
    <title>如何写一篇文章</title>
    <link href="https://zhefeng.eu.org/posts/how-to-write.html"/>
    <id>https://zhefeng.eu.org/posts/how-to-write.html</id>
    <updated>2026-10-21T00:00:00Z</updated>
    <summary>三步发布新文章：新建 Markdown 文件、填写头部信息、运行生成命令。</summary>
    <content type="html"><h1 id="_1">如何写一篇文章</h1>
<p>发布新文章只需要三步。</p>
<h2 id="1">1. 新建文件</h2>
<p>在 <code>content/posts/</code> 目录下新建一个 <code>.md</code> 文件，建议文件名带上日期前缀，例如：</p>
<pre><code>content/posts/2026-10-21-my-first-post.md
</code></pre>
<h2 id="2-frontmatter">2. 填写头部信息（frontmatter）</h2>
<p>文件最顶部用 <code>---</code> 包裹一段 YAML 信息：</p>
<pre><code class="language-yaml">---
title: &quot;文章标题&quot;
date: 2026-10-21
tags: [标签1, 标签2]
summary: &quot;一句话摘要，会显示在首页和 RSS 里&quot;
---
</code></pre>
<h2 id="3">3. 写正文并生成</h2>
<p>头部下面就是正文，支持标准 Markdown 语法。写完后在项目根目录运行：</p>
<pre><code class="language-bash">python build.py
</code></pre>
<p>生成的整站会出现在 <code>public/</code> 目录，把它上传到服务器即可。</p>
<h2 id="_2">支持哪些语法</h2>
<ul>
<li>标题、列表、引用、分割线</li>
<li><strong>加粗</strong>、<em>斜体</em>、<code>行内代码</code></li>
<li>代码块（带等宽字体与边框）</li>
<li>链接与图片</li>
</ul>
<p>就这么简单，去写你的第一篇吧。</p></content>
  </entry>
  <entry>
    <title>部署到云服务器的一些笔记</title>
    <link href="https://zhefeng.eu.org/posts/deploy-notes.html"/>
    <id>https://zhefeng.eu.org/posts/deploy-notes.html</id>
    <updated>2026-10-20T00:00:00Z</updated>
    <summary>记录把纯静态站点部署到 Linux + Nginx 的关键步骤与常见坑。</summary>
    <content type="html"><h1 id="_1">部署到云服务器的一些笔记</h1>
<p>纯静态站点部署的核心就一句话：<strong>把 <code>public/</code> 传到网站根目录，用 Nginx 指过去</strong>。</p>
<h2 id="_2">关键步骤</h2>
<ol>
<li>在服务器安装 Nginx（<code>apt install nginx</code> 或 <code>yum install nginx</code>）。</li>
<li>把 <code>public/</code> 内容传到 <code>/var/www/your-domain/</code>。</li>
<li>配置一个 server 块，root 指向该目录，<code>index index.html</code>。</li>
<li>域名 A 记录解析到服务器公网 IP。</li>
<li>（可选）用 Let's Encrypt 申请免费 HTTPS 证书。</li>
</ol>
<h2 id="nginx">一个最小 Nginx 配置</h2>
<pre><code class="language-nginx">server {
    listen 80;
    server_name your-domain.com www.your-domain.com;
    root /var/www/your-domain;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }
}
</code></pre>
<h2 id="_3">常见坑</h2>
<ul>
<li>防火墙/安全组没放行 80/443 端口 → 浏览器打不开。</li>
<li>域名没解析或 TTL 未生效 → 等几分钟再试。</li>
<li>文件权限不对 → 保证 Nginx 用户能读取网站目录。</li>
</ul>
<blockquote>
<p>部署遇到问题时，先看 Nginx 错误日志：<code>tail -f /var/log/nginx/error.log</code>。</p>
</blockquote></content>
  </entry>
</feed>