> ## Documentation Index
> Fetch the complete documentation index at: https://help.helloazhenweb.top/llms.txt
> Use this file to discover all available pages before exploring further.

# 站点身份、名称与导航配置

> 使用 lib/site-config.ts 和 lib/nav-config.ts 更新站点的浏览器标题、Meta 描述、规范 URL，以及导航栏布局。

两个文件控制着 Birthday Wall 如何向浏览器、搜索引擎和访客展示自己：`lib/site-config.ts` 管理站点身份与元数据，`lib/nav-config.ts` 控制哪些页面出现在导航栏中以及它们的顺序。每次为新部署搭建时，你通常都会同时更新这两个文件。

## 站点身份 — `lib/site-config.ts`

`siteConfig` 对象暴露五个字段，分别注入到 `<title>` 标签、Open Graph 元数据和管理后台标题中。

<ParamField path="name" type="string">
  用作浏览器标签标题和 Open Graph `og:title` 值。当有人在社交平台分享站点链接时也会显示。默认值：`"helloazhen | 生日空间"`。
</ParamField>

<ParamField path="title" type="string">
  与 `name` 一致，可在元数据组件中互换使用。把两者设为相同值可以让站点中的标题保持一致。
</ParamField>

<ParamField path="description" type="string">
  搜索引擎读取的 Meta 描述，也会显示在社交链接预览中。请控制在 160 字符以内。默认值：`"为 TA 送上最特别的生日祝福"`。
</ParamField>

<ParamField path="adminTitle" type="string">
  管理后台（`/admin`）顶部显示的标题。它不会影响面向访客的站点。默认值：`"管理后台"`。
</ParamField>

<ParamField path="url" type="string">
  你部署站点的规范基础 URL。从 `NEXT_PUBLIC_SITE_URL` 环境变量读取，带有硬编码的回退值。该值用于在邮件、分享功能和 OG 标签中构造绝对链接。默认回退值：`"https://helloazhen.com"`。
</ParamField>

### 自定义示例

```typescript theme={null}
export const siteConfig = {
  name: "Alex's Birthday | Birthday Space",
  title: "Alex's Birthday | Birthday Space",
  description: "Send Alex your warmest birthday wishes!",
  adminTitle: "Admin Panel",
  url: process.env.NEXT_PUBLIC_SITE_URL || "https://alex-birthday.vercel.app",
};
```

<Note>
  `url` 字段应与你的实际部署域名完全一致。它被用于生成邮件和分享功能中的绝对链接 — 一旦不一致，就会产生失效链接。
</Note>

***

## 导航 — `lib/nav-config.ts`

`navConfig.pages` 数组定义了顶部导航栏中的每一项。每一项对应一个 `PageConfig` 对象：

| 字段        | 类型        | 说明                            |
| --------- | --------- | ----------------------------- |
| `id`      | `string`  | 页面的唯一标识（如 `"home"`、`"radio"`） |
| `name`    | `string`  | 在导航栏中显示的标签                    |
| `path`    | `string`  | 路由路径（如 `"/"`、`"/radio"`）      |
| `icon`    | `string`  | 显示在标签旁的 emoji 图标              |
| `visible` | `boolean` | 设为 `false` 可将该页面从导航栏中隐藏       |
| `order`   | `number`  | 控制从左到右的显示顺序；数字越小越靠前           |

### 默认配置

```typescript theme={null}
export const navConfig = {
  pages: [
    { id: "home",   name: "首页",   path: "/",       icon: "🏠", visible: true, order: 1 },
    { id: "radio",  name: "电台",   path: "/radio",  icon: "🎵", visible: true, order: 2 },
    { id: "write",  name: "写祝福", path: "/write",  icon: "✏️", visible: true, order: 3 },
    { id: "report", name: "报告",   path: "/report", icon: "📊", visible: true, order: 4 },
    { id: "games",  name: "游戏室", path: "/games",  icon: "🎮", visible: true, order: 5 },
  ] as PageConfig[],
};
```

### 自定义示例

要重命名标签、重新排序或隐藏不需要的页面，可以直接编辑该数组：

```typescript theme={null}
export const navConfig = {
  pages: [
    { id: "home",   name: "Home",     path: "/",       icon: "🏠", visible: true,  order: 1 },
    { id: "radio",  name: "Radio",    path: "/radio",  icon: "🎵", visible: true,  order: 2 },
    { id: "write",  name: "Wishes",   path: "/write",  icon: "✏️", visible: true,  order: 3 },
    { id: "report", name: "Report",   path: "/report", icon: "📊", visible: false, order: 4 },
    { id: "games",  name: "Games",    path: "/games",  icon: "🎮", visible: true,  order: 5 },
  ] as PageConfig[],
};
```

在上面的示例中，**Report** 页面通过设置 `visible: false` 被从导航栏中隐藏。该页面仍然存在于 `/report` 路径下 — 只是不会作为导航链接显示而已。
