This commit is contained in:
eric
2026-06-07 01:17:46 -05:00
parent 283d65d1d1
commit cd885f5fcd
110 changed files with 17876 additions and 11 deletions

View File

@@ -0,0 +1,193 @@
/**
* 站点模板配置 - 切换主题只需修改 CURRENT_THEME
* 克隆新主题:复制 themes/digital-nomad 为 themes/your-theme修改配置和内容
*/
/** 专题 ID子域名部署 + 项目复制架构(资源导航中带「专题」标记) */
export const TOPIC_IDS = ["indieDev", "aiAgent", "cloudPhone", "unmannedLive"] as const;
export type TopicId = (typeof TOPIC_IDS)[number];
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;
};
/** 电商独立站域名(可选,配置后显示电商卡片) */
shopUrl?: string;
};
/** 关于我们Linktree 链接(可选) */
linktreeUrl?: string;
/** 社交平台链接(用于关于页展示) */
socialLinks?: Array<{ platform: string; label: string; url: string; group?: "domestic" | "overseas" }>;
/** 团队成员(可选) */
teamMembers?: Array<{ name: string; role: string; avatar?: string; link?: string }>;
}
export const THEME_CONFIGS: Record<ThemeId, ThemeConfig> = {
"digital-nomad": {
id: "digital-nomad",
name: "数字游民指南",
nameEn: "Digital Nomad Guide",
tagline: "数字游民资源平台",
taglineEn: "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: 8800, type: "meetup" },
pocketbaseJoinCollection: "solan",
shopUrl: process.env.NEXT_PUBLIC_SHOP_URL || "https://store.hackrobot.cn/", // 独立站域名
},
linktreeUrl: process.env.NEXT_PUBLIC_LINKTREE_URL || "https://linktr.ee/digitalnomad",
socialLinks: [
{ platform: "douyin", label: "抖音", url: "https://www.douyin.com", group: "domestic" },
{ platform: "wechat-official", label: "微信公众号", url: "https://mp.weixin.qq.com", group: "domestic" },
{ platform: "xiaohongshu", label: "小红书", url: "https://www.xiaohongshu.com", group: "domestic" },
{ platform: "tiktok", label: "TikTok", url: "https://www.tiktok.com", group: "overseas" },
{ platform: "youtube", label: "YouTube 频道", url: "https://www.youtube.com", group: "overseas" },
{ platform: "twitter", label: "X", url: "https://x.com", group: "overseas" },
],
teamMembers: [
{ name: "成员 A", role: "发起人", link: "#" },
{ name: "成员 B", role: "内容运营", link: "#" },
{ name: "成员 C", role: "技术开发", link: "#" },
],
},
"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];
}