|
1 | 1 | [**简体中文**](https://github.com/maxchang3/hexo-markmap/blob/2.0.0-beta/README.zh.md) |
2 | 2 |
|
3 | | -> [!WARNING] |
| 3 | +[!WARNING] |
4 | 4 | > 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) |
5 | 5 | > |
6 | 6 | > 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. |
58 | 58 | - **`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). |
59 | 59 | - alias: **`options`** (for backward compatibility) |
60 | 60 |
|
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> |
71 | 75 |
|
72 | 76 |
|
73 | 77 | #### Tag Options |
|
0 commit comments