$ 发布 2026-03-07 | ~1分钟阅读
语境: 从真正的用户入口开始:站点身份信息、社交链接、About 开关,以及如何替换 starter 示例文章。

Anglefeint Starter Guide 1:先配置你的站点

从 starter 创建项目后,优先改哪些字段


输出
延迟估计 ~144 ms 置信度 ~0.84

如果你是通过 Anglefeint starter 创建项目,第一步就看 src/site.config.ts

这个文件就是主要的用户配置入口。一般情况下,你不需要直接去改 src/config/*src/i18n/*

先改站点身份信息

site: {
  title: 'Your Site Name',
  description: 'Your default site description.',
  url: 'https://example.com',
  author: 'Your Name',
  tagline: 'Built with Astro.',
}

当前真实作用:

  • site.title:header、footer、页面元数据和 RSS 标题
  • site.description:站点级默认描述;首页在当前语言没有 messages.siteDescription 时会回退到它
  • site.url:canonical、语言 alternate、RSS 和 robots
  • site.author:文章默认作者与 SEO author
  • site.tagline:footer 文案

配置社交链接

social: {
  links: [
    { href: 'https://github.com/yourname', label: 'GitHub', icon: 'github' },
    { href: 'https://x.com/yourname', label: 'Twitter', icon: 'twitter' },
  ],
}

内置 icon:

  • github
  • twitter
  • mastodon

决定要不要 About 页面

theme: {
  enableAboutPage: true,
}

设成 false 就不会生成 /[lang]/about/,导航里也不会显示它。

替换 starter 内容

文章目录:

src/content/blog/<locale>/

新建文章:

npm run new-post -- your-first-post

下一篇

39 词 · 51 令牌