Files
fuwari/src/types/config.ts
二叉树树 3bec260b71 feat(侧边栏): 替换待办事项和时光卡片为灵感组件
添加新的灵感组件并移除旧的待办事项和时光卡片功能
更新图标库配置以支持Material Symbols Light
删除不再使用的待办事项相关类型和文件
2025-12-09 14:33:39 +08:00

124 lines
2.0 KiB
TypeScript

import type { AUTO_MODE, DARK_MODE, LIGHT_MODE } from "@constants/constants";
export type SiteConfig = {
title: string;
subtitle: string;
description?: string;
keywords?: string[];
lang: string;
themeColor: {
hue: number;
fixed: boolean;
forceDarkMode?: boolean;
};
banner: {
enable: boolean;
src: string;
position?: "top" | "center" | "bottom";
credit: {
enable: boolean;
text: string;
url?: string;
};
};
background: {
enable: boolean;
src: string;
position?: "top" | "center" | "bottom";
size?: "cover" | "contain" | "auto";
repeat?: "no-repeat" | "repeat" | "repeat-x" | "repeat-y";
attachment?: "fixed" | "scroll" | "local";
opacity?: number;
};
toc: {
enable: boolean;
depth: 1 | 2 | 3;
};
favicon: Favicon[];
officialSites?: (string | { url: string; alias: string })[];
};
export type Favicon = {
src: string;
theme?: "light" | "dark";
sizes?: string;
};
export enum LinkPreset {
Home = 0,
Archive = 1,
About = 2,
}
export type NavBarLink = {
name: string;
url: string;
external?: boolean;
};
export type NavBarConfig = {
links: (NavBarLink | LinkPreset)[];
};
export type ProfileConfig = {
avatar?: string;
name: string;
bio?: string;
links: {
name: string;
url: string;
icon: string;
}[];
};
export type LicenseConfig = {
enable: boolean;
name: string;
url: string;
};
export type ImageFallbackConfig = {
enable: boolean;
originalDomain: string;
fallbackDomain: string;
};
export type UmamiConfig = {
enable: boolean;
baseUrl: string;
shareId: string;
timezone: string;
};
export type LIGHT_DARK_MODE =
| typeof LIGHT_MODE
| typeof DARK_MODE
| typeof AUTO_MODE;
export type BlogPostData = {
body: string;
title: string;
published: Date;
description: string;
tags: string[];
draft?: boolean;
image?: string;
prevTitle?: string;
prevSlug?: string;
nextTitle?: string;
nextSlug?: string;
};
export type ExpressiveCodeConfig = {
theme: string;
};
export type GitHubEditConfig = {
enable: boolean;
baseUrl: string;
};