<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://firefly.cuteleaf.cn/</id>
  <title type="text">Firefly</title>
  <subtitle type="text">Demo site</subtitle>
  <updated>2026-09-17T00:00:00.000Z</updated>
  <author><name>FengQiu</name></author>
  <link rel="alternate" href="https://firefly.cuteleaf.cn/"/>
  <link rel="self" href="https://firefly.cuteleaf.cn/atom.xml"/>
  <generator uri="https://github.com/CuteLeaf/Firefly">Firefly v6.16.8</generator>
    <entry>
      <id>https://firefly.cuteleaf.cn/posts/2026-09-19-091027/</id>
      <title type="text">第一次使用 Firefly</title>
      <published>2026-09-17T00:00:00.000Z</published>
      <updated>2026-09-17T00:00:00.000Z</updated>
      <author><name>FengQiu</name></author>
      <link rel="alternate" href="https://firefly.cuteleaf.cn/posts/2026-09-19-091027/"/>
      <summary type="text">第一次使用 Firefly 博客模板。</summary>
      <content type="html"><![CDATA[<p>这个博客模板是基于 <a href="https://astro.build/" target="_blank">Astro</a> 构建的。对于本指南中未提及的内容，您可以在 <a href="https://docs.astro.build/" target="_blank">Astro 文档</a> 中找到答案。</p>
<section><h2>文章的 Front-matter<a href="#文章的-front-matter"><span>#</span></a></h2><div><figure><figcaption></figcaption><pre><code><div><div><div>1</div></div><div><span>---</span></div></div><div><div><div>2</div></div><div><span>title</span><span>: </span><span>我的第一篇博客文章</span></div></div><div><div><div>3</div></div><div><span>published</span><span>: </span><span>2023-09-09</span></div></div><div><div><div>4</div></div><div><span>description</span><span>: </span><span>这是我新 Astro 博客的第一篇文章。</span></div></div><div><div><div>5</div></div><div><span>image</span><span>: </span><span>./cover.jpg</span></div></div><div><div><div>6</div></div><div><span>tags</span><span>: [</span><span>前端</span><span>, </span><span>开发</span><span>]</span></div></div><div><div><div>7</div></div><div><span>category</span><span>: </span><span>前端开发</span></div></div><div><div><div>8</div></div><div><span>draft</span><span>: </span><span>false</span></div></div><div><div><div>9</div></div><div><span>---</span></div></div></code></pre><div><div></div><div></div></div></figure></div>

<table><thead><tr><th>属性</th><th>描述</th></tr></thead><tbody><tr><td><code>title</code></td><td>文章标题。</td></tr><tr><td><code>published</code></td><td>文章发布日期。</td></tr><tr><td><code>updated</code></td><td>文章更新日期。如果未设置，将默认使用发布日期。</td></tr><tr><td><code>pinned</code></td><td>是否将此文章置顶在文章列表顶部。</td></tr><tr><td><code>description</code></td><td>文章的简短描述。显示在首页上。</td></tr><tr><td><code>image</code></td><td>文章封面图片路径。<br />1. 以 <code>http://</code> 或 <code>https://</code> 开头：使用网络图片<br />2. 以 <code>/</code> 开头：<code>public</code> 目录中的图片<br />3. 不带任何前缀：相对于 markdown 文件的路径</td></tr><tr><td><code>tags</code></td><td>文章标签。</td></tr><tr><td><code>category</code></td><td>文章分类。</td></tr><tr><td><code>lang</code></td><td>文章语言代码（如 <code>zh-CN</code>）。仅当文章语言与站点默认语言不同时设置。</td></tr><tr><td><code>licenseName</code></td><td>文章内容的许可证名称。</td></tr><tr><td><code>licenseUrl</code></td><td>文章内容的许可证链接。</td></tr><tr><td><code>author</code></td><td>文章作者。</td></tr><tr><td><code>sourceLink</code></td><td>文章内容的来源链接或参考。</td></tr><tr><td><code>draft</code></td><td>如果这篇文章仍是草稿，则不会显示。</td></tr><tr><td><code>comment</code></td><td>是否启用此文章的评论功能。默认为 <code>true</code>。</td></tr><tr><td><code>slug</code></td><td>自定义文章 URL 路径。如果不设置，将使用文件名作为 URL。</td></tr><tr><td><code>password</code></td><td>文章密码。设置后文章内容将被 AES-256-GCM 加密，访客需输入密码才能查看。</td></tr><tr><td><code>passwordHint</code></td><td>密码提示。显示在密码输入框上方，帮助访客回忆密码，也可以不加。</td></tr></tbody></table></section>
<section><h2>文章文件的放置位置<a href="#文章文件的放置位置"><span>#</span></a></h2><p>您的文章文件应放置在 <code>src/content/posts/</code> 目录中。您也可以创建子目录来更好地组织您的文章和资源。</p><div><figure><figcaption></figcaption><pre><code><div><div><div>1</div></div><div><span>src/content/posts/</span></div></div><div><div><div>2</div></div><div><span>├── post-1.md</span></div></div><div><div><div>3</div></div><div><span>└── post-2/</span></div></div><div><div><div>4</div></div><div><span><span>    </span></span><span>├── cover.png</span></div></div><div><div><div>5</div></div><div><span><span>    </span></span><span>└── index.md</span></div></div></code></pre><div><div></div><div></div></div></figure></div></section>
<section><h2>自定义文章 URL (Slug)<a href="#自定义文章-url-slug"><span>#</span></a></h2><section><h3>什么是 Slug？<a href="#什么是-slug"><span>#</span></a></h3><p>Slug 是文章 URL 路径的自定义部分。如果不设置 slug，系统将使用文件名作为 URL。</p></section><section><h3>Slug 使用示例<a href="#slug-使用示例"><span>#</span></a></h3><section><h4>示例 1：使用文件名作为 URL<a href="#示例-1使用文件名作为-url"><span>#</span></a></h4><div><figure><figcaption></figcaption><pre><code><div><div><div>1</div></div><div><span>---</span></div></div><div><div><div>2</div></div><div><span>title</span><span>: </span><span>我的第一篇博客文章</span></div></div><div><div><div>3</div></div><div><span>published</span><span>: </span><span>2023-09-09</span></div></div><div><div><div>4</div></div><div><span>---</span></div></div></code></pre><div><div></div><div></div></div></figure></div><p>文件：<code>src/content/posts/my-first-blog-post.md</code></p><p>URL：<code>/posts/my-first-blog-post</code></p></section><section><h4>示例 2：自定义 Slug<a href="#示例-2自定义-slug"><span>#</span></a></h4><div><figure><figcaption></figcaption><pre><code><div><div><div>1</div></div><div><span>---</span></div></div><div><div><div>2</div></div><div><span>title</span><span>: </span><span>我的第一篇博客文章</span></div></div><div><div><div>3</div></div><div><span>published</span><span>: </span><span>2023-09-09</span></div></div><div><div><div>4</div></div><div><span>slug</span><span>: </span><span>hello-world</span></div></div><div><div><div>5</div></div><div><span>---</span></div></div></code></pre><div><div></div><div></div></div></figure></div><p>文件：<code>src/content/posts/my-first-blog-post.md</code></p><p>URL：<code>/posts/hello-world</code></p></section><section><h4>示例 3：其他语言文件名使用Slug<a href="#示例-3其他语言文件名使用slug"><span>#</span></a></h4><div><figure><figcaption></figcaption><pre><code><div><div><div>1</div></div><div><span>---</span></div></div><div><div><div>2</div></div><div><span>title</span><span>: </span><span>如何使用 Firefly 博客主题</span></div></div><div><div><div>3</div></div><div><span>published</span><span>: </span><span>2023-09-09</span></div></div><div><div><div>4</div></div><div><span>slug</span><span>: </span><span>how-to-use-firefly-blog-theme</span></div></div><div><div><div>5</div></div><div><span>---</span></div></div></code></pre><div><div></div><div></div></div></figure></div><p>文件：<code>src/content/posts/如何使用Firefly博客主题.md</code></p><p>URL：<code>/posts/how-to-use-firefly-blog-theme</code></p></section></section><section><h3>Slug 使用建议<a href="#slug-使用建议"><span>#</span></a></h3><ol>
<li><strong>使用英文和连字符</strong>：<code>my-awesome-post</code> 而不是 <code>my awesome post</code></li>
<li><strong>保持简洁</strong>：避免过长的 slug</li>
<li><strong>具有描述性</strong>：让 URL 能够反映文章内容</li>
<li><strong>避免特殊字符</strong>：只使用字母、数字和连字符</li>
<li><strong>保持一致性</strong>：在整个博客中使用相似的命名模式</li>
</ol></section><section><h3>注意事项<a href="#注意事项"><span>#</span></a></h3><ul>
<li>Slug 一旦设置并发布，建议不要随意更改，以免影响 SEO 和已存在的链接</li>
<li>如果多个文章使用相同的 slug，后面的文章会覆盖前面的</li>
<li>Slug 会自动转换为小写</li>
</ul></section></section>]]></content>
    </entry>
</feed>
