<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Xs&apos;s Blog</title><description>记录学习和生活</description><link>https://blog.answers.xin/</link><language>zh</language><item><title>for test</title><link>https://blog.answers.xin/posts/for-test/</link><guid isPermaLink="true">https://blog.answers.xin/posts/for-test/</guid><description>123test</description><pubDate>Tue, 28 Apr 2026 01:28:00 GMT</pubDate><content:encoded>&lt;h2&gt;Zen of Python（Python之禅）&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Beautiful is better than ugly. （优美比丑陋好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Explicit is better than implicit.（清晰比晦涩好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Simple is better than complex.（简单比复杂好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Complex is better than complicated.（复杂比错综复杂好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Flat is better than nested.（扁平比嵌套好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Sparse is better than dense.（稀疏比密集好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Readability counts.（可读性很重要）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Special cases aren&apos;t special enough to break the rules.（特殊情况也不应该违反这些规则）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Although practicality beats purity.（但现实往往并不那么完美）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Errors should never pass silently.（异常不应该被静默处理）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Unless explicitly silenced.（除非你希望如此）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;In the face of ambiguity, refuse the temptation to guess.（遇到模棱两可的地方，不要胡乱猜测）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;There should be one-- and preferably only one --obvious way to do it.（肯定有一种通常也是唯一一种最佳的解决方案）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Although that way may not be obvious at first unless you&apos;re Dutch.（虽然这种方案并不是显而易见的，因为你不是那个荷兰人[^1]）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Now is better than never.（现在开始做比不做好）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Although never is often better than *right* now.（不做比盲目去做好[^2]）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;If the implementation is hard to explain, it&apos;s a bad idea.（如果一个实现方案难于理解，它通常不是一个好的方案）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;If the implementation is easy to explain, it may be a good idea.（如果一个实现方案易于理解，它很有可能是一个好的方案）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;li&gt;Namespaces are one honking great idea -- let&apos;s do more of those!（命名空间非常有用，我们应当多加利用）&amp;lt;br&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[^1]:这里指的是 Python 之父 Guido van Rossumm。
[^2]:极限编程中的YAGNI原则&lt;/p&gt;
</content:encoded></item><item><title>如何取消 Guide for Template - Getting Started 的置顶</title><link>https://blog.answers.xin/posts/guide/how-to-unpin-getting-started/</link><guid isPermaLink="true">https://blog.answers.xin/posts/guide/how-to-unpin-getting-started/</guid><description>说明如何取消 Twilight 模板内置 Getting Started 文章的置顶状态。</description><pubDate>Tue, 28 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;:::note
这篇文章专门说明如何取消模板示例文章 Guide for Template - Getting Started 的置顶，不会自动修改原文章内容。
:::&lt;/p&gt;
&lt;h2&gt;置顶是由哪个字段控制的&lt;/h2&gt;
&lt;p&gt;Twilight 的文章列表会优先显示 &lt;code&gt;pinned: true&lt;/code&gt; 的文章。&lt;/p&gt;
&lt;p&gt;目前模板里的 Getting Started 文章位于 [src/content/posts/guide/Getting Started.md](src/content/posts/guide/Getting Started.md)，它的 Front-matter 里有这一行：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pinned: true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;只要这个值是 &lt;code&gt;true&lt;/code&gt;，这篇文章就会排在文章列表顶部。&lt;/p&gt;
&lt;h2&gt;如何取消置顶&lt;/h2&gt;
&lt;p&gt;打开 [src/content/posts/guide/Getting Started.md](src/content/posts/guide/Getting Started.md)，把这一行：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pinned: true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;改成：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pinned: false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存后重新构建或重新部署站点，文章列表就会恢复为按发布时间排序，这篇文章也不会再显示置顶图标。&lt;/p&gt;
&lt;h2&gt;为什么这样改就生效&lt;/h2&gt;
&lt;p&gt;文章排序逻辑会先判断 &lt;code&gt;pinned&lt;/code&gt;，再判断发布时间。也就是说：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;pinned: true&lt;/code&gt; 的文章会优先排在前面。&lt;/li&gt;
&lt;li&gt;当多篇文章都不是置顶时，才会继续按发布时间从新到旧排序。&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;如果你还想彻底移除这篇模板文章&lt;/h2&gt;
&lt;p&gt;除了取消置顶，你也可以直接：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;修改这篇文章的标题和正文，改成你自己的内容。&lt;/li&gt;
&lt;li&gt;或者直接删除 [src/content/posts/guide/Getting Started.md](src/content/posts/guide/Getting Started.md)。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;这样首页就不会再显示模板默认教程。&lt;/p&gt;
</content:encoded><category>Guides / Getting Started</category><category>Twilight</category><category>Guide</category></item><item><title>Guide for Template - Advanced Customization</title><link>https://blog.answers.xin/posts/guide/advanced-guide/</link><guid isPermaLink="true">https://blog.answers.xin/posts/guide/advanced-guide/</guid><description>Master the advanced features and customization options of the Twilight template.</description><pubDate>Sat, 10 Feb 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;:::note
模板教学说明：这是一篇 Twilight 自带的进阶示例文章，主要用于演示主题配置、Markdown 扩展和卡片组件。实际建站时，你可以把这里的示例替换成自己的教程，或者在不需要时删除。
:::&lt;/p&gt;
&lt;p&gt;This guide covers advanced customization options and features available in the Twilight template, from global configurations to specialized Markdown extensions.&lt;/p&gt;
&lt;p&gt;中文翻译：本指南介绍 Twilight 模板的进阶能力，包括全局配置项、可视化效果、组件调整，以及 Markdown 扩展能力。&lt;/p&gt;
&lt;h2&gt;Global Configuration&lt;/h2&gt;
&lt;p&gt;中文翻译：全局配置主要通过 &lt;code&gt;twilight.config.yaml&lt;/code&gt; 完成，涉及站点信息、主题样式、背景和侧边栏组件等。&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;twilight.config.yaml&lt;/code&gt; file is the heart of your blog&apos;s configuration. Here are some advanced settings you can tweak:&lt;/p&gt;
&lt;h3&gt;Site &amp;amp; Localization&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Language &amp;amp; Translation&lt;/strong&gt;: Enable client-side translation using &lt;code&gt;site.translate.enable&lt;/code&gt;. You can choose different services and configure auto-detection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Custom Fonts&lt;/strong&gt;: Add your own fonts by providing a CSS link or file path under &lt;code&gt;site.font&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Visual Effects&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Theme Color&lt;/strong&gt;: Change the primary color of your blog by adjusting the &lt;code&gt;site.themeColor.hue&lt;/code&gt; (0-360).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Wallpaper Modes&lt;/strong&gt;: Choose between &lt;code&gt;banner&lt;/code&gt;, &lt;code&gt;fullscreen&lt;/code&gt;, or &lt;code&gt;none&lt;/code&gt;. You can also enable a &lt;code&gt;carousel&lt;/code&gt; for multiple wallpapers with the &lt;code&gt;kenBurns&lt;/code&gt; effect.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Waves Effect&lt;/strong&gt;: Toggle the animated water ripple effect on the banner using &lt;code&gt;site.wallpaper.banner.waves.enable&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Particle Effects&lt;/strong&gt;: Enable floating particles in the background with &lt;code&gt;particle.enable&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;UI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Navbar Transparency&lt;/strong&gt;: Adjust &lt;code&gt;site.wallpaper.banner.navbar.transparentMode&lt;/code&gt; between &lt;code&gt;semi&lt;/code&gt;, &lt;code&gt;full&lt;/code&gt;, or &lt;code&gt;semifull&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sidebar Widgets&lt;/strong&gt;: Reorder or toggle sidebar components like &lt;code&gt;profile&lt;/code&gt;, &lt;code&gt;announcement&lt;/code&gt;, &lt;code&gt;categories&lt;/code&gt;, &lt;code&gt;tags&lt;/code&gt;, &lt;code&gt;toc&lt;/code&gt;, and &lt;code&gt;statistics&lt;/code&gt; in &lt;code&gt;sidebar.components&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Markdown Extensions&lt;/h2&gt;
&lt;p&gt;中文翻译：这一节演示 Markdown 扩展功能，例如 GitHub 卡片、音乐卡片、提示块（admonitions）和 spoiler 语法。&lt;/p&gt;
&lt;h3&gt;GitHub Repository Cards&lt;/h3&gt;
&lt;p&gt;You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.&lt;/p&gt;
&lt;p&gt;::github{repo=&quot;Spr-Aachen/Twilight&quot;}&lt;/p&gt;
&lt;p&gt;Create a GitHub repository card with the code &lt;code&gt;::github{repo=&quot;Spr-Aachen/Twilight&quot;}&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::github{repo=&quot;Spr-Aachen/Twilight&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Music Cards&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Online
::music{meting=&quot;https://meting.spr-aachen.com/api?server=netease&amp;amp;type=song&amp;amp;id=1390882521&quot;}&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;::music{meting=&quot;https://meting.spr-aachen.com/api?server=netease&amp;amp;type=song&amp;amp;id=1390882521&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Local
::music{title=&quot;深海之息&quot; artist=&quot;Youzee Music&quot; cover=&quot;https://p1.music.126.net/PhKOqFtljgHDDpKYM2ADUA==/109951169858309716.jpg&quot; audio=&quot;assets/music/深海之息.m4a&quot; lrc=&quot;assets/music/深海之息.lrc&quot;}&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;::music{title=&quot;深海之息&quot; artist=&quot;Youzee Music&quot; cover=&quot;https://p1.music.126.net/PhKOqFtljgHDDpKYM2ADUA==/109951169858309716.jpg&quot; audio=&quot;assets/music/深海之息.m4a&quot; lrc=&quot;assets/music/深海之息.lrc&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Admonitions&lt;/h3&gt;
&lt;p&gt;Following types of admonitions are supported: &lt;code&gt;note&lt;/code&gt; &lt;code&gt;tip&lt;/code&gt; &lt;code&gt;important&lt;/code&gt; &lt;code&gt;warning&lt;/code&gt; &lt;code&gt;caution&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;:::note
Highlights information that users should take into account, even when skimming.
:::&lt;/p&gt;
&lt;p&gt;:::tip
Optional information to help a user be more successful.
:::&lt;/p&gt;
&lt;p&gt;:::important
Crucial information necessary for users to succeed.
:::&lt;/p&gt;
&lt;p&gt;:::warning
Critical content demanding immediate user attention due to potential risks.
:::&lt;/p&gt;
&lt;p&gt;:::caution
Negative potential consequences of an action.
:::&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Basic Syntax&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::note
Highlights information that users should take into account, even when skimming.
:::

:::tip
Optional information to help a user be more successful.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Custom Titles&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The title of the admonition can be customized.
:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;GitHub Syntax&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
&lt;a href=&quot;https://github.com/orgs/community/discussions/16925&quot;&gt;The GitHub syntax&lt;/a&gt; is also supported.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; [!TIP]
&amp;gt; The GitHub syntax is also supported.
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Spoiler&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can add spoilers to your text. The text also supports &lt;strong&gt;Markdown&lt;/strong&gt; syntax.&lt;/p&gt;
&lt;p&gt;The content :spoiler[is hidden &lt;strong&gt;ayyy&lt;/strong&gt;]!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The content :spoiler[is hidden **ayyy**]!
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;For more details, check the &lt;a href=&quot;https://docs.twilight.spr-aachen.com&quot;&gt;Documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;中文翻译：更多完整用法请查看官方文档 &lt;a href=&quot;https://docs.twilight.spr-aachen.com&quot;&gt;Documentation&lt;/a&gt;。&lt;/p&gt;
</content:encoded><category>Guides / Advanced Customization</category></item><item><title>Video Example</title><link>https://blog.answers.xin/posts/videos/</link><guid isPermaLink="true">https://blog.answers.xin/posts/videos/</guid><description>This post demonstrates how to embed video in a blog post.</description><pubDate>Thu, 02 Dec 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;:::note
模板教学说明：这是一篇模板自带的示例文章，用来演示如何在 Markdown 文章里嵌入 YouTube、Bilibili 等视频。你可以继续保留它做测试，也可以按同样方式替换成你自己的视频教程。
:::&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Just copy the embed code from YouTube or other platforms, and paste it in the markdown file as below:&lt;/p&gt;
&lt;p&gt;中文翻译：操作方式很简单，从 YouTube 或其他平台复制嵌入代码，直接粘贴到 Markdown 正文中即可。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: Include Video in the Post
published: 2023-10-19
// ...
---

&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/yrn7eInApnc?si=gGZeFbPcfMpJ1uV3_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;中文翻译：下面给出 YouTube 和 Bilibili 两种常见嵌入示例，你可以直接替换其中的链接地址使用。&lt;/p&gt;
&lt;h3&gt;YouTube&lt;/h3&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/yrn7eInApnc?si=gGZeFbPcfMpJ1uV3_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/p&gt;
&lt;h3&gt;Bilibili&lt;/h3&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;//player.bilibili.com/player.html?bvid=BV14QpMeSEuD&amp;amp;p=1&amp;amp;autoplay=0&quot; scrolling=&quot;no&quot; border=&quot;0&quot; frameborder=&quot;no&quot; framespacing=&quot;0&quot; allowfullscreen=&quot;true&quot; &amp;amp;autoplay=0&amp;gt; &amp;lt;/iframe&amp;gt;&lt;/p&gt;
</content:encoded><category>Examples</category><category>Markdown</category><category>Video</category></item><item><title>Mermaid Example</title><link>https://blog.answers.xin/posts/mermaids/</link><guid isPermaLink="true">https://blog.answers.xin/posts/mermaids/</guid><description>A simple example of a Markdown blog post with Mermaid.</description><pubDate>Wed, 02 Nov 2011 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;:::note
模板教学说明：这是一篇模板自带的 Mermaid 教学文章，用来演示流程图、时序图、甘特图等图表语法。你可以把它当作语法速查表，也可以删掉后改成自己的图表教程。
:::&lt;/p&gt;
&lt;h1&gt;Complete Guide to Markdown with Mermaid Diagrams&lt;/h1&gt;
&lt;p&gt;This article demonstrates how to create various complex diagrams using Mermaid in Markdown documents, including flowcharts, sequence diagrams, Gantt charts, class diagrams, and state diagrams.&lt;/p&gt;
&lt;p&gt;中文翻译：本文演示如何在 Markdown 中使用 Mermaid 绘制常见图表，包括流程图、时序图、甘特图、类图、状态图和饼图。&lt;/p&gt;
&lt;h2&gt;Flowchart Example&lt;/h2&gt;
&lt;p&gt;Flowcharts are excellent for representing processes or algorithm steps.&lt;/p&gt;
&lt;p&gt;中文翻译：流程图适合展示流程步骤和算法分支结构。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;graph TD
    A[Start] --&amp;gt; B{Condition Check}
    B --&amp;gt;|Yes| C[Process Step 1]
    B --&amp;gt;|No| D[Process Step 2]
    C --&amp;gt; E[Subprocess]
    D --&amp;gt; E
    subgraph E [Subprocess Details]
        E1[Substep 1] --&amp;gt; E2[Substep 2]
        E2 --&amp;gt; E3[Substep 3]
    end
    E --&amp;gt; F{Another Decision}
    F --&amp;gt;|Option 1| G[Result 1]
    F --&amp;gt;|Option 2| H[Result 2]
    F --&amp;gt;|Option 3| I[Result 3]
    G --&amp;gt; J[End]
    H --&amp;gt; J
    I --&amp;gt; J
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Sequence Diagram Example&lt;/h2&gt;
&lt;p&gt;Sequence diagrams show interactions between objects over time.&lt;/p&gt;
&lt;p&gt;中文翻译：时序图用于表达多个对象在时间线上的交互顺序。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sequenceDiagram
    participant User
    participant WebApp
    participant Server
    participant Database

    User-&amp;gt;&amp;gt;WebApp: Submit Login Request
    WebApp-&amp;gt;&amp;gt;Server: Send Auth Request
    Server-&amp;gt;&amp;gt;Database: Query User Credentials
    Database--&amp;gt;&amp;gt;Server: Return User Data
    Server--&amp;gt;&amp;gt;WebApp: Return Auth Result
    
    alt Auth Successful
        WebApp-&amp;gt;&amp;gt;User: Show Welcome Page
        WebApp-&amp;gt;&amp;gt;Server: Request User Data
        Server-&amp;gt;&amp;gt;Database: Get User Preferences
        Database--&amp;gt;&amp;gt;Server: Return Preferences
        Server--&amp;gt;&amp;gt;WebApp: Return User Data
        WebApp-&amp;gt;&amp;gt;User: Load Personalized Interface
    else Auth Failed
        WebApp-&amp;gt;&amp;gt;User: Show Error Message
        WebApp-&amp;gt;&amp;gt;User: Prompt Re-entry
    end
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Gantt Chart Example&lt;/h2&gt;
&lt;p&gt;Gantt charts are perfect for displaying project schedules and timelines.&lt;/p&gt;
&lt;p&gt;中文翻译：甘特图适合展示项目排期、任务持续时间和里程碑节点。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gantt
    title Website Development Project Timeline
    dateFormat  YYYY-MM-DD
    axisFormat  %m/%d
    
    section Design Phase
    Requirements Analysis      :a1, 2023-10-01, 7d
    UI Design                 :a2, after a1, 10d
    Prototype Creation        :a3, after a2, 5d
    
    section Development Phase
    Frontend Development      :b1, 2023-10-20, 15d
    Backend Development       :b2, after a2, 18d
    Database Design           :b3, after a1, 12d
    
    section Testing Phase
    Unit Testing              :c1, after b1, 8d
    Integration Testing       :c2, after b2, 10d
    User Acceptance Testing   :c3, after c2, 7d
    
    section Deployment
    Production Deployment     :d1, after c3, 3d
    Launch                    :milestone, after d1, 0d
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Class Diagram Example&lt;/h2&gt;
&lt;p&gt;Class diagrams show the static structure of a system, including classes, attributes, methods, and their relationships.&lt;/p&gt;
&lt;p&gt;中文翻译：类图用于描述系统的静态结构，包括类、属性、方法及其关系。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;classDiagram
    class User {
        +String username
        +String password
        +String email
        +Boolean active
        +login()
        +logout()
        +updateProfile()
    }
    
    class Article {
        +String title
        +String content
        +Date publishDate
        +Boolean published
        +publish()
        +edit()
        +delete()
    }
    
    class Comment {
        +String content
        +Date commentDate
        +addComment()
        +deleteComment()
    }
    
    class Category {
        +String name
        +String description
        +addArticle()
        +removeArticle()
    }
    
    User &quot;1&quot; -- &quot;*&quot; Article : writes
    User &quot;1&quot; -- &quot;*&quot; Comment : posts
    Article &quot;1&quot; -- &quot;*&quot; Comment : has
    Article &quot;1&quot; -- &quot;*&quot; Category : belongs to
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;State Diagram Example&lt;/h2&gt;
&lt;p&gt;State diagrams show the sequence of states an object goes through during its life cycle.&lt;/p&gt;
&lt;p&gt;中文翻译：状态图用于描述对象在生命周期中的状态变化过程。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;stateDiagram-v2
    [*] --&amp;gt; Draft
    
    Draft --&amp;gt; UnderReview : submit
    UnderReview --&amp;gt; Draft : reject
    UnderReview --&amp;gt; Approved : approve
    Approved --&amp;gt; Published : publish
    Published --&amp;gt; Archived : archive
    Published --&amp;gt; Draft : retract
    
    state Published {
        [*] --&amp;gt; Active
        Active --&amp;gt; Hidden : temporarily hide
        Hidden --&amp;gt; Active : restore
        Active --&amp;gt; [*]
        Hidden --&amp;gt; [*]
    }
    
    Archived --&amp;gt; [*]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Pie Chart Example&lt;/h2&gt;
&lt;p&gt;Pie charts are ideal for displaying proportions and percentage data.&lt;/p&gt;
&lt;p&gt;中文翻译：饼图适合展示占比和百分比类数据。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pie title Website Traffic Sources Analysis
    &quot;Search Engines&quot; : 45.6
    &quot;Direct Access&quot; : 30.1
    &quot;Social Media&quot; : 15.3
    &quot;Referral Links&quot; : 6.4
    &quot;Other Sources&quot; : 2.6
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Mermaid is a powerful tool for creating various types of diagrams in Markdown documents. This article demonstrated how to use flowcharts, sequence diagrams, Gantt charts, class diagrams, state diagrams, and pie charts. These diagrams can help you express complex concepts, processes, and data structures more clearly.&lt;/p&gt;
&lt;p&gt;To use Mermaid, simply specify the mermaid language in a code block and describe the diagram using concise text syntax. Mermaid will automatically convert these descriptions into beautiful visual diagrams.&lt;/p&gt;
&lt;p&gt;Try using Mermaid diagrams in your next technical blog post or project documentation - they will make your content more professional and easier to understand!&lt;/p&gt;
&lt;p&gt;中文翻译：Mermaid 能让技术文档与博客中的结构化信息更直观。你只需在代码块中使用 &lt;code&gt;mermaid&lt;/code&gt; 语法，即可自动生成图表。建议在后续文章中尝试使用，以提升可读性与专业度。&lt;/p&gt;
</content:encoded><category>Examples</category><category>Markdown</category><category>Mermaid</category></item><item><title>Guide for Template - Getting Started</title><link>https://blog.answers.xin/posts/guide/getting-started/</link><guid isPermaLink="true">https://blog.answers.xin/posts/guide/getting-started/</guid><description>How to use this blog template.</description><pubDate>Tue, 02 Oct 2001 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;:::note
模板教学说明：这是一篇 Twilight 自带的入门示例文章，主要用于演示文章 Front-matter 和目录结构。你可以保留它作为参考，也可以在熟悉后改写成自己的内容，或者直接删除。
:::&lt;/p&gt;
&lt;p&gt;Tip: For the things that are not mentioned in this guide, you may find the answers in the &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro Docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;中文翻译：提示，如果本指南没有提到你遇到的问题，可以在 &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro 文档&lt;/a&gt; 中继续查找答案。&lt;/p&gt;
&lt;h2&gt;Front-matter of Posts&lt;/h2&gt;
&lt;p&gt;中文翻译：这一节展示文章头部 Front-matter 的常用字段格式，创建新文章时可直接参考。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: My First Blog Post
published: 2020-02-02
description: This is the first post of my new Astro blog.
cover: ./cover.jpg
coverInContent: false
tags: []
category: Guides
comment: true
draft: false
---
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The title of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;published&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The date the post was published.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;pinned&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whether this post is pinned to the top of the post list.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A short description of the post. Displayed on index page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cover&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The cover image path of the post. &amp;lt;br/&amp;gt;1. Start with &lt;code&gt;http://&lt;/code&gt; or &lt;code&gt;https://&lt;/code&gt;: For web image &amp;lt;br/&amp;gt;2. Start with &lt;code&gt;/&lt;/code&gt;: For image in &lt;code&gt;public&lt;/code&gt; dir &amp;lt;br/&amp;gt;3. With none of the prefixes: Relative to the markdown file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;coverInContent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whether to show the cover image in the post content.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The tags of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;category&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The category of the post &amp;lt;br/&amp;gt;1. Single category: &lt;code&gt;category: Guides&lt;/code&gt; &amp;lt;br/&amp;gt;2. Multi-category: &lt;code&gt;category: [Guides, Getting Started]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;licenseName&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The license name for the post content.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;author&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The author of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sourceLink&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The source link or reference for the post content.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;comment&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whether to enable comment for this post. Default is &lt;code&gt;true&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;draft&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If this post is still a draft, which won&apos;t be displayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;中文翻译：上表说明了常见字段的用途，其中 &lt;code&gt;pinned&lt;/code&gt; 控制是否置顶，&lt;code&gt;draft&lt;/code&gt; 为 &lt;code&gt;true&lt;/code&gt; 时文章不会在正式环境显示。&lt;/p&gt;
&lt;h2&gt;Where to Place the Post Files&lt;/h2&gt;
&lt;p&gt;Your post files should be placed in &lt;code&gt;src/content/posts/&lt;/code&gt; directory. You can also create sub-directories to better organize your posts and assets.&lt;/p&gt;
&lt;p&gt;中文翻译：文章文件建议放在 &lt;code&gt;src/content/posts/&lt;/code&gt; 目录中，也可以按主题建立子目录来整理文章与配图资源。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/content/posts/
├── post-1.md
└── post-2/
    ├── cover.jpg
    └── index.md
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>Guides / Getting Started</category></item></channel></rss>