From 86bb13230a715a6fb962515541f1b0589d9dd36e Mon Sep 17 00:00:00 2001 From: gzrjzcx <852127277@qq.com> Date: Fri, 7 Jun 2024 17:01:02 +0800 Subject: [PATCH] - decap config; --- blog/_config.yml | 2 +- blog/source/admin/config.yml | 177 +++++++++++++++++++++++++++++++++++ blog/source/admin/index.html | 13 +++ 3 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 blog/source/admin/config.yml create mode 100644 blog/source/admin/index.html diff --git a/blog/_config.yml b/blog/_config.yml index 3adf6e1..7c67f8b 100644 --- a/blog/_config.yml +++ b/blog/_config.yml @@ -26,7 +26,7 @@ archive_dir: archives category_dir: categories code_dir: downloads/code i18n_dir: :lang -skip_render: +skip_render: admin/**/* # Writing new_post_name: :title.md # File name of new posts diff --git a/blog/source/admin/config.yml b/blog/source/admin/config.yml new file mode 100644 index 0000000..dcfc6a7 --- /dev/null +++ b/blog/source/admin/config.yml @@ -0,0 +1,177 @@ +backend: + name: GitHub + repo: gzrjzcx/gzrjzcx.github.io + branch: src + +media_folder: "blog/source/res" +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 diff --git a/blog/source/admin/index.html b/blog/source/admin/index.html new file mode 100644 index 0000000..69eff8e --- /dev/null +++ b/blog/source/admin/index.html @@ -0,0 +1,13 @@ + + + + + + + Content Manager + + + + + + \ No newline at end of file