Files
gitlab-instance-0a899031_di…/config/site.config.ts
2026-03-08 06:43:48 -05:00

166 lines
4.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 站点模板配置 - 切换主题只需修改 CURRENT_THEME
* 克隆新主题:复制 themes/digital-nomad 为 themes/your-theme修改配置和内容
*/
export const THEME_IDS = [
"digital-nomad",
"solo-company",
"tiktok-ops",
"indie-dev",
] as const;
export type ThemeId = (typeof THEME_IDS)[number];
export const CURRENT_THEME: ThemeId =
(process.env.NEXT_PUBLIC_THEME as ThemeId) || "digital-nomad";
export interface ThemeConfig {
id: ThemeId;
name: string;
nameEn: string;
tagline: string;
taglineEn: string;
/** SEO 元数据 */
meta: {
title: string;
description: string;
};
/** 功能开关 */
features: {
roadmap: boolean;
tools: boolean;
community: boolean;
join: boolean;
course: boolean;
ebook: boolean;
};
/** 品牌色 - Tailwind 类名 */
colors: {
primary: string;
accent: string;
};
/** 服务配置覆盖(可选) */
services?: {
/** 加入/申请支付 */
join?: {
amount?: number;
type?: string;
};
/** PocketBase 申请集合名 */
pocketbaseJoinCollection?: string;
/** MinIO 存储(可选) */
minio?: {
bucket?: string;
uploadPrefix?: string;
};
};
}
export const THEME_CONFIGS: Record<ThemeId, ThemeConfig> = {
"digital-nomad": {
id: "digital-nomad",
name: "数字游民指南",
nameEn: "Digital Nomad Guide",
tagline: "开源免费的数字游民资源平台",
taglineEn: "Open-source digital nomad resource platform",
meta: {
title: "数字游民指南 | Digital Nomad Guide",
description:
"从零开始7天开启你的数字游民生活。远程工作、地点自由、技能变现 —— 一站式数字游民资源平台。",
},
features: {
roadmap: true,
tools: true,
community: true,
join: true,
course: true,
ebook: true,
},
colors: {
primary: "sky",
accent: "amber",
},
services: {
join: { amount: 80, type: "meetup" },
pocketbaseJoinCollection: "solan",
},
},
"solo-company": {
id: "solo-company",
name: "一人公司指南",
nameEn: "Solo Company Guide",
tagline: "一人公司创业与运营指南",
taglineEn: "Guide to building and running a solo company",
meta: {
title: "一人公司指南 | Solo Company Guide",
description:
"从零到一,打造属于你的一人公司。产品、营销、运营 —— 一人公司全流程指南。",
},
features: {
roadmap: true,
tools: true,
community: true,
join: false,
course: false,
ebook: true,
},
colors: {
primary: "violet",
accent: "emerald",
},
},
"tiktok-ops": {
id: "tiktok-ops",
name: "TikTok 运营指南",
nameEn: "TikTok Operations Guide",
tagline: "TikTok 出海运营与变现指南",
taglineEn: "TikTok operations and monetization guide",
meta: {
title: "TikTok 运营指南 | TikTok Operations Guide",
description:
"TikTok 账号运营、内容创作、广告投放、跨境变现 —— 一站式 TikTok 出海指南。",
},
features: {
roadmap: true,
tools: true,
community: true,
join: false,
course: true,
ebook: true,
},
colors: {
primary: "pink",
accent: "cyan",
},
},
"indie-dev": {
id: "indie-dev",
name: "独立开发指南",
nameEn: "Indie Developer Guide",
tagline: "独立开发者产品与变现指南",
taglineEn: "Indie developer product and monetization guide",
meta: {
title: "独立开发指南 | Indie Developer Guide",
description:
"从想法到产品,独立开发全流程。技术选型、产品设计、上线运营 —— 独立开发者必备指南。",
},
features: {
roadmap: true,
tools: true,
community: true,
join: false,
course: false,
ebook: true,
},
colors: {
primary: "indigo",
accent: "orange",
},
},
};
export function getThemeConfig(): ThemeConfig {
return THEME_CONFIGS[CURRENT_THEME];
}