Skip to content

Commit 9e10d27

Browse files
committed
docs: update
1 parent e5f827f commit 9e10d27

2 files changed

Lines changed: 32 additions & 26 deletions

File tree

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[**简体中文**](https://github.com/maxchang3/hexo-markmap/blob/2.0.0-beta/README.zh.md)
22

3-
> [!WARNING]
3+
[!WARNING]
44
> This is the documentation for `hexo-markmap@2`. If you use `hexo-markmap@1`, please check [here](https://github.com/markmap-universe/hexo-markmap/tree/legacy)
55
>
66
> If you want to upgrade to `hexo-markmap@2`, please check [here](#upgrade-to-hexo-markmap-v2).
@@ -58,16 +58,20 @@ All frontmatter options are optional.
5858
- **`markmap`** : Correspond to the [`IMarkmapJSONOptions`](https://markmap.js.org/api/interfaces/markmap-view.IMarkmapJSONOptions.html) in the markmap project. For more details, please refer to [`jsonOptions`](https://markmap.js.org/docs/json-options#option-list).
5959
- alias: **`options`** (for backward compatibility)
6060

61-
> [!TIP]
62-
> **Difference between `markmap` and `options`**
63-
>
64-
> - **`markmap` (from markmap-lib)**
65-
> Will be [preprocessed](https://github.com/markmap/markmap/blob/master/packages/markmap-lib/src/plugins/frontmatter/index.ts#L41) (e.g., converting strings to arrays or numbers) and overrides the legacy `options`.
66-
> - For example, `color: 'red'` will be converted to `color: ['red']`, only the latter is valid in `markmap-view`.
67-
> - ✅ Recommended for consistent use with `markmap`.
68-
>
69-
> - **`options` (from markmap-universe)** Passed directly to markmap-view.
70-
> - ❌ Not recommended, maintained only for backward compatibility.
61+
62+
<details>
63+
64+
<summary>Difference between <code>markmap</code> and <code>options</code></summary>
65+
66+
- **`markmap` (from markmap-lib)**
67+
Will be [preprocessed](https://github.com/markmap/markmap/blob/master/packages/markmap-lib/src/plugins/frontmatter/index.ts#L41) (e.g., converting strings to arrays or numbers) and overrides the legacy `options`.
68+
- For example, `color: 'red'` will be converted to `color: ['red']`, only the latter is valid in `markmap-view`.
69+
- ✅ Recommended for consistent use with `markmap`.
70+
71+
- **`options` (from markmap-universe)** Passed directly to markmap-view.
72+
- ❌ Not recommended, maintained only for backward compatibility.
73+
74+
</details>
7175

7276

7377
#### Tag Options

README.zh.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,19 @@ markmap:
5656
- **`markmap`**/**`options`**:对应 markmap 项目中的 [`IMarkmapJSONOptions`](https://markmap.js.org/api/interfaces/markmap-view.IMarkmapJSONOptions.html)。有关更多详细信息,请参考 [`jsonOptions`](https://markmap.js.org/docs/json-options#option-list)
5757
- 别名:**`options`**(向后兼容)
5858

59-
> [!TIP]
60-
> **`markmap``options` 的区别**
61-
>
62-
> - **`markmap`(来自 markmap-lib)**
63-
> JSON Options 会被[预处理](https://github.com/markmap/markmap/blob/master/packages/markmap-lib/src/plugins/frontmatter/index.ts#L41)(例如,将字符串转换为数组或数字),并优先覆盖 `options`
64-
> - 例如,`color: 'red'` 会被转换为 `color: ['red']`,只有后者在 `markmap-view` 中有效。
65-
> - ✅ 推荐使用,以保持与 `markmap` 一致。
66-
>
67-
> - **`options`(来自 markmap-universe)** 会被直接传递给 markmap-view。
68-
> - ❌ 不推荐使用,仅为向后兼容而保留。
69-
>
59+
<details>
60+
61+
<summary><code>markmap</code> 和 <code>options</code> 的区别</summary>
62+
63+
- **`markmap`(来自 markmap-lib)**
64+
会被[预处理](https://github.com/markmap/markmap/blob/master/packages/markmap-lib/src/plugins/frontmatter/index.ts#L41)(例如,将字符串转换为数组或数字),并优先覆盖 `options`
65+
- 例如,`color: 'red'` 会被转换为 `color: ['red']`,只有后者在 `markmap-view` 中有效。
66+
- ✅ 推荐使用,以保持与 `markmap` 一致。
67+
68+
- **`options`(来自 markmap-universe)** 会被直接传递给 markmap-view。
69+
- ❌ 不推荐使用,仅为向后兼容而保留。
70+
71+
</details>
7072

7173
#### 标签选项
7274

@@ -231,10 +233,10 @@ Note that if blocks and lists appear at the same level, the lists will be ignore
231233
console.log('hello, JavaScript')
232234
```
233235

234-
- | Products | Price |
235-
|-|-|
236-
| Apple | 4 |
237-
| Banana | 2 |
236+
| - | Products | Price |
237+
| ------ | -------- |
238+
| Apple | 4 |
239+
| Banana | 2 |
238240

239241
- ![](https://markmap.js.org/favicon.png)
240242
````

0 commit comments

Comments
 (0)