<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/scripts/pretty-feed-v3.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:h="http://www.w3.org/TR/html4/"><channel><title>Astro Theme Pure</title><description>Stay hungry, stay foolish</description><link>https://astro-pure.js.org</link><item><title>About</title><link>https://astro-pure.js.org/docs/advanced/about</link><guid isPermaLink="true">https://astro-pure.js.org/docs/advanced/about</guid><description>About the project</description><content:encoded>&lt;p&gt;import { GithubCard } from &apos;astro-pure/advanced&apos;
import { Button, Aside } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;p&gt;The astro-theme-pure theme is open source under the &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/blob/main/LICENSE&quot;&gt;Apache 2.0&lt;/a&gt; license. Please abide by this license for any further development.&lt;/p&gt;
&lt;h2&gt;Contribute Code&lt;/h2&gt;
&lt;p&gt;A big thank you to everyone who has contributed to the &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure&quot;&gt;astro-theme-pure&lt;/a&gt;. The open-source community is amazing because of you.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/graphs/contributors&quot;&gt;&lt;img src=&quot;https://contrib.rocks/image?repo=cworld1/astro-theme-pure&quot; alt=&quot;contributors&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All changes for &lt;code&gt;astro-pure&lt;/code&gt; package should enable &lt;a href=&quot;/docs/advanced/customize#package-mode&quot;&gt;Customize Theme#Package Mode&lt;/a&gt; first. PR test will also run in that mode. This requests you test your changes locally using &lt;code&gt;bun run yijiansilian&lt;/code&gt; command first.&lt;/p&gt;
&lt;p&gt;And for contributing docs, you can simply click the &quot;Edit on GitHub&quot; link at the bottom of each doc page to change the docs content.&lt;/p&gt;
&lt;h2&gt;Sponsorship&lt;/h2&gt;
&lt;p&gt;We would like to express our gratitude to all the sponsors.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;Open Source References&lt;/h2&gt;
&lt;p&gt;This theme uses/references/derives content from the following projects:&lt;/p&gt;
&lt;p&gt;Framework:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/withastro/astro&quot;&gt;astro&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/unocss/unocss&quot;&gt;unocss&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Content rendering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/mdx-js/mdx/&quot;&gt;mdx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/unocss/unocss/tree/main/packages-presets/preset-typography&quot;&gt;@unocss/preset-typography&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/rehypejs/rehype&quot;&gt;@unifiedjs/rehype&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/remarkjs/remark&quot;&gt;@unifiedjs/remark&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Integrations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code block: &lt;a href=&quot;https://github.com/shikijs/shiki&quot;&gt;Shiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Image lightbox: &lt;a href=&quot;https://github.com/francoischalifour/medium-zoom&quot;&gt;Medium Zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Comment: &lt;a href=&quot;https://github.com/walinejs/waline&quot;&gt;Waline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Search: &lt;a href=&quot;https://github.com/cloudcannon/pagefind&quot;&gt;Pagefind&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Others:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Compress: &lt;a href=&quot;https://github.com/PlayForm/Compress&quot;&gt;playform/compress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Image compress: &lt;a href=&quot;https://github.com/lovell/sharp&quot;&gt;sharp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Customize Theme</title><link>https://astro-pure.js.org/docs/advanced/customize</link><guid isPermaLink="true">https://astro-pure.js.org/docs/advanced/customize</guid><description>Custom theme by yourself</description><content:encoded>&lt;p&gt;import { Aside, Spoiler, Steps } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;You Should Know&lt;/h2&gt;
&lt;p&gt;This theme is designed to &quot;NPM Package&quot; for the following reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The code written in package may be frequently changed. If users change them at will, it will significantly increase the cost of subsequent updates and merging (various conflicts for code)&lt;/li&gt;
&lt;li&gt;Roll back and switch between different versions easily, to maintain user stability&lt;/li&gt;
&lt;li&gt;Reduce system coupling &amp;#x26; increase reuse ability&lt;/li&gt;
&lt;li&gt;The NPM Package mode can be used as a &quot;Astro plugin&quot; to append additional operations that enhance user experience during the build phase&lt;/li&gt;
&lt;li&gt;Support some built-in commands like new, check, info, etc.&lt;/li&gt;
&lt;li&gt;Use as component library for other Astro projects (yes, this project can be broken down into the UI component library): &lt;a href=&quot;https://www.npmjs.com/package/astro-pure&quot;&gt;Package details&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Before you customize it, you should check &lt;a href=&quot;/docs/setup/configuration#theme-configuration&quot;&gt;&lt;code&gt;site.config.ts&lt;/code&gt;&lt;/a&gt; to make sure there is no option that satisfy your need.&lt;/p&gt;
&lt;h2&gt;Swizzling&lt;/h2&gt;
&lt;p&gt;This theme chose an elegant method called &apos;Swizzling&apos;, which is inspired by the design from &lt;a href=&quot;https://docusaurus.io/docs/swizzling&quot;&gt;Docusaurus&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use an IDE to quickly view the source code corresponding to a certain component (In VSCode, it is to click the component with Ctrl).&lt;/li&gt;
&lt;li&gt;Copy to &lt;code&gt;src/components/&amp;#x3C;your prefer directory&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After modification, change the corresponding reference to your own file path.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&apos;s make an example to customize the &lt;code&gt;Footer&lt;/code&gt; component:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import { Footer, Header, ThemeProvider } from &apos;astro-pure/components/basic&apos;
import type { SiteMeta } from &apos;astro-pure/types&apos;
// ...
---
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;
&lt;p&gt;Find it in theme source code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export { default as Footer } from &apos;./Footer.astro&apos;
export { default as Header } from &apos;./Header.astro&apos;
export { default as ThemeProvider } from &apos;./ThemeProvider.astro&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you get the &lt;code&gt;Footer&lt;/code&gt; component source code at &lt;code&gt;node_modules/astro-theme-pure/components/basic/Footer.astro&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;Footer.astro&lt;/code&gt; file to your project:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;cp node_modules/astro-theme-pure/components/basic/Footer.astro src/components/custom/Footer.astro
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Solve the sub-dependencies problem:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import config from &apos;virtual:config&apos;

import { Icon } from &apos;../user&apos; // [!code --]
import { Icon } from &apos;astro-pure/user&apos; // [!code ++]
// ...
---
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the reference in &lt;code&gt;BaseLayout.astro&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt; ---
 import { Footer, Header, ThemeProvider } from &apos;astro-pure/components/basic&apos; // [!code --]
 import { Header, ThemeProvider } from &apos;astro-pure/components/basic&apos; // [!code ++]
 import { Footer } from &apos;@/components/custom/Footer.astro&apos; // [!code ++]
 // ...
 ---
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then you&apos;ve done a &quot;localization&quot; of the component.&lt;/p&gt;
&lt;h2&gt;Package Mode&lt;/h2&gt;
&lt;p&gt;If you want to make some breaking changes or just make a test, this method may follow &quot;what you see is what you get&quot;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Making sure you have the original theme code (&lt;code&gt;./packages/pure&lt;/code&gt;). If yo&apos;ve deleted it, download it from the &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/releases&quot;&gt;Releases&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Link it to your project using your package manager (Example: &lt;a href=&quot;https://bun.com/docs/pm/cli/link&quot;&gt;Bun&lt;/a&gt;, &lt;a href=&quot;https://docs.npmjs.com/cli/v11/commands/npm-link&quot;&gt;NPM&lt;/a&gt;, &lt;a href=&quot;https://pnpm.io/cli/link&quot;&gt;PNPM&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Then change the theme code as it is a part of your code!&lt;/li&gt;
&lt;/ol&gt;</content:encoded></item><item><title>常见问题</title><link>https://astro-pure.js.org/docs/advanced/faq</link><guid isPermaLink="true">https://astro-pure.js.org/docs/advanced/faq</guid><description>经常被问到的问题</description><content:encoded>&lt;h2&gt;路径&lt;/h2&gt;
&lt;h3&gt;博客特定路径&lt;/h3&gt;
&lt;p&gt;将博客路由格式设置为 &lt;code&gt;/blog/:year/:id&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;参见 &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/discussions/37#discussioncomment-11905851&quot;&gt;4.0.2-beta如何使文章链接中包含年份&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;内容&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;heroImage&lt;/code&gt; 支持网络图片&lt;/h3&gt;
&lt;p&gt;应配合 &lt;code&gt;inferSize: true&lt;/code&gt; 使用以获取图片尺寸。示例：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;heroImage:
  { src: &apos;https://img.tukuppt.com/ad_preview/00/15/09/5e715a320b68e.jpg!/fw/980&apos;, inferSize: true }
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;构建&lt;/h2&gt;
&lt;h3&gt;Vite 请求被拦截&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-log&quot;&gt;Blocked request. This host (&quot;xxx&quot;)is not allowed.
To allow this host, add &quot;xxx&quot; to `preview.allowedHosts` in vite.config.js.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见 &lt;a href=&quot;https://github.com/vitejs/vite/issues/19242&quot;&gt;option server.allowedHosts doesn&apos;t take into account &quot;true&quot;&lt;/a&gt;。&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;BUN_LINK_PKG&lt;/code&gt; 相关问题&lt;/h3&gt;
&lt;p&gt;参见 &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/issues/51&quot;&gt;BUN_LINK_PKG 环境变量无法设置成功&lt;/a&gt;。&lt;/p&gt;
&lt;h3&gt;构建报错：No &quot;Exports&quot; Main Defined&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-log&quot;&gt;07:39:23 [ERROR] [@astrojs/vercel] An unhandled error occurred while running the &quot;astro:build:done&quot; hook
No &quot;exports&quot; main defined in /vercel/path0/node_modules/estree-walker/package.json
  Stack trace:
    ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;尝试在不使用现有构建缓存的情况下重新部署您的项目。&lt;/p&gt;
&lt;p&gt;详情：&lt;a href=&quot;https://github.com/oven-sh/bun/issues/7241&quot;&gt;oven-sh/bun/issues: error No &quot;exports&quot; main defined in /vercel/path0/node_modules/estree-walker/package.json&lt;/a&gt;。&lt;/p&gt;</content:encoded></item><item><title>优化您的网站</title><link>https://astro-pure.js.org/docs/advanced/optimize</link><guid isPermaLink="true">https://astro-pure.js.org/docs/advanced/optimize</guid><description>提高您的网站性能和用户体验</description><content:encoded>&lt;p&gt;import { Aside } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;集成&lt;/h2&gt;
&lt;p&gt;此主题已集成：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sharp&lt;/code&gt;: 图像优化&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/integrations/others#playformcompress&quot;&gt;&lt;code&gt;@playform/compress&lt;/code&gt;&lt;/a&gt;: HTML、CSS、JS、图像压缩（一段时间内存在问题；请参阅 &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/issues/55&quot;&gt;GitHub Issue #55&lt;/a&gt;）&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;CDN&lt;/h2&gt;
&lt;p&gt;一些轻量级库正在使用 js 静态链接。您可以配置 CDN 链接来提高您的网站性能。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const theme: ThemeUserConfig = {
  // ...
  npmCDN: &apos;https://cdn.jsdelivr.net/npm&apos;
  // 推荐：
  // - https://cdn.jsdelivr.net/npm
  // - https://cdn.smartcis.cn/npm
  // - https://unkpg.com
  // - https://cdn.cbd.int
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;编码&lt;/h2&gt;
&lt;p&gt;在您的 &lt;code&gt;.astro&lt;/code&gt; 文件中使用 &quot;Typescript-like&quot; 语法注释是一个好方法。它可以确保您的注释不会出现在最终的生产 HTML 文件中。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
// 这里是放置注释的安全位置
import { AstroComponent } from &apos;@/components&apos;
---

&amp;#x3C;div&gt;
  &amp;#x3C;!-- 这是一种不好的注释风格，它会出现在生产环境中 --&gt;
  {/* 这是一种更好的注释风格 */}
  &amp;#x3C;AstroComponent&gt;Hello, Astro!&amp;#x3C;/AstroComponent&gt;
&amp;#x3C;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;图片&lt;/h2&gt;
&lt;h3&gt;使用优化组件&lt;/h3&gt;
&lt;p&gt;使用 &lt;code&gt;&amp;#x3C;Image /&gt;&lt;/code&gt; 组件显示优化的图像：&lt;a href=&quot;https://docs.astro.build/en/guides/images/#display-optimized-images-with-the-image--component&quot;&gt;使用内置的 &lt;code&gt;&amp;#x3C;Image /&gt;&lt;/code&gt; Astro 组件&lt;/a&gt; 来显示以下内容的优化版本：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;位于 src/ 文件夹内的本地图像&lt;/li&gt;
&lt;li&gt;来自授权来源的配置远程图像&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&amp;#x3C;Image /&gt;&lt;/code&gt; 可以转换本地或授权远程图像的尺寸、文件类型和质量，以控制您显示的图像。生成的 &lt;code&gt;&amp;#x3C;img&gt;&lt;/code&gt; 标签包含 alt、loading 和 decoding 属性，并推断图像尺寸以避免累积布局偏移 (CLS)。&lt;/p&gt;
&lt;p&gt;您可以使用 &lt;code&gt;loading=&quot;lazy&quot;&lt;/code&gt; 为图像启用懒加载。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
// 导入 Image 组件和图像
import { Image } from &apos;astro:assets&apos;

import myImage from &apos;../assets/my_image.png&apos; // 图像尺寸为 1600x900
---

&amp;#x3C;!-- `alt` 在 Image 组件上是必需的 --&gt;
&amp;#x3C;Image src={myImage} alt=&apos;我的图像描述&apos; /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#x3C;!-- 输出 --&gt;
&amp;#x3C;img
  src=&quot;/_astro/my_image.hash.webp&quot;
  width=&quot;1600&quot;
  height=&quot;900&quot;
  decoding=&quot;async&quot;
  loading=&quot;lazy&quot;
  class=&quot;my-class&quot;
  alt=&quot;&quot;
/&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;使用此组件，它会将您的图像转换为 WebP 格式。&lt;code&gt;.md&lt;/code&gt; 和 &lt;code&gt;.mdx&lt;/code&gt; 文件默认启用此功能。&lt;/p&gt;
&lt;h3&gt;更改图像大小&lt;/h3&gt;
&lt;p&gt;尽管此主题已集成了一些已知的图像优化插件，但您可能仍需要为首页等关键页面优化图像。&lt;/p&gt;
&lt;p&gt;一个简单的方法是使用 &lt;a href=&quot;https://tinypng.com/&quot;&gt;TinyPNG&lt;/a&gt; 等在线工具手动压缩您的图像。&lt;/p&gt;
&lt;h3&gt;适配外部图像&lt;/h3&gt;
&lt;p&gt;如果您使用的是外部图像，除了懒加载标签外，您还可以为其添加 &lt;a href=&quot;https://docs.astro.build/en/guides/images/#authorizing-remote-images&quot;&gt;Astro 预优化服务&lt;/a&gt;。这将把外部图像更改为本地优化的图像。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;export default defineConfig({
  // ...
  image: {
    // ...
    domains: [&apos;&amp;#x3C;特定站点域名&gt;&apos;] // [!code ++]
  }
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;文件大小分析&lt;/h2&gt;
&lt;p&gt;安装 npm 包 &lt;code&gt;rollup-plugin-visualizer&lt;/code&gt;。然后将以下代码附加到您的 &lt;code&gt;astro.config.ts&lt;/code&gt; 中：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export default defineConfig({
  // ...
  vite: {
    plugins: [
      visualizer({
        emitFile: true,
        filename: &apos;stats.html&apos;
      })
    ]
  }
})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;构建您的项目并打开生成的 &lt;code&gt;stats.html&lt;/code&gt; 文件来分析您的包大小。完成后，您可以删除上述代码和包以保持项目清洁。&lt;/p&gt;</content:encoded></item><item><title>更新主题</title><link>https://astro-pure.js.org/docs/advanced/update</link><guid isPermaLink="true">https://astro-pure.js.org/docs/advanced/update</guid><description>将 astro theme pure 更新到最新版本</description><content:encoded>&lt;p&gt;import { Aside } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;破坏性变更&lt;/h2&gt;
&lt;h3&gt;v4.1.2&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将 &lt;code&gt;src/pages/terms/list.astro&lt;/code&gt; 移动到 &lt;code&gt;src/pages/terms/index.astro&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.1.1&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将 shiki 自定义转换器移动到 &lt;code&gt;src/plugins/shiki-custom-transformers.ts&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将 shiki 官方转换器移动到 &lt;code&gt;src/plugins/shiki-offical/transformers.ts&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;改进了配置文件，添加了新的顺序和注释。这将影响 &lt;code&gt;src/site.config.ts&lt;/code&gt; 和 &lt;code&gt;astro.config.ts&lt;/code&gt; 两个文件 (&lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/commit/09dc44d87987f5f777b21ea642ef8cc9db11e592&quot;&gt;09dc44d&lt;/a&gt;)。&lt;/li&gt;
&lt;li&gt;添加了默认的代码折叠功能 (&lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/commit/7281077b31b7f1bb61bf6eb9a865aae8835cf0e3&quot;&gt;7281077&lt;/a&gt;, &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/commit/22b884789724c1127c7b5a5d1639fd5b0e6a8201&quot;&gt;22b8847&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;重构了调色板和边框半径样式。如果您使用了 &lt;code&gt;--primary-foreground&lt;/code&gt; 这样的颜色，请将其更新为 &lt;code&gt;--card&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.1.0&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将自定义 CSS 文件 &lt;code&gt;global.css&lt;/code&gt; 移动到 &lt;code&gt;src/assets/styles/global.css&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将字体加载器更改为 &lt;a href=&quot;https://docs.astro.build/en/reference/experimental-flags/fonts/&quot;&gt;Astro 内置字体加载器&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.9&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;支持缓存链接头像 (Arthals)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.8&lt;/h3&gt;
&lt;p&gt;无破坏性变更。&lt;/p&gt;
&lt;h3&gt;v4.0.7&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;将 &lt;code&gt;Button&lt;/code&gt; 组件的 &lt;code&gt;style&lt;/code&gt; 属性更改为 &lt;code&gt;variant&lt;/code&gt; 属性。这可以帮助您添加自定义样式而不会产生冲突。您应该将代码修改如下：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-jsx&quot;&gt;&amp;#x3C;Button title=&apos;My Button&apos; style=&apos;primary&apos; /&gt; // [!code --]
&amp;#x3C;Button title=&apos;My Button&apos; variant=&apos;primary&apos; /&gt; // [!code ++]
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;更改了 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中的 &lt;code&gt;ExternalLinks&lt;/code&gt; 配置。您应该将配置修改如下：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const theme: ThemeUserConfig = {
  content: {
    externalLinksContent: &apos; ↗&apos;, // [!code --]
    /** External links configuration */ // [!code ++]
    externalLinks: { // [!code ++]
      content: &apos; ↗&apos;, // [!code ++]
      /** Properties for the external links element */ // [!code ++]
      properties: { // [!code ++]
        style: &apos;user-select:none&apos; // [!code ++]
      } // [!code ++]
    }, // [!code ++]
    /** Blog page size for pagination (optional) */
    blogPageSize: 8,
    externalLinkArrow: true // show external link arrow // [!code --]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;将 Waline 文件移出了包！查看 &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/commit/5119694ab3e32b600887dca30650bcbc63da3f7b&quot;&gt;Commit 5119694&lt;/a&gt; 了解如何更改您现有的页面和布局。不要忘记将 &lt;code&gt;src/components/waline&lt;/code&gt; 目录下的文件复制到您的项目中。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.6&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将项目卡片变量名从 &lt;code&gt;project&lt;/code&gt; 更改为 &lt;code&gt;projects&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.5&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将 UnoCSS 预设从 &lt;code&gt;Wind3&lt;/code&gt; 更改为 &lt;code&gt;Mini&lt;/code&gt;。移除了一些功能，如 &lt;code&gt;gradient&lt;/code&gt;、&lt;code&gt;animation&lt;/code&gt;、&lt;code&gt;container&lt;/code&gt; 等。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.3&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;将页脚注册配置更改为 &lt;code&gt;links&lt;/code&gt;。这将为您提供更大的灵活性，可以添加更多链接或其他信息：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const theme: ThemeUserConfig = {
  footer: {
    links: [ // [!code highlight:12]
      {
        title: &apos;Moe ICP 114514&apos;,
        link: &apos;https://icp.gov.moe/?keyword=114514&apos;,
        style: &apos;text-sm&apos; // Uno/TW CSS class
      },
      {
        title: &apos;Site Policy&apos;,
        link: &apos;/terms/list&apos;,
        pos: 2 // position set to 2 will be appended to copyright line
      }
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.2-beta&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;考虑将工具图标移动到新路径，如 &lt;code&gt;src/assets/tools/&lt;/code&gt;；这可以帮助用户了解哪些图标与工具有关。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将链接的 &lt;code&gt;applyTip&lt;/code&gt; 更改为自定义数组样式：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  links: {
    applyTip: [
      { name: &apos;Name&apos;, val: theme.title }, // [!code highlight:4]
      { name: &apos;Desc&apos;, val: theme.description || &apos;Null&apos; },
      { name: &apos;Link&apos;, val: &apos;https://astro-pure.js.org/&apos; },
      { name: &apos;Avatar&apos;, val: &apos;https://astro-pure.js.org/favicon/favicon.ico&apos; }
      // You can also add more fields
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;添加了环境变量 &lt;code&gt;BUN_LINK_PKG&lt;/code&gt;。将其设置为 &lt;code&gt;true&lt;/code&gt; 会自动引用 &lt;code&gt;packages/pure&lt;/code&gt; 路径中的 &lt;code&gt;astro-pure&lt;/code&gt; 包，而不是 &lt;code&gt;node_modules/astro-pure&lt;/code&gt;。这可以帮助用户开发主题或自行修改代码（不建议用于生产环境）。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 CSS 框架更改为 UnoCSS。这将影响 &lt;code&gt;unocss.config.ts&lt;/code&gt; 和排版类名设置。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.1-beta&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;将 SVG 交付导入更改为自定义导入 SVG 元素。这将影响 &lt;code&gt;ToolSelection&lt;/code&gt; 组件的使用。您应该进行如下更改：&lt;/p&gt;
&lt;p&gt;（可选）将图标移动到新路径，如 &lt;code&gt;src/assets/icons/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;然后更改使用代码（默认为 &lt;code&gt;src/pages/about/index.astro&lt;/code&gt;）&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;&amp;#x3C;ToolSection
  tools={[
    {
      name: &apos;Arch Linux&apos;,
      description: &apos;Linux Distribution&apos;,
      href: &apos;https://archlinux.org/&apos;,
      iconPath: &apos;archlinux&apos; // [!code --]
      icon: import(&apos;@/assets/icons/archlinux.svg?raw&apos;) // [!code ++]
    }
  ]},
/&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;此更改导入了一个新组件 &lt;code&gt;Svg&lt;/code&gt;。有关用法，请参阅 &lt;a href=&quot;/docs/integrations/components#svg-loader&quot;&gt;用户组件 #Svg 加载器&lt;/a&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v4.0.0-alpha&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;将所有可重用的组件、类型和工具函数移动到新的 npm 包 &lt;code&gt;astro-pure&lt;/code&gt; 中。受影响的组件包括在其中。导入方法也已更改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import { Button } from &apos;@/components/user&apos; // [!code --]
import { Button } from &apos;astro-pure/user&apos; // [!code ++]
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;新格式的配置文件 &lt;code&gt;src/site.config.ts&lt;/code&gt;。将有 zod 模式来验证配置文件，配置的使用方式也将更改为：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import { siteConfig } from &apos;@/site-config&apos; // [!code --]
import config from &apos;@/site-config&apos; // [!code ++]
// Or if you want to use the config that is after processed or transformed
import config from &apos;virtual:config&apos; // [!code ++]
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;支持内置的 astro 配置。&lt;code&gt;astro-pure&lt;/code&gt; 包将自动配置一些集成，如 &lt;code&gt;unocss/astro&lt;/code&gt;、&lt;code&gt;@astrojs/mdx&lt;/code&gt;、&lt;code&gt;@astrojs/sitemap&lt;/code&gt;，以及一些 rehypePlugins 和 remarkPlugins。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将搜索引擎更改为 &lt;a href=&quot;https://pagefind.app/&quot;&gt;pagefind&lt;/a&gt;，主要是因为 Astro v5 不允许直接从客户端获取集合数据（这是 Fuse.js 搜索引擎的核心工作模式）。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将一些 &lt;code&gt;BaseHead&lt;/code&gt; 标签配置更改为 &lt;code&gt;src/site.config.ts&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v3.1.4&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;将配置 &lt;code&gt;siteConfig.content.typographyProse&lt;/code&gt; 移动到 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中的 &lt;code&gt;integrationConfig.typography.class&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将高级组件移动到 &lt;code&gt;src/components/advanced&lt;/code&gt;。受影响的组件包含在 &lt;a href=&quot;/docs/integrations/advanced&quot;&gt;高级组件&lt;/a&gt; 中。导入方法也已更改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import LinkPreview from &apos;@/components/LinkPreview.astro&apos; // [!code --]
import { LinkPreview } from &apos;astro-pure/advanced&apos; // [!code ++]

&amp;#x3C;LinkPreview href=&apos;https://www.cloudflare.com/&apos; /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 &lt;code&gt;Substats&lt;/code&gt; 配置移动到相关页面 &lt;code&gt;src/pages/about/index.astro&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 Github 卡片组件更改为 &lt;code&gt;src/components/advanced&lt;/code&gt; 中的 &lt;code&gt;GithubCard&lt;/code&gt;。有关用法，请参阅 &lt;a href=&quot;/docs/integrations/advanced#github-card&quot;&gt;高级组件 #Github 卡片&lt;/a&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 Links Logbook 移动到 &lt;code&gt;src/site.config.ts&lt;/code&gt;。有关详细信息，请参阅 &lt;a href=&quot;/docs/integrations/links#%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE&quot;&gt;友链 #基本配置&lt;/a&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v3.1.3&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;将用户组件移动到 &lt;code&gt;src/components/user&lt;/code&gt;。受影响的组件包含在 &lt;a href=&quot;/docs/integrations/components&quot;&gt;用户组件&lt;/a&gt; 中。导入方法也已更改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import Button from &apos;@/components/Button&apos; // [!code --]
import { Button } from &apos;astro-pure/user&apos; // [!code ++]
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 &lt;code&gt;remark-github-blockquote-alert&lt;/code&gt; 插件替换为组件 &lt;code&gt;Aside&lt;/code&gt;。有关如何迁移，请查看 &lt;a href=&quot;/docs/integrations/components#aside&quot;&gt;用户组件 #Aside&lt;/a&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v3.1.2 (pre-release)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将一些配置项如 &lt;code&gt;telegram&lt;/code&gt;、&lt;code&gt;walineServerURL&lt;/code&gt; 移动到 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中的新结构。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v3.1.1&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将 &lt;code&gt;src/utils&lt;/code&gt; 中的内部部分移动到 &lt;code&gt;src/plugins&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将配置文件 &lt;code&gt;astro.config.ts&lt;/code&gt; 修改为 &lt;code&gt;astro.config.mjs&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将 ESLint 更新到最新版本，并将配置文件 &lt;code&gt;.eslintrc.js&lt;/code&gt; 迁移到 &lt;code&gt;eslint.config.mjs&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将 &lt;code&gt;prettier.config.js&lt;/code&gt; 修改为 &lt;code&gt;prettier.config.mjs&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v3.1.0 (pre-release)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;将通用内容 markdown 格式化器 &lt;code&gt;coverImage&lt;/code&gt; 更改为 &lt;code&gt;heroImage&lt;/code&gt;。您需要修改所有 markdown 文件，将 &lt;code&gt;coverImage&lt;/code&gt; 替换为 &lt;code&gt;heroImage&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;v3.0.9&lt;/h3&gt;
&lt;p&gt;一个稳定版本。&lt;/p&gt;
&lt;p&gt;待更新...&lt;/p&gt;
&lt;h2&gt;更新方法&lt;/h2&gt;
&lt;h3&gt;变基 (Rebase)&lt;/h3&gt;
&lt;p&gt;如果您使用 fork 创建了一个新项目，您可以直接将主题仓库变基到最新版本。&lt;/p&gt;
&lt;h3&gt;手动合并&lt;/h3&gt;
&lt;p&gt;由于 git 历史不同，您可能需要手动将主题仓库合并到您的项目中。&lt;/p&gt;
&lt;p&gt;对于 Windows 用户，一个实用的方法是使用工具 &lt;a href=&quot;https://winmerge.org/&quot;&gt;WinMerge&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;过滤列表可能会有所帮助：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-diff&quot;&gt;## 这是 WinMerge 的目录/文件过滤模板
name: Astro Theme Pure
desc: 博客与 Astro Theme Pure 的差异比较

## 选择过滤器是包含性还是排除性
## 包含性（宽松）过滤器允许通过所有不匹配规则的项目
## 排除性过滤器仅允许通过匹配规则的项目
## include 或 exclude
def: include

## 文件名过滤器以 f: 开头
## 目录过滤器以 d: 开头
## 要排除一些匹配 f: 模式的文件，请指定 f!:
## 要排除一些匹配 d: 模式的文件夹，请指定 d!:
## （内联注释以 &quot; ##&quot; 开头，并延伸到行尾）

### Front-end files ###
d: \\\.git$
d: \\node_modules$

# Astro cache
d: \\\.vercel
d: \\\.astro

### Theme dev ###
d: ^\\packages$
d: ^\\preset$
d: ^\\test$
f: ^LICENSE$
f: ^README\.md$
f: ^README-zh-CN\.md$
f: ^CODE_OF_CONDUCT\.md$

# Project
f: ^bun\.lockb$
f: \.code-workspace$
f: ^ignore\.md$

### Astro theme pure ###
# Static
d: ^\\public\\favicon$
f: ^public\\links\.json$
f: ^public\\images\\social-card\.png$

# Assets
f: ^src\\assets\\avatar\.png$
d: ^\\src\\assets\\projects$
d: ^\\src\\assets\\tools$

# Content
d: ^\\src\\content\\blog$
d: ^\\src\\content\\docs$
d: ^\\src\\pages\\docs$
f: ^src\\pages\\terms\\.*\.md$

### Blog ###
# Your own files
&lt;/code&gt;&lt;/pre&gt;</content:encoded></item><item><title>高级组件 (Advanced Components)</title><link>https://astro-pure.js.org/docs/integrations/advanced</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/advanced</guid><description>高级组件及其高级文档</description><content:encoded>&lt;p&gt;import { MdxRepl } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;Web 内容渲染 (Web Content Render)&lt;/h2&gt;
&lt;h3&gt;引用 (Quote)&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;Quote&lt;/code&gt; 组件是一个简单的组件，用于显示随机引用。&lt;/p&gt;
&lt;p&gt;配置:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  // 在页脚添加随机引用（默认在首页页脚）
  quote: {
    // https://github.com/lukePeavey/quotable
    server: &apos;https://api.quotable.io/quotes/random?maxLength=60&apos;, // [!code highlight:2]
    target: `(data) =&gt; data[0].content || &apos;Error&apos;`
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/lukePeavey/quotable&quot;&gt;Quotable&lt;/a&gt; 是一个提供随机英文引用的开源 API。&lt;/p&gt;
&lt;p&gt;对于中文引用，您可以使用 &lt;a href=&quot;https://developer.hitokoto.cn/sentence/&quot;&gt;Hitokoto&lt;/a&gt;。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  quote: {
    // https://developer.hitokoto.cn/sentence/#%E8%AF%B7%E6%B1%82%E5%9C%B0%E5%9D%80
    server: &apos;https://v1.hitokoto.cn/?c=i&apos;, // [!code highlight:2]
    target: `(data) =&gt; data.hitokoto || &apos;Error&apos;`
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;GitHub 卡片 (GitHub Card)&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;GithubCard&lt;/code&gt; 组件是一个简单的组件，用于显示 GitHub 用户卡片。&lt;/p&gt;
&lt;h3&gt;链接预览 (Link Preview)&lt;/h3&gt;
&lt;p&gt;预览内容中插入的任何链接。&lt;/p&gt;
&lt;h2&gt;数据转换器 (Data Transformer)&lt;/h2&gt;
&lt;h3&gt;二维码 (QRCode)&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;//  // default to render current page link
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;#x3C;/Fragment&gt;
&amp;#x3C;/MdxRepl&gt;

### Toast

&amp;#x3C;MdxRepl&gt;
import { Button } from &apos;astro-pure/user&apos;

&amp;#x3C;Button
  title=&apos;Click Me&apos;
  onClick={`document.dispatchEvent(
    new CustomEvent(&apos;toast&apos;, {
      detail: {
        message: &apos;Hello from toast!&apos;,
        time: 5000
      }
    })
  )`} /&gt; 
&amp;#x3C;Fragment slot=&apos;desc&apos;&gt;
```jsx
import { Button } from &apos;astro-pure/basic&apos;

&amp;#x3C;Button
  title=&apos;Click Me&apos;
  onClick={`document.dispatchEvent(
    new CustomEvent(&apos;toast&apos;, {
      detail: {
        message: &apos;Hello from toast!&apos;,
        time: 5000
      }
    })
  )`} /&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Medium Zoom&lt;/h3&gt;
&lt;p&gt;Try click the following image.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://github.com/user-attachments/assets/6c42b061-df7e-4696-a29b-bff07fe17d88&quot; alt=&quot;img&quot;&gt;&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;/docs/integrations/others#medium-zoom&quot;&gt;Other Integrations#medium-zoom&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title>评论系统</title><link>https://astro-pure.js.org/docs/integrations/comment</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/comment</guid><description>页面底部的评论系统</description><content:encoded>&lt;p&gt;import { Aside } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;Waline 评论系统&lt;/h2&gt;
&lt;p&gt;主题的评论、阅读统计、点赞等功能均由 &lt;a href=&quot;https://waline.js.org/&quot;&gt;Waline&lt;/a&gt; 提供。&lt;/p&gt;
&lt;h3&gt;移除&lt;/h3&gt;
&lt;p&gt;如果您有一些原因需要移除评论系统，或者只是想了解如何更换为其他评论系统，本节可能会对您有所帮助。但如果您想了解如何配置它，可以跳过本节。&lt;/p&gt;
&lt;p&gt;通过以下步骤移除它：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;在 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中将 &lt;code&gt;enable&lt;/code&gt; 设置为 &lt;code&gt;false&lt;/code&gt;。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  // ...
  waline: {
    enable: false // [!code highlight]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;移除依赖 &lt;code&gt;@waline/client&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;bun remove @waline/client
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;移除文件夹 &lt;code&gt;src/components/waline&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;移除这些布局中的相关代码：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src/layouts/CommonPage.astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/layouts/BlogPost.astro&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;移除这些文件中为之前编辑的布局配置的相关配置，如 &lt;code&gt;comment&lt;/code&gt; 或 &lt;code&gt;view&lt;/code&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src/pages/about/index.astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/pages/links/index.astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/pages/projects/index.astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;其他存在的博客文章 frontmatter 配置&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;部署&lt;/h3&gt;
&lt;p&gt;您可以参考其文档进行配置，建议使用 &lt;a href=&quot;https://vercel.com/&quot;&gt;Vercel&lt;/a&gt; + &lt;a href=&quot;https://supabase.com/&quot;&gt;Supabase&lt;/a&gt; 组合。&lt;/p&gt;
&lt;h3&gt;配置&lt;/h3&gt;
&lt;p&gt;然后，您可以在 &lt;code&gt;integrationConfig.server&lt;/code&gt; 中配置 Waline 评论系统。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  // ...
  waline: {
    enable: true,
    // Server service link
    server: &apos;https://astro-theme-pure-waline.arthals.ink/&apos;, // [!code highlight]
    // Refer https://waline.js.org/en/guide/features/emoji.html
    emoji: [&apos;bmoji&apos;, &apos;weibo&apos;],
    // Refer https://waline.js.org/en/reference/client/props.html
    additionalConfigs: {
      pageview: true,
      comment: true
      // ...
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;使用&lt;/h3&gt;
&lt;p&gt;您可以在 &lt;code&gt;.astro&lt;/code&gt; 或 &lt;code&gt;.mdx&lt;/code&gt; 文件中手动调用它。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-jsx&quot;&gt;import { Comment } from &apos;@/components/waline&apos;

// prettier-ignore
&amp;#x3C;Comment /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;渲染效果：&lt;/p&gt;
&lt;p&gt;import { Comment } from &apos;@/components/waline&apos;&lt;/p&gt;</content:encoded></item><item><title>用户组件</title><link>https://astro-pure.js.org/docs/integrations/components</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/components</guid><description>轻松扩展您的内容页面，使其更具交互性</description><content:encoded>&lt;p&gt;import { Aside, Tabs, TabItem, MdxRepl } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;p&gt;组件让您可以轻松且一致地重用一部分 UI 或样式。您不仅可以在 &lt;code&gt;.astro&lt;/code&gt; 文件中使用它们，也可以在 &lt;code&gt;.mdx&lt;/code&gt; 文件中使用。&lt;/p&gt;
&lt;p&gt;对于 &lt;code&gt;.astro&lt;/code&gt; 文件，您可以直接导入并使用组件。第一节中将展示一个示例。&lt;/p&gt;
&lt;h2&gt;容器 (Containers)&lt;/h2&gt;
&lt;h3&gt;卡片 (Card)&lt;/h3&gt;
&lt;p&gt;&amp;#x3C;Card
as=&apos;a&apos;
href=&apos;#card&apos;
heading=&apos;标题示例&apos;
subheading=&apos;这是一个卡片副标题，用于描述卡片内容。&apos;
date=&apos;2021年8月&apos;&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;您甚至可以在这里包含一个列表
&lt;/p&gt;
&lt;p&gt;&amp;#x3C;Card
as=&apos;a&apos;
href=&apos;#card&apos;
heading=&apos;标题示例&apos;
subheading=&apos;这是一个卡片副标题，用于描述卡片内容。&apos;
date=&apos;2021年8月&apos;&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;您甚至可以在这里包含一个列表
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;#x3C;/TabItem&gt;
&amp;#x3C;TabItem label=&apos;Astro&apos;&gt;
```astro
---
import { Card } from &apos;astro-pure/user&apos;
---
&amp;#x3C;!-- ... --&gt;
&amp;#x3C;Card
  as=&apos;a&apos;
  href=&apos;#card&apos;
  heading=&apos;标题示例&apos;
  subheading=&apos;这是一个卡片副标题，用于描述卡片内容。&apos;
  date=&apos;2021年8月&apos;
&gt;
  您甚至可以在这里包含一个列表
&amp;#x3C;/Card&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;折叠框 (Collapse)&lt;/h3&gt;
&lt;p&gt;这是一个折叠框的内容示例。
&lt;/p&gt;
&lt;p&gt; 这是一个折叠框的内容示例。 
&lt;/p&gt;
&lt;h3&gt;侧边栏提示 (Aside)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// 例如，一段代码。
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;// &lt;code&gt;js   // 例如，一段代码。   // &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;该组件还有一个 remark 插件支持版本（可以直接在 &lt;code&gt;.md&lt;/code&gt; 中使用），但尚未集成到本主题中。您可以参考 &lt;a href=&quot;https://github.com/withastro/starlight/blob/main/packages/starlight/integrations/asides.ts&quot;&gt;packages/starlight/integrations/asides.ts&lt;/a&gt; 获取参考代码。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;:::tip
本主题的作者是个好人。
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;选项卡 (Tabs)&lt;/h3&gt;
&lt;h3&gt;MDX Repl&lt;/h3&gt;
&lt;p&gt;// Width 是可选的；使用 width 参数来设置
// MDX Repl 组件内的所有元素。
// (slot desc 不包含此参数)
&lt;/p&gt;
&lt;p&gt;您可以将任何其他组件组合到 &lt;code&gt;desc&lt;/code&gt; 插槽中。&lt;code&gt;&amp;#x3C;Fragment&gt;&lt;/code&gt; 不会被渲染为父级 HTML 容器标签。&lt;/p&gt;
&lt;h2&gt;列表 (List)&lt;/h2&gt;
&lt;h3&gt;卡片列表 (CardList)&lt;/h3&gt;
&lt;p&gt;&amp;#x3C;CardList title=&apos;折叠列表示例&apos; list={
[{title: &apos;我被隐藏了！&apos;}]
} collapse /&gt;
&amp;#x3C;CardList title=&apos;普通列表示例&apos; list={
[
{ title: &apos;项目一&apos;, link: &apos;#list&apos; },
{ title: &apos;项目二&apos;, children: [{
title: &apos;子项目&apos;, link: &apos;#&apos;
}] }
]
} /&gt;&lt;/p&gt;
&lt;p&gt;&amp;#x3C;CardList title=&apos;折叠列表示例&apos; list={
[{title: &apos;我被隐藏了！&apos;}]
} collapse /&gt;
&amp;#x3C;CardList title=&apos;普通列表示例&apos; list={
[
{ title: &apos;项目一&apos;, link: &apos;#list&apos; },
{ title: &apos;项目二&apos;, children: [{
title: &apos;子项目&apos;, link: &apos;#&apos;
}] }
]
} /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;#x3C;/Fragment&gt;
&amp;#x3C;/MdxRepl&gt;

### 时间线 (Timeline)

&amp;#x3C;MdxRepl&gt;
import { Timeline } from &apos;astro-pure/user&apos;

&amp;#x3C;Timeline events={
[
  { date: &apos;2021年8月&apos;, content: &apos;你好&apos; },
  { date: &apos;2022年8月&apos;, content: &apos;&amp;#x3C;i&gt;世界！&amp;#x3C;/i&gt;&apos; },
]
} /&gt;

&amp;#x3C;Fragment slot=&apos;desc&apos;&gt;
```jsx
import { Timeline } from &apos;astro-pure/user&apos;

&amp;#x3C;Timeline events={
  [
    { date: &apos;2021年8月&apos;, content: &apos;你好&apos; },
    { date: &apos;2022年8月&apos;, content: &apos;&amp;#x3C;i&gt;世界！&amp;#x3C;/i&gt;&apos; },
  ]
} /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;步骤条 (Steps)&lt;/h3&gt;
&lt;p&gt;如何一键三连：&lt;/p&gt;
&lt;p&gt;有时也可以点个关注。
&lt;/p&gt;
&lt;p&gt;如何一键三连：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 有时也可以点个关注。
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;简单文本渲染 (Simple Text Render)&lt;/h2&gt;
&lt;h3&gt;按钮 (Button)&lt;/h3&gt;
&lt;h3&gt;剧透 (Spoiler)&lt;/h3&gt;
&lt;p&gt;没有人能找到我。 但我就暴露在这里。&lt;/p&gt;
&lt;p&gt;没有人能找到我。 但我就暴露在这里。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;#x3C;/Fragment&gt;
&amp;#x3C;/MdxRepl&gt;

### 格式化日期 (Formatted Date)

&amp;#x3C;MdxRepl&gt;
import { FormattedDate } from &apos;astro-pure/user&apos;

&amp;#x3C;FormattedDate date={new Date(&apos;2077-01-01&apos;)} dateTimeOptions={{ month: &apos;short&apos; }} /&gt;

&amp;#x3C;Fragment slot=&apos;desc&apos;&gt;
```jsx
import { FormattedDate } from &apos;astro-pure/user&apos;

&amp;#x3C;FormattedDate date={new Date(&apos;2077-01-01&apos;)} dateTimeOptions={{ month: &apos;short&apos; }} /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;标签 (Label)&lt;/h3&gt;
&lt;h3&gt;SVG 加载器 (SVG Loader)&lt;/h3&gt;
&lt;p&gt;&amp;#x3C;Svg src={import(&apos;@/assets/icons/key.svg?raw&apos;)} /&gt;&lt;/p&gt;
&lt;p&gt;&amp;#x3C;Svg src={import(&apos;@/assets/icons/key.svg?raw&apos;)} /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;#x3C;/Fragment&gt;
&amp;#x3C;/MdxRepl&gt;

## 资源 (Resources)

### 图标 (Icon)

&amp;#x3C;MdxRepl width=&apos;100%&apos;&gt;
&amp;#x3C;div&gt;
import { Icon } from &apos;astro-pure/user&apos;

单次使用：&amp;#x3C;Icon name=&apos;rss&apos; class=&apos;inline&apos; /&gt;

预览所有可用图标（点击按钮复制名称）：

import { Icons as allIcons } from &apos;astro-pure/libs&apos;

&amp;#x3C;div class=&apos;flex flex-wrap gap-2&apos;&gt;
{
Object.keys(allIcons).map(icon =&gt; {
  const script = `navigator.clipboard.writeText(&apos;${icon}&apos;);document.dispatchEvent(new CustomEvent(&apos;toast&apos;,{detail:{message:&apos;已将 &quot;${icon}&quot; 复制到剪贴板！&apos;}}))`
  return (
    &amp;#x3C;Button as=&apos;button&apos; type=&apos;button&apos; class=&apos;cursor-pointer&apos; onClick={script}&gt;
      &amp;#x3C;Icon slot=&apos;before&apos; name={icon} /&gt;
      &amp;#x3C;span&gt;{icon}&amp;#x3C;/span&gt;
    &amp;#x3C;/Button&gt;
  )
})
}
&amp;#x3C;/div&gt;
&amp;#x3C;/div&gt;

&amp;#x3C;Fragment slot=&apos;desc&apos;&gt;
```jsx
import { Icon } from &apos;astro-pure/user&apos;

单次使用：&amp;#x3C;Icon name=&apos;rss&apos; class=&apos;inline&apos; /&gt;

预览所有可用图标（点击按钮复制名称）：

import { Icons as allIcons } from &apos;astro-pure/libs&apos;
import { Button } from &apos;astro-pure/user&apos;

&amp;#x3C;div class=&apos;flex flex-wrap gap-2&apos;&gt;
{
  Object.keys(allIcons).map(icon =&gt; {
    const script = `navigator.clipboard.writeText(&apos;${icon}&apos;);document.dispatchEvent(new CustomEvent(&apos;toast&apos;,{detail:{message:&apos;已将 &quot;${icon}&quot; 复制到剪贴板！&apos;}}))`
    return (
      &amp;#x3C;Button as=&apos;button&apos; type=&apos;button&apos; class=&apos;cursor-pointer&apos; onclick={script}&gt;
        &amp;#x3C;Icon slot=&apos;before&apos; name={icon} /&gt;
        &amp;#x3C;span&gt;{icon}&amp;#x3C;/span&gt;
      &amp;#x3C;/Button&gt;
    )
  })
}
&amp;#x3C;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;还有一些 &lt;a href=&quot;/docs/integrations/advanced&quot;&gt;高级组件&lt;/a&gt;，可能适合您。希望您喜欢使用这些组件！&lt;/p&gt;</content:encoded></item><item><title>内容展示</title><link>https://astro-pure.js.org/docs/integrations/content-present</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/content-present</guid><description>关于内容页面渲染</description><content:encoded>&lt;p&gt;import { MdxRepl } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;Shiki 代码&lt;/h2&gt;
&lt;p&gt;您可以在配置文件 &lt;code&gt;astro.config.ts&lt;/code&gt; 中的 &lt;code&gt;defineConfig.markdown.shikiConfig&lt;/code&gt; 处更改转换器。&lt;/p&gt;
&lt;h3&gt;基本用法&lt;/h3&gt;
&lt;p&gt;对于 &lt;code&gt;.astro&lt;/code&gt; 文件：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import { Code } from &apos;astro:components&apos;
---

&amp;#x3C;Code lang=&apos;shell&apos; code={`git log --oneline`} /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;对于 &lt;code&gt;.mdx&lt;/code&gt; 和 &lt;code&gt;.md&lt;/code&gt; 文件：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;```shell
git log --oneline
```
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;添加标题&lt;/h3&gt;
&lt;p&gt;bun check &amp;#x26;
bun dev&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;#x3C;Fragment slot=&apos;desc&apos;&gt;
````markdown
```shell title=&quot;start.sh&quot;
#!/bin/bash

bun check &amp;#x26;
bun dev
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;#x3C;/Fragment&gt;
&amp;#x3C;/MdxRepl&gt;

### 显示差异

支持添加和删除行。

&amp;#x3C;MdxRepl width=&apos;80%&apos;&gt;
```shell title=&quot;deploy.sh&quot;
#!/bin/bash

bun check
bun lint
bun format # [!code ++]
# 不需要 vercel 或其他 ci/cd
bun run build # [!code --]
git push
```

&amp;#x3C;Fragment slot=&apos;desc&apos;&gt;
````markdown
```shell title=&quot;deploy.sh&quot;
#!/bin/bash

bun check
bun lint
bun format # [\!code ++]
# 不需要 vercel 或其他 ci/cd
bun run build # [\!code --]
git push
```
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;显示高亮&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;内容过时警告&lt;/h2&gt;
&lt;p&gt;如果文章足够旧，添加警告消息。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
// ...
---
  &amp;#x3C;Hero {data} {remarkPluginFrontmatter} slot=&apos;header&apos;&gt;
    &amp;#x3C;Fragment slot=&apos;description&apos;&gt;
      {!isDraft &amp;#x26;&amp;#x26; enableComment &amp;#x26;&amp;#x26; &amp;#x3C;PageInfo comment class=&apos;mt-1&apos; /&gt;}
      { // [!code ++]
        Math.floor((Date.now() - new Date(articleDate).getTime()) / 86400000) &gt; 365 &amp;#x26;&amp;#x26; ( // [!code ++]
          &amp;#x3C;p class=&apos;mt-1 text-sm italic text-primary&apos; style=&apos;--primary:41 90% 50%&apos;&gt; &amp;#x3C;!-- [!code ++] --&gt;
            本文最后更新已超过一年，部分信息可能已过时。 &amp;#x3C;!-- [!code ++] --&gt;
          &amp;#x3C;/p&gt; /* [!code ++] */
        ) // [!code ++]
      } &amp;#x3C;!-- [!code ++] --&gt;
    &amp;#x3C;/Fragment&gt;
  &amp;#x3C;/Hero&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;它将渲染如下：&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;</content:encoded></item><item><title>友链</title><link>https://astro-pure.js.org/docs/integrations/links</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/links</guid><description>友链配置</description><content:encoded>&lt;p&gt;import { Steps } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;移除友链页面&lt;/h2&gt;
&lt;p&gt;友链页面是用于显示您朋友博客链接的页面，默认启用。&lt;/p&gt;
&lt;p&gt;如果您出于任何原因想要移除友链页面，请按照本节中的步骤操作。否则，您可以跳过本节继续阅读下一章。&lt;/p&gt;
&lt;p&gt;在 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中将 &lt;code&gt;links.enable&lt;/code&gt; 设置为 &lt;code&gt;false&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  // ...
  links: {
    enable: false // [!code highlight]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;此外，请记得删除以下文件夹和文件：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src/components/links/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/pages/links/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;public/links.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;基本配置&lt;/h2&gt;
&lt;p&gt;友链的基本配置位于 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中。您可以添加朋友的日志或自己的链接信息。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  links: {
    // 朋友日志
    logbook: [
      { date: &apos;2025-03-16&apos;, content: &apos;有泄漏吗？&apos; },
      { date: &apos;2025-03-16&apos;, content: &apos;什么泄漏？&apos; },
      { date: &apos;2025-03-16&apos;, content: &apos;我的座位上全是水，像，全是水！&apos; },
      { date: &apos;2025-03-16&apos;, content: &apos;一定是水。&apos; },
      { date: &apos;2025-03-16&apos;, content: &apos;让我们把它添加到智慧的话语中。&apos; },
    ],
    // 您自己的链接信息
    applyTip: {
      name: theme.title,
      desc: theme.description || &apos;Null&apos;,
      url: &apos;https://astro-pure.js.org/&apos;,
      avatar: &apos;https://astro-pure.js.org/favicon/favicon.ico&apos;
    }
  },
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;友链配置&lt;/h2&gt;
&lt;p&gt;友链配置位于 &lt;code&gt;public/links.json&lt;/code&gt; 文件中。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;friends&quot;: [
    {
      &quot;id_name&quot;: &quot;cf-links&quot;,
      &quot;desc&quot;: &quot;朋友圈中包含的常见链接&quot;,
      &quot;link_list&quot;: [
        { // [!code highlight:6]
          &quot;name&quot;: &quot;Elysia&quot;,
          &quot;intro&quot;: &quot;嗨，你想我了吗？无论何时何地，Elysia 都会回报你所有的期待。&quot;,
          &quot;link&quot;: &quot;https://honkaiimpact3.fandom.com/wiki/Elysia&quot;,
          &quot;avatar&quot;: &quot;https://0.gravatar.com/avatar/&quot;
          // 在这里你也可以留下一些其他字段作为备注
        },
      ]
    },
    {
      &quot;id_name&quot;: &quot;inactive-links&quot;,
      &quot;desc&quot;: &quot;不活跃或违规的朋友&quot;,
      &quot;link_list&quot;: [] // 你可以暂时把一些不好的链接留在这里
    },
    {
      &quot;id_name&quot;: &quot;special-links&quot;,
      &quot;desc&quot;: &quot;其他特殊链接&quot;,
      &quot;link_list&quot;: [] // 不是你朋友的特殊链接
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;与 &lt;code&gt;Friend-Circle-Lite&lt;/code&gt; 集成&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/willow-god/Friend-Circle-Lite&quot;&gt;Friend-Circle-Lite&lt;/a&gt; 是一个精简版的友链应用，没有后端，仅使用 github action 运行。&lt;/p&gt;
&lt;p&gt;它需要：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;一个启用了 github action 的 github 仓库。&lt;/li&gt;
&lt;li&gt;一个静态站点服务器，如 Vercel、Netlify、GitHub Pages 等。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;此主题尚未集成它，将来也不会提供支持。但请放心，本文档将指导您集成它。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Fork &lt;a href=&quot;https://github.com/cworld1/friend-circle-lite&quot;&gt;Friend-Circle-Lite&lt;/a&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;修改您 fork 的仓库中的 &lt;code&gt;config.yaml&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;spider_settings:
   enable: true
   json_url: &quot;&amp;#x3C;your-site&gt;/links.json&quot; # [!code highlight]
   article_count: 4
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;转到 &quot;Actions&quot; 页面并手动运行工作流 &quot;Friend Circle Lite&quot; 以检查它是否正常工作。这也会在 &quot;page&quot; 分支中生成服务器文件。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;查看 &lt;a href=&quot;https://github.com/willow-god/Friend-Circle-Lite?tab=readme-ov-file#%E9%83%A8%E7%BD%B2%E9%9D%99%E6%80%81%E7%BD%91%E7%AB%99&quot;&gt;文档&lt;/a&gt; 将服务器文件部署到您的静态站点服务器。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 &lt;a href=&quot;https://gist.github.com/cworld1/cf0dc6daa89264e6d745d3e68ef8c01c&quot;&gt;获取脚本文件 &lt;code&gt;friendCircle.ts&lt;/code&gt;&lt;/a&gt; 添加到您项目的 &lt;code&gt;src/plugins&lt;/code&gt; 路径中。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 &lt;a href=&quot;https://gist.github.com/cworld1/cf0dc6daa89264e6d745d3e68ef8c01c?permalink_comment_id=5311916#gistcomment-5311916&quot;&gt;样式文件 &lt;code&gt;fc.css&lt;/code&gt;&lt;/a&gt; 添加到您项目的 &lt;code&gt;src/assets/styles&lt;/code&gt; 路径中。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;在 &lt;code&gt;src/components/pages/links/index.astro&lt;/code&gt; 中添加初始化代码：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
const headings = [
   // ...
   { depth: 2, slug: &apos;small-circle&apos;, text: &apos;小圈子&apos; }, // [!code highlight]
]
---

&amp;#x3C;PageLayout&gt;
   {/* ... */}
   &amp;#x3C;!-- [!code highlight:16] --&gt;
   &amp;#x3C;h2 id=&apos;small-circle&apos;&gt;小圈子&amp;#x3C;/h2&gt;
   &amp;#x3C;div id=&apos;friend-circle-lite-root&apos; class=&apos;not-prose&apos;&gt;加载中...&amp;#x3C;/div&gt;
   &amp;#x3C;script&gt;
      import &apos;@/assets/styles/fc.css&apos;

      import { FriendCircle } from &apos;@/plugins/friendCircle&apos;

      const fc = new FriendCircle()
      fc.init({
         private_api_url: &apos;&amp;#x3C;your-fc-lite-server&gt;&apos;,
         page_turning_number: 10,
         error_img: &apos;https://cravatar.cn/avatar/57d8260dfb55501c37dde588e7c3852c&apos;
      })
      fc.load()
   &amp;#x3C;/script&gt;
&amp;#x3C;/PageLayout&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;</content:encoded></item><item><title>其他集成</title><link>https://astro-pure.js.org/docs/integrations/others</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/others</guid><description>帮助改进您网站的其他集成</description><content:encoded>&lt;p&gt;import { Aside, Tabs, TabItem, Steps } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;medium-zoom&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;查看 &lt;a href=&quot;https://github.com/francoischalifour/medium-zoom&quot;&gt;medium-zoom&lt;/a&gt; 了解更多。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  // ...
  // 一个可以添加缩放效果的灯箱库
  mediumZoom: {
    enable: true, // 禁用它将不会加载整个库
    selector: &apos;.prose .zoomable&apos;,
    options: {
      className: &apos;zoomable&apos;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;此主题默认已在 &lt;code&gt;BlogPost.astro&lt;/code&gt; 中集成了它，这意味着 &lt;code&gt;src/content/blog&lt;/code&gt; 中的任何内容都不需要导入。如果您想在任何其他布局或页面中使用它，可以使用以下代码：&lt;/p&gt;
&lt;p&gt;// .zoomable 类将通过 remark 插件自动添加
&lt;img src=&quot;path/to/image.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;@playform/compress&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;查看 &lt;a href=&quot;https://github.com/PlayForm/Compress&quot;&gt;playform/compress&lt;/a&gt; 了解更多。&lt;/p&gt;
&lt;h2&gt;Friend-Circle-Lite&lt;/h2&gt;
&lt;p&gt;请参阅 &lt;a href=&quot;/docs/integrations/links#integrated-with-friend-circle-lite&quot;&gt;友链 #与 &lt;code&gt;Friend-Circle-Lite&lt;/code&gt; 集成&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;LateX 支持&lt;/h2&gt;
&lt;p&gt;如果将来此主题移除了对 LateX 的默认支持，这里有一个教程可以帮助您添加支持。&lt;/p&gt;
&lt;p&gt;在 Astro.js 中渲染 LaTeX 可以丰富您的 markdown 文件，添加数学表达式，使您的内容既吸引人又信息丰富。以下步骤概述了将 LaTeX 集成到 Astro.js 中的必要步骤，并解决了可能出现的问题及其解决方案。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;安装必要的包&lt;/p&gt;
&lt;p&gt;首先安装 &lt;code&gt;remark-math&lt;/code&gt; 和 &lt;code&gt;rehype-katex&lt;/code&gt;。这些包分别用于解析和渲染 LaTeX。使用以下安装命令：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;bun install remark-math rehype-katex
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;配置 Astro&lt;/p&gt;
&lt;p&gt;修改您的 Astro 配置以使用这些插件。在 &lt;code&gt;astro.config.ts&lt;/code&gt; 中的 markdown 配置部分添加这些插件：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;import { defineConfig } from &apos;astro/config&apos;;
import remarkMath from &apos;remark-math&apos;;
import rehypeKatex from &apos;rehype-katex&apos;;

export default defineConfig({
   // ...
   markdown: {
      remarkPlugins: [remarkMath],
      rehypePlugins: [rehypeKatex],
   },
});
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;包含 KaTeX CSS&lt;/p&gt;
&lt;p&gt;为了确保 LaTeX 公式样式正确，在您的 HTML 布局中包含 KaTeX CSS（在此主题中，它将位于 &lt;code&gt;BlogPost.astro&lt;/code&gt; 文件中）。添加以下 CSS 资源：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import &apos;katex/dist/katex.min.css&apos;
---
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者使用 CDN 以提高速度：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import config from &apos;@/site-config&apos;
---
&amp;#x3C;link rel=&quot;stylesheet&quot; href={`${config.npmCDN}/katex@0.16.15/dist/katex.min.css`}&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;建议添加一些 CSS 代码：&lt;/p&gt;
&lt;p&gt;为了确保 LaTeX 公式显示更好，您可能需要将以下代码添加到 &lt;code&gt;public/styles/global.css&lt;/code&gt; 中：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;span.katex-display {
  overflow-y: scroll;
  padding: 0.5rem;
}
.katex-html {
  overflow: auto hidden;
  padding: 3px;
}
.katex-html .base {
  margin-block: 0;
  margin-inline: auto;
}
.katex-html .tag {
  position: relative !important;
  display: inline-block;
  padding-inline-start: 0.5rem;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;常见问题和解决方案：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CSS 样式问题&lt;/p&gt;
&lt;p&gt;问题：如果未加载 KaTeX CSS，LaTeX 公式可能无法使用正确的样式渲染。&lt;/p&gt;
&lt;p&gt;解决方案：确认 KaTeX 样式表链接正确放置在 HTML 头部，并且加载没有问题。检查是否有网络错误或限制导致 CSS 无法加载。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;构建错误&lt;/p&gt;
&lt;p&gt;问题：处理 LaTeX 语法时构建时出错。&lt;/p&gt;
&lt;p&gt;解决方案：确保您的 LaTeX 格式正确，并且您的 markdown 文件中没有语法错误。LaTeX 语法错误会破坏解析器并导致构建失败。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>UnoCSS 与样式</title><link>https://astro-pure.js.org/docs/integrations/unocss</link><guid isPermaLink="true">https://astro-pure.js.org/docs/integrations/unocss</guid><description>更改网站外观并创建自定义样式</description><content:encoded>&lt;h2&gt;UnoCSS 更改外观&lt;/h2&gt;
&lt;p&gt;您可以通过修改 &lt;code&gt;src/assets/styles/app.css&lt;/code&gt; 中的 CSS 文件来自定义主题默认的 UnoCSS 调色板。例如，如果您想更改默认主题颜色，可以修改以下代码：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;:root {
  /* ... */
  --primary: 200 29% 45%; /* [!code --] */
  --primary: &amp;#x3C;使用原始 hsl 的您喜欢的颜色&gt;; /* [!code ++] */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;同样，要更改默认字体系列，您可以修改以下代码：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;:root {
  /* ... */
  font-family: &apos;Satoshi&apos;; /* [!code --] */
  src: url(&apos;/fonts/Satoshi-Variable.ttf&apos;); /* [!code --] */
  font-family: &apos;&amp;#x3C;您喜欢的字体系列&gt;&apos;; /* [!code ++] */
  src: url(&apos;/fonts/&amp;#x3C;您喜欢的字体&gt;.ttf&apos;); /* [!code ++] */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;请确保将您的自定义字体文件放在 &lt;code&gt;public/fonts&lt;/code&gt; 目录中。&lt;/p&gt;
&lt;h2&gt;UnoCSS 配置&lt;/h2&gt;
&lt;p&gt;文件：&lt;code&gt;uno.config.ts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;了解更多：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://unocss.dev/integrations/astro&quot;&gt;UnoCSS: Astro 集成&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://unocss.dev/config&quot;&gt;UnoCSS: 配置 UnoCSS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;code&gt;@unocss/preset-typography&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;排版配置可以在 &lt;code&gt;uno.config.ts&lt;/code&gt; 中修改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;const typographyConfig = {
  // prettier-ignore
  cssExtend: { // [!code highlight:3]
    // ...
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但如果您想通过 UnoCSS 自定义排版，或者只是更改预设排版主题，您可以在 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中进行：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const integ: IntegrationUserConfig = {
  // ...
  typography: {
    class: &apos;prose text-base text-muted-foreground&apos; // [!code highlight]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;查看 &lt;a href=&quot;https://unocss.dev/presets/typography&quot;&gt;Typography 预设&lt;/a&gt; 了解更多。&lt;/p&gt;</content:encoded></item><item><title>撰写内容</title><link>https://astro-pure.js.org/docs/setup/content</link><guid isPermaLink="true">https://astro-pure.js.org/docs/setup/content</guid><description>创建您自己的内容</description><content:encoded>&lt;p&gt;import { Aside } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;p&gt;Astro 帮助您 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/content/&quot;&gt;编写并展示您的内容&lt;/a&gt;。您可以使用 Markdown/MDX 在 Astro 中直接撰写博客文章，或者从 headless CMS 获取内容。Astro 允许您围绕内容构建网站：您可以为页面添加布局、创建文章索引，并设置 RSS 订阅。&lt;/p&gt;
&lt;h2&gt;编写内容&lt;/h2&gt;
&lt;p&gt;在 Astro 中，您可以通过多种方式编写内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在 Markdown 文件（&lt;code&gt;.md&lt;/code&gt; 或 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/markdown-content/&quot;&gt;其他扩展名&lt;/a&gt;）中编写，旨在轻松编写富文本内容。&lt;/li&gt;
&lt;li&gt;在 MDX (&lt;code&gt;.mdx&lt;/code&gt;) 或 Markdoc (&lt;code&gt;.mdoc&lt;/code&gt;) 文件中通过 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/integrations-guide/&quot;&gt;官方集成&lt;/a&gt; 编写，可以在文档中包含组件和动态表达式。&lt;/li&gt;
&lt;li&gt;使用 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/content/#headless-cms-authoring&quot;&gt;第三方内容管理系统 (CMS)&lt;/a&gt;，然后将内容拉取到 &lt;code&gt;.astro&lt;/code&gt; 页面中。&lt;/li&gt;
&lt;li&gt;其他选项（较少用于内容密集型页面）包括 &lt;a href=&quot;https://docs.astro.build/zh-cn/basics/astro-pages/#astro-pages&quot;&gt;&lt;code&gt;.astro&lt;/code&gt; 文件&lt;/a&gt; 和 &lt;a href=&quot;https://docs.astro.build/zh-cn/basics/astro-pages/#html-pages&quot;&gt;&lt;code&gt;.html&lt;/code&gt; 文件&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;对于本主题，默认支持 &lt;code&gt;.md&lt;/code&gt; 和 &lt;code&gt;.mdx&lt;/code&gt;。&lt;/p&gt;
&lt;h3&gt;Markdown 编写&lt;/h3&gt;
&lt;p&gt;Markdown 是一种方便的语法，用于编写具有基本格式和常见元素（如标题、列表和图像）的富文本。Astro 内置了对项目中 Markdown 文件的支持。&lt;/p&gt;
&lt;p&gt;在您的代码编辑器中创建并编写一个新的 &lt;code&gt;.md&lt;/code&gt; 文件，或者导入在您喜欢的 Markdown 编辑器中编写的现有文件。一些在线 Markdown 编辑器（如 &lt;a href=&quot;https://stackedit.io/&quot;&gt;StackEdit&lt;/a&gt; 和 &lt;a href=&quot;https://dillinger.io&quot;&gt;Dillinger&lt;/a&gt;）甚至允许您编辑并同步您的工作到存储在 GitHub 上的 Astro 仓库。&lt;/p&gt;
&lt;p&gt;下面是 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/markdown-content/&quot;&gt;在 Astro 中编写 Markdown 内容&lt;/a&gt; 的示例：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
title: &apos;第一篇文章&apos; # (必填，最多 60 字符)
description: &apos;我喜欢写文章。&apos; # (必填，10 到 160 字符)
publishDate: &apos;2024-11-30 00:08:00&apos; # (必填，日期格式)
tags:
  - Markdown # (也可以像下一行那样写格式)
heroImage: { src: &apos;./thumbnail.jpg&apos;, alt: &apos;文章封面图&apos;, color: &apos;#B4C6DA&apos; }
# thumbnail.jpg 应与文章位于同一文件夹中
draft: false # (设置为 true 将仅在开发环境中显示)
language: &apos;中文&apos; # (可以根据需要填写字符串)
comment: true # (设置为 false 将禁用评论，即使在 site-config 中已启用)
---

## 这是一个标题

这是一个段落。
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果您有很多资源，可以为标题创建一个文件夹，例如 &lt;code&gt;src/content/blog/first-article/&lt;/code&gt;，并将所有资源放在那里。当然，您的内容文件应重命名为 &lt;code&gt;index.md&lt;/code&gt; 或 &lt;code&gt;index.mdx&lt;/code&gt; 并包含在此文件夹中。&lt;/p&gt;
&lt;p&gt;如果您想为 &lt;code&gt;heroImage&lt;/code&gt; 使用远程图像，请在 &lt;code&gt;heroImage&lt;/code&gt; 对象中添加 &lt;code&gt;inferSize: true&lt;/code&gt; 或指定 &lt;code&gt;width&lt;/code&gt; 和 &lt;code&gt;height&lt;/code&gt;。示例：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;heroImage:
  { src: &apos;https://img.tukuppt.com/ad_preview/00/15/09/5e715a320b68e.jpg!/fw/980&apos;, inferSize: true }
# 或者指定宽度和高度
heroImage:
  { src: &apos;https://img.tukuppt.com/ad_preview/00/15/09/5e715a320b68e.jpg!/fw/980&apos;, width: 980, height: 551 }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;太复杂了？简单示例只需要这些：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
title: 简单文章
description: 只是另一篇简单的文章。
publishDate: 2024-07-26
---

我喜欢写简单的文章。
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;MDX 编写&lt;/h3&gt;
&lt;p&gt;这允许您在文本内容中包含 UI 元素，例如横幅或交互式轮播。&lt;/p&gt;
&lt;p&gt;在您的代码编辑器中直接编写和编辑 &lt;code&gt;.mdx&lt;/code&gt; 文件，就像处理项目文件一样。MDX 文件是 Astro 中 &lt;a href=&quot;https://docs.astro.build/zh-cn/basics/astro-pages/#supported-page-files&quot;&gt;支持的页面文件类型&lt;/a&gt;，也可以用作 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/content/#content-collections&quot;&gt;内容集合条目&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;关于集成的组件，请查看 &lt;a href=&quot;/docs/integrations/components&quot;&gt;用户组件&lt;/a&gt; 和 &lt;a href=&quot;/docs/integrations/advanced&quot;&gt;高级组件&lt;/a&gt;。&lt;/p&gt;
&lt;h3&gt;连接 CMS&lt;/h3&gt;
&lt;p&gt;参见 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/cms/&quot;&gt;Astro: 在 Astro 中使用 CMS&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;页面&lt;/h2&gt;
&lt;p&gt;Astro 使用 &lt;strong&gt;基于文件的路由&lt;/strong&gt;，根据项目 &lt;code&gt;src/pages/&lt;/code&gt; 目录的文件布局来 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/routing/&quot;&gt;生成您的构建 URL&lt;/a&gt;。&lt;/p&gt;
&lt;h3&gt;路由&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;src/pages/&lt;/code&gt; 目录中的 &lt;code&gt;.astro&lt;/code&gt; &lt;a href=&quot;https://docs.astro.build/zh-cn/basics/astro-pages/&quot;&gt;页面组件&lt;/a&gt; 以及 Markdown 和 MDX 文件 (&lt;code&gt;.md&lt;/code&gt;, &lt;code&gt;.mdx&lt;/code&gt;) &lt;strong&gt;会自动成为您网站上的页面&lt;/strong&gt;。每个页面的路由与其在 &lt;code&gt;src/pages/&lt;/code&gt; 目录中的路径和文件名相对应。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-diff&quot;&gt;# 示例：静态路由
src/pages/index.astro        -&gt; mysite.com/
src/pages/about.astro        -&gt; mysite.com/about
src/pages/about/index.astro  -&gt; mysite.com/about
src/pages/about/me.astro     -&gt; mysite.com/about/me
src/pages/posts/1.md         -&gt; mysite.com/posts/1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在 Astro 项目中无需维护单独的“路由配置”！当您在 &lt;code&gt;src/pages/&lt;/code&gt; 目录中添加文件时，系统会自动为您创建一个新路由。在静态构建中，您可以使用 &lt;a href=&quot;https://docs.astro.build/zh-cn/reference/configuration-reference/#buildformat&quot;&gt;&lt;code&gt;build.format&lt;/code&gt;&lt;/a&gt; 配置选项来自定义文件输出格式。&lt;/p&gt;
&lt;h3&gt;Astro 页面&lt;/h3&gt;
&lt;p&gt;Astro 页面使用 &lt;code&gt;.astro&lt;/code&gt; 文件扩展名，并支持与 &lt;a href=&quot;https://docs.astro.build/zh-cn/basics/astro-components/&quot;&gt;Astro 组件&lt;/a&gt; 相同的功能。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---

---

&amp;#x3C;html lang=&apos;zh-CN&apos;&gt;
  &amp;#x3C;head&gt;
    &amp;#x3C;title&gt;我的首页&amp;#x3C;/title&gt;
  &amp;#x3C;/head&gt;
  &amp;#x3C;body&gt;
    &amp;#x3C;h1&gt;欢迎来到我的网站！&amp;#x3C;/h1&gt;
  &amp;#x3C;/body&gt;
&amp;#x3C;/html&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;页面必须生成完整的 HTML 文档。如果未明确包含，Astro 默认会为 &lt;code&gt;src/pages/&lt;/code&gt; 目录下的任何 &lt;code&gt;.astro&lt;/code&gt; 组件添加必要的 &lt;code&gt;&amp;#x3C;!DOCTYPE html&gt;&lt;/code&gt; 声明和 &lt;code&gt;&amp;#x3C;head&gt;&lt;/code&gt; 内容。您可以通过将页面标记为 &lt;a href=&quot;#page-partials&quot;&gt;局部页面 (partial)&lt;/a&gt; 来按组件选择退出此行为。&lt;/p&gt;
&lt;p&gt;为了避免在每个页面上重复相同的 HTML 元素，您可以将通用的 &lt;code&gt;&amp;#x3C;head&gt;&lt;/code&gt; 和 &lt;code&gt;&amp;#x3C;body&gt;&lt;/code&gt; 元素移入您自己的 &lt;a href=&quot;/zh-cn/basics/layouts/&quot;&gt;布局组件&lt;/a&gt;。您可以根据需要使用任意数量的布局组件。&lt;/p&gt;
&lt;p&gt;在本主题中，幸运的是您可以使用 &lt;code&gt;BaseLayout.astro&lt;/code&gt; 作为您的布局组件。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import PageLayout from &apos;@/layouts/BaseLayout.astro&apos; // [!code highlight]

const meta = {
  title: &apos;我的页面&apos;,
  description: &apos;我最喜欢的页面&apos;
}
const highlightColor = &apos;#44AEF6&apos; // 可选
---

&amp;#x3C;PageLayout {meta} {highlightColor}&gt;
  &amp;#x3C;!-- [!code highlight] --&gt;
  &amp;#x3C;p&gt;我的页面内容，包裹在布局中！&amp;#x3C;/p&gt;
&amp;#x3C;/PageLayout&gt;
&amp;#x3C;!-- [!code highlight] --&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Markdown/MDX 页面&lt;/h3&gt;
&lt;p&gt;虽然 &lt;code&gt;.astro&lt;/code&gt; 页面具有一些灵活的功能，并且对内联/模块脚本更友好，但 &lt;code&gt;.md&lt;/code&gt; 和 &lt;code&gt;.mdx&lt;/code&gt; 页面更适合以内容为中心的页面。&lt;/p&gt;
&lt;p&gt;Astro 还将 &lt;code&gt;src/pages/&lt;/code&gt; 内的任何 Markdown (&lt;code&gt;.md&lt;/code&gt;) 文件视为最终网站中的页面。如果您安装了 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/integrations-guide/mdx/#installation&quot;&gt;MDX 集成&lt;/a&gt;，它也会以相同的方式处理 MDX (&lt;code&gt;.mdx&lt;/code&gt;) 文件。&lt;/p&gt;
&lt;p&gt;对于共享相似结构的目录（如博客文章或产品项目），请考虑创建 &lt;a href=&quot;/zh-cn/guides/content-collections/&quot;&gt;内容集合 (content collections)&lt;/a&gt; 而不是直接在 pages 下创建文件。&lt;/p&gt;
&lt;p&gt;Markdown 文件可以使用特殊的 &lt;code&gt;layout&lt;/code&gt; frontmatter 属性来指定一个 &lt;a href=&quot;https://docs.astro.build/zh-cn/basics/layouts/&quot;&gt;布局组件&lt;/a&gt;，该组件会将 Markdown 内容包裹在完整的 &lt;code&gt;&amp;#x3C;html&gt;...&amp;#x3C;/html&gt;&lt;/code&gt; 页面文档中。&lt;/p&gt;
&lt;p&gt;本主题为 &lt;code&gt;.md&lt;/code&gt; 和 &lt;code&gt;.mdx&lt;/code&gt; 文件提供了一个优秀的布局：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
layout: &apos;@/layouts/IndividualPage.astro&apos;

title: &apos;隐私政策&apos;
description: &apos;生效日期: 2024-11-26&apos;
language: &apos;中文&apos; # 可选
back: &apos;/terms/list&apos; # 可选，默认为 &apos;/&apos;
heroImage: { src: &apos;./thumbnail.jpg&apos; } # 将用于社交分享图
---

## 隐私政策 1

这是隐私政策的第一部分。
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;HTML 页面&lt;/h3&gt;
&lt;p&gt;扩展名为 &lt;code&gt;.html&lt;/code&gt; 的文件可以放在 &lt;code&gt;src/pages/&lt;/code&gt; 目录中，并直接用作您网站上的页面。请注意，&lt;a href=&quot;https://docs.astro.build/zh-cn/basics/astro-components/#html-components&quot;&gt;HTML 组件&lt;/a&gt; 不支持某些核心 Astro 功能。&lt;/p&gt;</content:encoded></item><item><title>配置</title><link>https://astro-pure.js.org/docs/setup/configuration</link><guid isPermaLink="true">https://astro-pure.js.org/docs/setup/configuration</guid><description>配置文件说明</description><content:encoded>&lt;h2&gt;主题配置&lt;/h2&gt;
&lt;p&gt;文件: &lt;code&gt;src/site.config.ts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;等待更新...&lt;/p&gt;
&lt;h2&gt;Astro 配置&lt;/h2&gt;
&lt;p&gt;文件: &lt;code&gt;astro.config.ts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;您可以配置它来更改部署方法、添加 rehype 和 remark 插件等。&lt;/p&gt;
&lt;p&gt;阅读更多关于 Astro 配置的内容，请点击 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/configuring-astro/&quot;&gt;此处&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;ESLint 配置&lt;/h2&gt;
&lt;p&gt;文件: &lt;code&gt;eslint.config.mjs&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;您可以配置 ESLint 以更改规则和安全检查。&lt;/p&gt;
&lt;p&gt;阅读更多关于 ESLint 配置的内容，请点击 &lt;a href=&quot;https://eslint.org/docs/latest/use/configure/configuration-files&quot;&gt;此处&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;Prettier 配置&lt;/h2&gt;
&lt;p&gt;文件: &lt;code&gt;prettier.config.mjs&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;您可以配置 Prettier 以更改代码格式化规则，这可以改变您使用包管理器命令 &lt;code&gt;format&lt;/code&gt; 以及您喜欢的 IDE 扩展支持的体验。&lt;/p&gt;
&lt;p&gt;选项可在 &lt;a href=&quot;https://prettier.io/docs/en/options&quot;&gt;此处&lt;/a&gt; 查看。&lt;/p&gt;
&lt;h2&gt;UnoCSS 配置&lt;/h2&gt;
&lt;p&gt;文件: &lt;code&gt;uno.config.ts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;它是一个实用优先的 CSS 框架，用于构建自定义设计。主题还使用了它的 &lt;code&gt;typography&lt;/code&gt; 预设来进行排版设置。&lt;/p&gt;
&lt;p&gt;查看 &lt;a href=&quot;/docs/integrations/unocss&quot;&gt;UnoCSS 与样式&lt;/a&gt; 了解更多信息。&lt;/p&gt;
&lt;h2&gt;Typescript 配置&lt;/h2&gt;
&lt;p&gt;文件: &lt;code&gt;tsconfig.json&lt;/code&gt;&lt;/p&gt;</content:encoded></item><item><title>部署</title><link>https://astro-pure.js.org/docs/setup/deployment</link><guid isPermaLink="true">https://astro-pure.js.org/docs/setup/deployment</guid><description>将您的网站部署到各种平台</description><content:encoded>&lt;p&gt;import { Aside, Steps } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;包模式 (Package Mode)&lt;/h2&gt;
&lt;p&gt;本主题自 v4.0.0 版本起集成了 NPM 包模式。推荐的方式是移除本地包文件，并从 NPM 安装主题集成。如果由于某些原因您想修改包内容，则应将本地包链接到您的主题模板。主题已集成 &lt;code&gt;bun&lt;/code&gt; 方法，您需要：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;添加环境变量 &lt;code&gt;BUN_LINK_PKG=true&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;运行 &lt;code&gt;bun pure check&lt;/code&gt; 自动链接包。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;此方法也适用于部署到其他平台（如 Vercel）。您只需在平台的构建选项设置中添加该环境变量即可。构建命令 &lt;code&gt;astro-pure check &amp;#x26;&amp;#x26; astro check &amp;#x26;&amp;#x26; astro build&lt;/code&gt; 将会自动链接包。&lt;/p&gt;
&lt;h2&gt;部署模式&lt;/h2&gt;
&lt;p&gt;Astro 对部署提供了非常出色的支持。查看 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/deploy/&quot;&gt;部署您的 Astro 网站&lt;/a&gt; 了解更多信息。&lt;/p&gt;
&lt;h3&gt;Vercel&lt;/h3&gt;
&lt;p&gt;本主题默认支持 Vercel：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;将代码推送到您的在线 Git 仓库（GitHub, GitLab, BitBucket）。&lt;/li&gt;
&lt;li&gt;将 &lt;a href=&quot;https://vercel.com/new&quot;&gt;项目导入&lt;/a&gt; Vercel。&lt;/li&gt;
&lt;li&gt;Vercel 将自动检测 Astro 并配置正确的设置。&lt;/li&gt;
&lt;li&gt;您的应用程序已部署！（例如：&lt;a href=&quot;https://astro.vercel.app/&quot;&gt;astro.vercel.app&lt;/a&gt;）&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Vercel 也支持静态方法：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import vercelServerless from &apos;@astrojs/vercel/serverless&apos; // [!code --]
import vercelStatic from &apos;@astrojs/vercel/static&apos;; // [!code ++]

export default defineConfig({
  //   ...
  adapter: vercelServerless() // [!code --]
  adapter: vercelStatic(), // [!code ++]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Node 服务器&lt;/h3&gt;
&lt;p&gt;如果您是在本地使用 Node.js 部署，首先需要安装 &lt;code&gt;@astrojs/node&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;bun add &apos;@astrojs/node&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后按照 &lt;code&gt;astro.config.ts&lt;/code&gt; 中的注释进行如下修改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import node from &apos;@astrojs/node&apos; // [!code ++]
import vercelServerless from &apos;@astrojs/vercel/serverless&apos; // [!code --]

export default defineConfig({
  //   ...
  adapter: vercelServerless(), // [!code --]
  adapter: node({ mode: &apos;standalone&apos; }), // [!code ++]

  integrations: [
    // prettier-ignore
    outputCopier({ // [!code --]
      integ: [&apos;sitemap&apos;, &apos;pagefind&apos;] // [!code --]
    }) // [!code --]
  ]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Bun 服务器&lt;/h3&gt;
&lt;p&gt;Bun 也支持静态方法。&lt;/p&gt;
&lt;p&gt;查看 &lt;a href=&quot;https://www.npmjs.com/package/@nurodev/astro-bun&quot;&gt;@nurodev/astro-bun&lt;/a&gt; 了解更多信息。&lt;/p&gt;
&lt;h3&gt;静态部署&lt;/h3&gt;
&lt;p&gt;移除 &lt;code&gt;astro.config.ts&lt;/code&gt; 中所有的服务器适配器配置：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import vercelServerless from &apos;@astrojs/vercel/serverless&apos; // [!code --]

export default defineConfig({
  //   ...
  adapter: vercelServerless(), // [!code --]
  output: &apos;server&apos; // [!code --]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;参见 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/deploy/github/&quot;&gt;Astro: 为 GitHub Pages 配置 Astro&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;对于需要在具有基础路径（base path）的 GitHub Pages 上部署的用户（例如 &lt;code&gt;username.github.io/repo-name&lt;/code&gt;），请仔细阅读 &lt;a href=&quot;/docs/setup/deployment#%E5%85%B7%E6%9C%89%E5%9F%BA%E7%A1%80%E8%B7%AF%E5%BE%84%E7%9A%84%E5%B9%B3%E5%8F%B0&quot;&gt;部署#具有基础路径的平台&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;具有基础路径的平台&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Astro 提供了对基础路径的基本支持 —— 参见配置参考中的 &quot;base&quot; 选项：&lt;a href=&quot;https://docs.astro.build/zh-cn/reference/configuration-reference/#base&quot;&gt;Astro: base&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;本主题不建议使用基础路径，因为它会严重破坏远程开发的体验。一般来说，不建议在具有基础路径的情况下部署模板，因为首页集成了列表、简历元素和其他依赖于模板源结构的功能。&lt;/li&gt;
&lt;li&gt;如果您按照指南修改代码，可以使用基础路径进行部署，但您不能同时使用同一个项目副本在有和没有基础路径的情况下部署。请自行承担风险；除非您计划为文档改进做出贡献，否则请勿为此开设 Issue。&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;在 &lt;code&gt;astro.config.ts&lt;/code&gt; 中将 &lt;code&gt;base&lt;/code&gt; 选项设置为您的基础路径，例如：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export default defineConfig({
  //   ...
  base: &apos;/repo-name/&apos; // 替换为您的仓库名称
})
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;更新动态脚本文件中的所有内部链接：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src/components/BaseHead.astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/pages/docs/DocsContent.astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/pages/rss.xml.ts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;packages/pure/components/pages/PostPreview.astro&lt;/code&gt; (需要 &lt;a href=&quot;/docs/advanced/customize&quot;&gt;自定义主题&lt;/a&gt; 才能进行更改)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;更新所有静态资源路径：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中添加基础路径。特别是菜单配置。&lt;/li&gt;
&lt;li&gt;在 &lt;code&gt;src/plugins/shiki-transformers.ts&lt;/code&gt; 中为所有的 &lt;code&gt;/icons/code.svg&lt;/code&gt; 添加基础路径。&lt;/li&gt;
&lt;li&gt;在 &lt;code&gt;src/assets/styles/app.css&lt;/code&gt; 中为 &lt;code&gt;@font-face&lt;/code&gt; 属性中的所有 URL 添加基础路径。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;</content:encoded></item><item><title>快速开始</title><link>https://astro-pure.js.org/docs/setup/getting-started</link><guid isPermaLink="true">https://astro-pure.js.org/docs/setup/getting-started</guid><description>开始使用 Astro Theme Pure</description><content:encoded>&lt;p&gt;import { Steps, Aside, Tabs, TabItem } from &apos;astro-pure/user&apos;&lt;/p&gt;
&lt;h2&gt;安装&lt;/h2&gt;
&lt;p&gt;有两种安装方式。“模板”方式轻量且简单，但难以更新；而“Fork”方式易于更新，但需要一定的 Git 技能。&lt;/p&gt;
&lt;h3&gt;使用模板安装&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;安装主题&lt;/p&gt;
&lt;p&gt;在您的用户目录下执行以下命令以安装主题：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-toml&quot;&gt;[install]
registry = &quot;&amp;#x3C;npm mirror site&gt;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;关于其他包管理器的镜像配置详情，您可能需要查看它们的官方文档。&lt;/p&gt;
&lt;p&gt;默认情况下，此命令将使用模板仓库的 &lt;code&gt;main&lt;/code&gt; 分支。要使用其他分支名称，请将其作为 &lt;code&gt;--template&lt;/code&gt; 参数的一部分传递：&lt;code&gt;cworld1/astro-theme-pure#&amp;#x3C;branch&gt;&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;回答问题并按照 CLI 向导的说明进行操作。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;大功告成！&lt;/p&gt;
&lt;p&gt;您现在可以 &lt;a href=&quot;https://docs.astro.build/zh-cn/install-and-setup/#start-the-astro-dev-server&quot;&gt;启动 Astro 开发服务器&lt;/a&gt; 并查看项目的实时预览，同时将其打造为您自己的风格！&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;使用 Fork 安装&lt;/h3&gt;
&lt;p&gt;您只需 &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure/fork&quot;&gt;点击主题仓库中的 fork 按钮&lt;/a&gt; 来创建您的项目；然后将 fork 后的仓库克隆到您的本地机器。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;git clone https://github.com/&amp;#x3C;your-username&gt;/astro-theme-pure.git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后，您可以启动 Astro 开发服务器并查看项目的实时预览！&lt;/p&gt;
&lt;h2&gt;启动开发服务器&lt;/h2&gt;
&lt;p&gt;进入您的项目目录：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cd ./&amp;#x3C;your-project&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;接下来，请先阅读配置说明并继续配置主题。&lt;/p&gt;
&lt;h2&gt;迁移到 Astro&lt;/h2&gt;
&lt;p&gt;参见 &lt;a href=&quot;https://docs.astro.build/zh-cn/guides/migrate-to-astro/&quot;&gt;Astro: 将现有项目迁移到 Astro&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;主题文件结构&lt;/h2&gt;
&lt;p&gt;主题文件结构如下：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;public&lt;/code&gt;: 静态资源，将直接复制到根目录&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src&lt;/code&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;assets&lt;/code&gt;: 静态资源（经过 Astro 处理）&lt;/li&gt;
&lt;li&gt;&lt;code&gt;components&lt;/code&gt;: 主题中使用的组件，也包括用户组件，如 &lt;code&gt;Card&lt;/code&gt;, &lt;code&gt;Collapse&lt;/code&gt;, &lt;code&gt;Spoiler&lt;/code&gt; 等。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;layouts&lt;/code&gt;: 网站基础布局&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pages&lt;/code&gt;: 页面，如 &lt;code&gt;404&lt;/code&gt;, &lt;code&gt;about&lt;/code&gt;, &lt;code&gt;blog&lt;/code&gt;, &lt;code&gt;docs&lt;/code&gt;, &lt;code&gt;index&lt;/code&gt; 等。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;plugins&lt;/code&gt;: 主题中使用的扩展插件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;types&lt;/code&gt;: Typescript 类型定义&lt;/li&gt;
&lt;li&gt;&lt;code&gt;utils&lt;/code&gt;: 工具函数&lt;/li&gt;
&lt;li&gt;&lt;code&gt;site.config.ts&lt;/code&gt;: 主题配置文件&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;astro.config.ts&lt;/code&gt;: Astro 配置文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;eslint.config.mjs&lt;/code&gt;: ESLint 配置文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prettier.config.mjs&lt;/code&gt;: Prettier 配置文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;uno.config.ts&lt;/code&gt;: UnoCSS 配置文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tsconfig.json&lt;/code&gt;: Typescript 配置文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;package.json&lt;/code&gt;: 项目信息&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;简单设置&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;移除文档文件&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;移除 &lt;code&gt;src/pages/docs&lt;/code&gt; 目录&lt;/li&gt;
&lt;li&gt;移除 &lt;code&gt;src/site.config.ts&lt;/code&gt; 中的菜单声明：&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const theme: ThemeUserConfig = {
   // ...
   /** Configure the header of your site. */
   header: {
      menu: [
         { title: &apos;Blog&apos;, link: &apos;/blog&apos; },
         { title: &apos;Docs&apos;, link: &apos;/docs&apos; }, // [!code --]
         // ...
      ],
   },
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;移除 &lt;code&gt;src/content.config.ts&lt;/code&gt; 中 docs 的内容集合 (Content Collection)：&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;const docs = defineCollection({ // [!code --]
loader: glob({ base: &apos;./src/content/docs&apos;, pattern: &apos;**/*.{md,mdx}&apos; }), // [!code --]
schema: ({ image }) =&gt; // [!code --]
   z.object({ // [!code --]
      ... // [!code --]
   }) // [!code --]
}) // [!code --]
export const collections = { blog, docs } // [!code --]
export const collections = { blog } // [!code ++]
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;移除 &lt;code&gt;packages&lt;/code&gt; 目录 (这将通过我们的 NPM 包导入)。&lt;/p&gt;
&lt;p&gt;并记得更改 &lt;code&gt;package.json&lt;/code&gt; 中的 &lt;code&gt;workspaces&lt;/code&gt; 字段：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;name&quot;: &quot;astro-theme-pure&quot;,
  &quot;workspaces&quot;: [ // [!code --]
    &quot;packages/*&quot; // [!code --]
  ], // [!code --]
  // ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;更改网站 favicon。&lt;/p&gt;
&lt;p&gt;将 &lt;code&gt;public/favicon/*&lt;/code&gt; 文件替换为您自己的 favicon。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;替换头像图片。&lt;/p&gt;
&lt;p&gt;将 &lt;code&gt;src/assets/avatar.png&lt;/code&gt; 文件替换为您自己的头像图片。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;配置网站&lt;/p&gt;
&lt;p&gt;您可以在 &lt;code&gt;src/site.config.ts&lt;/code&gt; 配置文件中配置您的项目：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;export const theme: ThemeUserConfig = {
   author: &apos;CWorld&apos;,
   title: &apos;Astro Theme Pure&apos;,
   site: &apos;https://astro-pure.js.org&apos;,
   description: &apos;Stay hungry, stay foolish&apos;,
   // ...
}

export const integ: IntegrationUserConfig = { /* ... */ }
// ...
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Typescript 语法&lt;/p&gt;
&lt;p&gt;配置文件 &lt;code&gt;site.config.ts&lt;/code&gt; 使用 Typescript 语法。如果您不熟悉 TS 语法，请先阅读 &lt;a href=&quot;https://learnxinyminutes.com/docs/typescript/&quot;&gt;此处&lt;/a&gt; 的相关内容。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content:encoded></item></channel></rss>