内容结构化改造(阶段 1):新增 topics/scenarios 目录、内容规范、frontmatter schema、校验与目录生成脚本、31 个技术栈首页骨架,周文件加 frontmatter
This commit is contained in:
1 parent
32b111606f
commit
0bae9916a9
58 files changed
+2995
-5
No files matched your search
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "zhuangang/frontmatter.schema.json",
|
||||
"title": "zhuangang 内容文件的 frontmatter",
|
||||
"description": "plan/、topics/、scenarios/ 下每个 .md 文件开头的 YAML frontmatter。说明见 CONTRIBUTING.md。",
|
||||
"type": "object",
|
||||
"required": ["id", "title", "type", "domain"],
|
||||
"properties": {
|
||||
"id": {"type": "string", "pattern": "^[a-z0-9]+(\\.[a-z0-9-]+)+$", "description": "全局唯一、稳定不变的内容 ID"},
|
||||
"title": {"type": "string"},
|
||||
"type": {"enum": ["index", "lesson", "scenario", "interview", "project", "week"]},
|
||||
"domain": {"enum": ["backend", "devops", "python", "ai", "frontend", "cross", "plan"]},
|
||||
"stack": {"type": "array", "items": {"type": "string"}, "description": "技术栈标识,与 topics/<domain>/<stack>/ 目录名一致"},
|
||||
"tags": {"type": "array", "items": {"type": "string"}},
|
||||
"level": {"enum": ["basic", "intermediate", "advanced"]},
|
||||
"prerequisites": {"type": "array", "items": {"type": "string"}, "description": "先修内容的 id"},
|
||||
"related": {"type": "array", "items": {"type": "string"}, "description": "相关内容的 id"},
|
||||
"est_hours": {"type": "number", "minimum": 0},
|
||||
"week": {"type": "array", "items": {"type": "integer", "minimum": 1, "maximum": 16}, "description": "在 16 周计划中的哪几周用到"},
|
||||
"order": {"type": "integer", "description": "同一技术栈内的排序"}
|
||||
},
|
||||
"allOf": [
|
||||
{"if": {"properties": {"type": {"enum": ["lesson", "scenario", "interview"]}}}, "then": {"required": ["level", "stack"]}}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user