> ## 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/birthday-config.ts 中设置寿星的姓名、生日日期和倒计时文案，为任意场合自定义你的 Birthday Wall。

`lib/birthday-config.ts` 是为新寿星搭建 Birthday Wall 时，你最先要编辑的文件。它控制着站点在为谁庆祝、生日是哪一天，以及首页倒计时的文案。其他所有页面 — 电台、报告和祝福墙 — 都会引用 `birthdayConfig` 来展示正确的姓名与个性化文案。

## `BirthdayPerson` 接口

`BirthdayPerson` 接口描述了 `birthdayConfig` 中 `person` 对象的结构：

```typescript theme={null}
export interface BirthdayPerson {
  name: string;
  nickname?: string;
  birthday: {
    month: number; // 1–12
    day: number;   // 1–31
  };
  greeting?: string;
}
```

## 配置字段

<ParamField path="person.name" type="string" required>
  寿星的显示名称。该值会在首页标题中突出显示，并被站点中所有个性化文案引用。
</ParamField>

<ParamField path="person.nickname" type="string">
  比名字更短或更随意的称呼。设置后，某些界面元素会使用昵称而非全名，营造更亲切、随意的氛围。
</ParamField>

<ParamField path="person.birthday.month" type="number" required>
  出生月份，取值为 `1`（一月）到 `12`（十二月）的整数。被 `getDaysUntilBirthday()` 和 `isBirthdayToday()` 用来驱动倒计时和生日横幅。
</ParamField>

<ParamField path="person.birthday.day" type="number" required>
  出生日期，取值为 `1` 到 `31` 的整数。与 `month` 组合后确定具体的庆祝日期。
</ParamField>

<ParamField path="person.greeting" type="string">
  显示在首页倒计时下方的一段短消息。未设置时默认为 `"期待与你相遇"`。用它来为整个站点定个调子。
</ParamField>

<ParamField path="countdown.title" type="string">
  渲染在倒计时数字上方的标签。例如 `"距离生日还有"` 可大致译为 "Days until the birthday"。可以换成你想要的语言或措辞。
</ParamField>

<ParamField path="countdown.expiredTitle" type="string">
  当 `isBirthdayToday()` 返回 `true`（即访客在真正的生日当天打开页面）时，替代倒计时显示的文案。默认值为 `"今天是你的生日"`（"Today is your birthday"）。
</ParamField>

## 默认配置

文件中自带一份针对某个具体人物的可运行示例：

```typescript theme={null}
export const birthdayConfig = {
  person: {
    name: "吴总",
    nickname: "吴总",
    birthday: {
      month: 6,
      day: 19,
    },
    greeting: "期待与你相遇",
  } as BirthdayPerson,

  countdown: {
    title: "距离生日还有",
    expiredTitle: "今天是你的生日",
  },
};
```

## 自定义示例

将所有值替换为你寿星的信息：

```typescript theme={null}
export const birthdayConfig = {
  person: {
    name: "Alex",
    nickname: "Alex",
    birthday: {
      month: 8,
      day: 15,
    },
    greeting: "Can't wait to celebrate with you!",
  } as BirthdayPerson,

  countdown: {
    title: "Days until the big day",
    expiredTitle: "Today is your birthday",
  },
};
```

<Note>
  编辑完 `birthday-config.ts` 后，保存文件并重启开发服务器（`npm run dev`），或重新部署到托管平台，更改才会生效。
</Note>
