Skip to content

Commit fd16cf1

Browse files
clarify lark-doc create title guidance (#1474)
1 parent 5307673 commit fd16cf1

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

skills/lark-doc/references/lark-doc-create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ lark-cli docs +create --api-version v2 --parent-token fldcnXXXX --content '<titl
2323
# 创建到个人知识库(XML)
2424
lark-cli docs +create --api-version v2 --parent-position my_library --content '<title>标题</title><p>内容</p>'
2525

26-
# 仅当用户明确要求时才使用 Markdown
26+
# 仅当用户明确要求时才使用 Markdown;文档标题必须是开头唯一的一级标题,正文从二级标题开始
2727
lark-cli docs +create --api-version v2 --doc-format markdown --content $'# 项目计划\n\n## 目标\n\n- 目标 1\n- 目标 2'
2828
```
2929

@@ -72,7 +72,7 @@ lark-cli docs +create --api-version v2 --doc-format markdown --content $'# 项
7272

7373
## 最佳实践
7474

75-
- 文档标题从内容中自动提取XML `<title>`Markdown `#`),不要在内容开头重复写标题
75+
- 文档标题从内容中自动提取XML 使用 `<title>`Markdown 使用文档开头唯一的一级标题(`# 标题`),正文从 `##` 开始。不要在内容开头重复写标题,也不要在 Markdown 正文中使用多个一级标题。
7676
- **创建较长的文档时只建骨架**`--content` 仅传标题 + 各级 heading + 简短占位摘要;正文留给后续 `block_insert_after --block-id <章节标题 block_id>` 分段追加。一次性塞超长 `--content` 既容易触发参数限制,调试也更难。
7777
- **视觉丰富度**:必须遵循 [`lark-doc-style.md`](style/lark-doc-style.md) 中的样式指南,主动使用结构化 block 丰富文档
7878

skills/lark-doc/references/lark-doc-md.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
`docs +fetch --api-version v2` / `docs +create --api-version v2` / `docs +update --api-version v2` 使用 `--doc-format markdown` 时适用。
44

5+
## 创建文档标题
6+
7+
使用 `docs +create --doc-format markdown` 创建文档时,文档标题必须写成内容开头唯一的一级标题:`# 标题`。正文标题从 `##` 开始,不要使用多个一级标题;否则标题可能无法被提取并显示为 `Untitled`
8+
59
## 转义规则
610

711
> **⚠️ 当文本中包含以下字符且不想触发 Markdown 语法时**,需用 `\` 前缀转义。转义分为**无条件转义**(行内任意位置生效)和**位置敏感转义**(仅特定位置才需要)两类。
@@ -73,4 +77,4 @@ Markdown 格式支持通过 URL 插入网络图片,图片将自动从 HTTP 下
7377
7478
## 参考
7579

76-
- [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规范
80+
- [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规范

skills/lark-doc/references/lark-doc-xml.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ p, h1-h9, ul, ol, li, table, thead, tbody, tr, th, td, blockquote, pre, code, hr
1010
| `<title>` | 文档标题(每篇唯一)| `align` |
1111
| `<checkbox>` | 待办项| `done="true"\|"false"` |
1212

13+
## 创建文档标题
14+
15+
使用 `docs +create` 创建 XML 文档时,文档标题必须写成 `<title>标题</title>`,且每篇文档只写一个 `<title>`
16+
1317
## 容器标签
1418
|标签|说明|关键属性|
1519
|-|-|-|

0 commit comments

Comments
 (0)