diff --git a/blog/source/admin/config.yml b/blog/source/admin/config.yml index c0eb525..dddd6f3 100644 --- a/blog/source/admin/config.yml +++ b/blog/source/admin/config.yml @@ -11,169 +11,13 @@ public_folder: "blog/source/res" site_url: "https://www.hellscript.cc/" locale: "zh_Hans" -common_col_conf: &common_col_conf - create: true - slug: "{{fields.filename}}" - sortable_fields: - - "commit_date" - - "title" - - "date" - - "updated" - # https://decapcms.org/docs/widgets/ - fields: - - label: "文件名" - name: "filename" - widget: "string" - - label: "标题" - name: "title" - widget: "string" - - label: "发表日期" - name: "date" - widget: "datetime" - format: "YYYY-MM-DD HH:mm:ss" - date_format: "YYYY-MM-DD" - time_format: "HH:mm:ss" - - label: "更新日期" - name: "updated" - widget: "datetime" - format: "YYYY-MM-DD HH:mm:ss" - date_format: "YYYY-MM-DD" - time_format: "HH:mm:ss" - required: false - - label: "封面" - name: "cover" - widget: "image" - required: false - - label: "标签" - name: "tags" - widget: "select" - multiple: true - required: false - options: - - "amazon" - - "android" - - "angularjs" - - "azure" - - "cdn" - - "chartjs" - - "chrome" - - "csharp" - - "css" - - "devops" - - "diary" - - "docker" - - "edge" - - "git" - - "github" - - "hexo" - - "html" - - "icarus" - - "java" - - "js" - - "life" - - "material" - - "mysql" - - "nodejs" - - "onedrive" - - "oneindex" - - "php" - - "restapi" - - "security" - - "serverless" - - "shadowdefender" - - "tool" - - "twikoo" - - "ubuntu" - - "vagrant" - - "vb" - - "vite" - - "vue" - - "webpack" - - "windows" - - "xlsx" - - "小程序" - - label: "分类" - name: "categories" - widget: "select" - multiple: true - required: false - options: - - "Diary" - - "Tool" - - "Tech" - - "FrontEnd" - - "BackEnd" - - "Windows" - - "Android" - - "Linux" - - "Serverless" - - label: "正文" - name: "body" - widget: "markdown" - - label: "原创" - name: "toc" - widget: "boolean" - default: true - - label: "评论" - name: "comments" - widget: "boolean" - default: true collections: - - name: "subposts_c" - label: "C" - folder: "source/_posts/subposts_c" - preview_path: "subposts_c/{{filename}}/" - <<: *common_col_conf - - name: "subposts_cppPrimer" - label: "cppPrimer" - folder: "source/_posts/subposts_cppPrimer" - preview_path: "subposts_cppPrimer/{{filename}}/" - <<: *common_col_conf - - name: "Subposts_dataStructure" - label: "Subposts_dataStructure" - folder: "source/_posts/Subposts_dataStructure" - preview_path: "Subposts_dataStructure/{{filename}}/" - <<: *common_col_conf - - name: "subposts_gameAI" - label: "subposts_gameAI" - folder: "source/_posts/subposts_gameAI" - preview_path: "subposts_gameAI/{{filename}}/" - <<: *common_col_conf - - name: "subposts_interview" - label: "subposts_interview" - folder: "source/_posts/subposts_interview" - preview_path: "subposts_interview/{{filename}}/" - <<: *common_col_conf - - name: "subposts_life" - label: "subposts_life" - folder: "source/_posts/subposts_life" - preview_path: "subposts_life/{{filename}}/" - <<: *common_col_conf - - name: "subposts_notes" - label: "subposts_notes" - folder: "source/_posts/subposts_notes" - preview_path: "subposts_notes/{{filename}}/" - <<: *common_col_conf - - name: "subposts_parallel" - label: "subposts_parallel" - folder: "source/_posts/subposts_parallel" - preview_path: "subposts_parallel/{{filename}}/" - <<: *common_col_conf - - name: "subposts_python" - label: "subposts_python" - folder: "source/_posts/subposts_python" - preview_path: "subposts_python/{{filename}}/" - <<: *common_col_conf - - name: "subposts_tools" - label: "subposts_tools" - folder: "source/_posts/subposts_tools" - preview_path: "subposts_tools/{{filename}}/" - <<: *common_col_conf - - name: "pages" - label: "Pages" - files: - - name: "about" - label: "关于" - file: "source/about/index.md" - preview_path: "about/" - <<: *common_col_conf \ No newline at end of file + - name: 'blog' + label: 'Blog' + folder: '_posts/' + fields: # 这里这些字段对应到你写文章的 markdown 上方的一些文章属性 widget 的配置可以参考官方文档的 widget 部分 + - {label: "Layout", name: "layout", widget: "hidden", default: "post"} + - {label: "Title", name: "title", widget: "string", tagname: "h1"} + - {label: "Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mm:ss"} + - {label: "Tags", name: "tags", widget: "string"} + - {label: "Body", name: "body", widget: "markdown"} \ No newline at end of file