Skip to content

Commit

Permalink
- decap config;
Browse files Browse the repository at this point in the history
  • Loading branch information
gzrjzcx committed Jun 7, 2024
1 parent 937ab3e commit 86bb132
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blog/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
177 changes: 177 additions & 0 deletions blog/source/admin/config.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions blog/source/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
</body>
</html>

0 comments on commit 86bb132

Please sign in to comment.