# 后台系统配置
backend:
    name: github
    repo: cfstudio77/Twilight # 请替换为您的 GitHub 仓库
    branch: main # 请替换为您的分支名称
    site_domain: boke.let.gs # 请替换为您的域名
    base_url: https://boke.let.gs  # 请替换为您的 URL
    auth_endpoint: oauth # OAuth 路由由集成提供


# 媒体目录配置
media_folder: "public/images" # 媒体文件存储路径
public_folder: "/images" # 公共访问路径


# 集合管理配置
collections:

    - # 博客文章集合
        # 集合名称
        name: "posts"
        # 后台显示标签
        label: "文章"
        # 内容存储目录
        folder: "src/content/posts"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{slug}}"
        # 字段列表
        fields:
            - # 标题
                {label: "标题", name: "title", widget: "string"}
            - # 发布日期
                {label: "发布日期", name: "published", widget: "datetime"}
            - # 更新日期
                {label: "更新日期", name: "updated", widget: "datetime", required: false}
            - # 描述
                {label: "摘要", name: "description", widget: "text", required: false}
            - # 封面图
                {label: "封面图", name: "cover", widget: "image", required: false}
            - # 标签
                {label: "标签", name: "tags", widget: "list", default: [], required: false}
            - # 分类
                {label: "分类", name: "category", widget: "string", required: false}
            - # 草稿
                {label: "草稿", name: "draft", widget: "boolean", default: false}
            - # 正文
                {label: "内容", name: "body", widget: "markdown"}

    - # 项目集合
        # 集合名称
        name: "projects"
        # 后台显示标签
        label: "项目"
        # 内容存储目录
        folder: "src/content/projects"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{slug}}"
        # 文件存储格式
        format: "json"
        # 字段列表
        fields:
            - # 项目标题
                { label: "标题", name: "title", widget: "string" }
            - # 项目描述
                { label: "简介", name: "description", widget: "text" }
            - # 项目封面
                { label: "封面图", name: "image", widget: "image", required: false }
            - # 项目类别
                { label: "分类", name: "category", widget: "select", options: ["library","ai","software","website","game"] }
            - # 技术栈
                { label: "技术栈", name: "techStack", widget: "list", default: [] }
            - # 项目状态
                { label: "项目状态", name: "status", widget: "select", options: ["completed","in-progress","planned"] }
            - # 在线演示
                { label: "在线演示", name: "liveDemo", widget: "string", required: false }
            - # 源代码
                { label: "源代码", name: "sourceCode", widget: "string", required: false }
            - # 开始日期
                { label: "开始日期", name: "startDate", widget: "datetime" }
            - # 结束日期
                { label: "结束日期", name: "endDate", widget: "datetime", required: false }
            - # 是否精选
                { label: "是否精选", name: "featured", widget: "boolean", required: false, default: false }
            - # 标签
                { label: "标签", name: "tags", widget: "list", required: false, default: [] }

    - # 技能集合
        # 集合名称
        name: "skills"
        # 后台显示标签
        label: "Skills"
        # 内容存储目录
        folder: "src/content/skills"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{slug}}"
        # 文件存储格式
        format: "json"
        # 字段列表
        fields:
            - # 技能名称
                { label: "Name", name: "name", widget: "string" }
            - # 技能描述
                { label: "Description", name: "description", widget: "text" }
            - # 图标
                { label: "Icon", name: "icon", widget: "string" }
            - # 技能类别
                { label: "Category", name: "category", widget: "select", options: ["ai","backend","client","frontend","database","engines","tools","others"] }
            - # 熟练程度
                { label: "Level", name: "level", widget: "select", options: ["beginner","intermediate","advanced","expert"] }
            - # 经验
                label: "Experience"
                name: "experience"
                widget: "object"
                fields:
                    - # 年
                        { label: "Years", name: "years", widget: "number", value_type: "int", min: 0 }
                    - # 月
                        { label: "Months", name: "months", widget: "number", value_type: "int", min: 0, max: 11 }
            - # 相关项目
               { label: "Projects", name: "projects", widget: "list", required: false, default: [] }
            - # 相关认证
               { label: "Certifications", name: "certifications", widget: "list", required: false, default: [] }
            - # 主题颜色
               { label: "Color", name: "color", widget: "string", required: false }

    - # 时间线集合
        # 集合名称
        name: "timeline"
        # 后台显示标签
        label: "时间线"
        # 内容存储目录
        folder: "src/content/timeline"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{slug}}"
        # 文件存储格式
        format: "json"
        # 字段列表
        fields:
            - # 标题
                { label: "标题", name: "title", widget: "string" }
            - # 描述
                { label: "简介", name: "description", widget: "text" }
            - # 类型
                { label: "类型", name: "type", widget: "select", options: ["education","work","project","achievement"] }
            - # 开始日期
                { label: "开始日期", name: "startDate", widget: "datetime" }
            - # 结束日期
                { label: "结束日期", name: "endDate", widget: "datetime", required: false }
            - # 地点
                { label: "地点", name: "location", widget: "string", required: false }
            - # 组织/机构
                { label: "组织/机构", name: "organization", widget: "string", required: false }
            - # 职位
                { label: "职位", name: "position", widget: "string", required: false }
            - # 相关技能
                { label: "相关技能", name: "skills", widget: "list", required: false, default: [] }
            - # 相关成就
                { label: "相关成就", name: "achievements", widget: "list", required: false, default: [] }
            - # 相关链接
                label: "Links"
                name: "links"
                widget: "list"
                required: false
                fields:
                    - # 链接名称
                        { label: "网站名称", name: "name", widget: "string" }
                    - # 链接地址
                        { label: "网站地址", name: "url", widget: "string" }
                    - # 链接类型
                        { label: "网站类型", name: "type", widget: "select", options: ["certificate","project","other"] }
            - # 图标
                { label: "图标", name: "icon", widget: "string", required: false }
            - # 主题颜色
                { label: "主题颜色", name: "color", widget: "string", required: false }

    - # 日记集合
        # 集合名称
        name: "diary"
        # 后台显示标签
        label: "日记"
        # 内容存储目录
        folder: "src/content/diary"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{year}}-{{month}}-{{day}}-{{hour}}-{{minute}}"
        # 文件存储格式
        format: "json"
        # 字段列表
        fields:
            - # 日记内容
                { label: "内容", name: "content", widget: "text" }
            - # 日记日期
                { label: "日期", name: "date", widget: "datetime" }
            - # 图片列表
                label: "图片"
                name: "images"
                widget: "list"
                required: false
                default: []
                field: { label: "Image", name: "image", widget: "image" }

    - # 相册集合
        # 集合名称
        name: "albums"
        # 后台显示标签
        label: "相册"
        # 内容存储目录
        folder: "src/content/albums"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{slug}}"
        # 文件存储格式
        format: "json"
        # 字段列表
        fields:
            - # 相册标题
                { label: "标题", name: "title", widget: "string" }
            - # 相册描述
                { label: "简介", name: "description", widget: "text", required: false }
            - # 相册封面
                { label: "封面图", name: "cover", widget: "image" }
            - # 日期
                { label: "日期", name: "date", widget: "datetime" }
            - # 地点
                { label: "地点", name: "location", widget: "string", required: false }
            - # 标签
                { label: "标签", name: "tags", widget: "list", required: false, default: [] }
            - # 布局方式
                { label: "布局方式", name: "layout", widget: "select", options: ["grid", "masonry", "list"], default: "grid" }
            - # 列数
                { label: "列数", name: "columns", widget: "number", default: 3, value_type: "int", min: 1, max: 6 }
            - # 照片列表
                label: "Photos"
                name: "photos"
                widget: "list"
                required: false
                fields:
                    - # 图片路径
                        { label: "图片地址", name: "src", widget: "image" }
                    - # 图片描述
                        { label: "简介", name: "alt", widget: "string", required: false }
                    - # 图片标题
                        { label: "标题", name: "title", widget: "string", required: false }
                    - # 图片说明
                        { label: "说明", name: "description", widget: "text", required: false }
                    - # 标签
                        { label: "标签", name: "tags", widget: "list", required: false, default: [] }
                    - # 拍摄日期
                        { label: "拍摄日期", name: "date", widget: "datetime", required: false }
            - # 是否可见
                { label: "是否可见", name: "visible", widget: "boolean", default: true, required: false }

    - # 友链集合
        # 集合名称
        name: "friends"
        # 后台显示标签
        label: "友情链接"
        # 内容存储目录
        folder: "src/content/friends"
        # 允许创建新条目
        create: true
        # 文件命名规则
        slug: "{{slug}}"
        # 文件存储格式
        format: "json"
        # 字段列表
        fields:
            - # 网站名称
                { label: "网站名称", name: "title", widget: "string" }
            - # 头像链接
                { label: "头像连接", name: "imgurl", widget: "string" }
            - # 网站描述
                { label: "网站描述", name: "desc", widget: "text" }
            - # 网站链接
                { label: "网站地址", name: "siteurl", widget: "string" }
            - # 标签
                { label: "标签", name: "tags", widget: "list", required: false, default: [] }


# 编辑器配置
editor:
    # 启用预览功能
    preview: true
