Files
CraftKit/plugins/doc/skills/archive/references/config.md
T

33 lines
959 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 归档配置
```json
{
"version": 1,
"archiveRoot": "docs/archive",
"defaults": { "onConflict": "skip" },
"rules": [
{
"match": "design/**/*.md",
"target": "design/{relative}",
"stripFrontmatter": true,
"requiredText": ["#"]
},
{
"match": "specs/*.md",
"target": "reference/{stem}-api.md",
"section": "API"
}
]
}
```
- `archiveRoot`:相对项目根的归档目录。
- `match`:相对项目根的 glob,只处理普通文件。
- `target`:可用 `{name}`、`{stem}`、`{suffix}`、`{relative}`、`{parent}`。
- `section`:可选 Markdown 标题文本,输出该标题及下属内容。
- `stripFrontmatter`:仅移除开头完整闭合的 Frontmatter。
- `requiredText`:归档前必须出现的文字,用于替代隐式外部校验。
- `onConflict`:`skip`、`overwrite` 或 `append`。
目标不得是绝对路径或逃逸归档根。`append` 仅适合文本文件。