Back to projects
GitHubVisit

guany.me

▲ Guany 的网站

分类技术栈
框架Next.js 16 (App Router)
UIshadcn/ui + Tailwind CSS 4
内容Streamdown
国际化next-intl

安装

bash
pnpm installcp .env.example .env.local

环境变量

变量必需描述
SITE_URL站点公开地址,用于 sitemap 和 metadata
GITHUB_TOKENGitHub 个人访问令牌
SITE_CONFIG_URL远程站点配置 JSON 地址,例如 https://assets.example.com/config/site.json

使用说明

开发

bash
pnpm dev

构建

bash
pnpm build

Hero 背景图配置

Hero 背景图会优先读取 SITE_CONFIG_URL 指向的远程站点配置,并从中读取 hero 字段;如果远程配置不可用或无效,则自动回退到必应每日壁纸。

site.json 示例:

json
{  "hero": {    "mode": "custom",    "url": "https://assets.example.com/img/background.webp",    "position": "center"  }}

支持字段:

  • modecustombing
  • url:自定义 Hero 背景图地址
  • position:会直接透传给 CSS background-position

使用许可

© Guany