入门指南
安装配置
详细的安装和配置说明
配置站点信息
编辑 src/config/site.ts:
export const SITE = {
title: '你的站点名称',
description: '站点描述',
author: '你的名字',
email: 'you@example.com',
url: 'https://cabin-in-the-woods.s347.workers.dev',
github: 'https://github.com/yourusername',
};
配置文档导航
编辑 src/config/docs.ts 来自定义文档侧边栏:
export const DOCS_NAV = [
{
section: '章节名称',
items: [
{ label: '页面标题', href: '/docs/page-slug' },
],
},
];
环境变量
在根目录创建 .env 文件(如有需要):
PUBLIC_SITE_URL=https://cabin-in-the-woods.s347.workers.dev
自定义主题颜色
所有颜色变量定义在 src/styles/globals.css 中,使用 HSL 格式:
:root {
--primary: 240 5.9% 10%; /* 修改此值来更换主色调 */
--background: 0 0% 100%;
}
构建与部署
# 本地构建
npm run build
# 预览构建结果
npm run preview
生成的文件位于 dist/ 目录,可直接部署到任何静态托管服务。