Skip to content

Commit ccab8f6

Browse files
committed
docs: update README.md
1 parent 5aa649d commit ccab8f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ Converts sidebar YAML files (matching the schema) into readable, structured Mark
6666
Supports preservation of YAML comments (before each sidebar entry) as Markdown paragraphs, and includes metadata such as the YAML filename and timestamp as Markdown comments.
6767

6868
**Features:**
69+
6970
- Converts all sidebar structure, including nested items, headings, and tags, into Markdown.
7071
- Scalar properties (string, number, boolean) are rendered as `_property_: value`.
7172
- Tags arrays are rendered as Markdown sub-lists.
7273
- YAML comments before each sidebar entry are rendered as Markdown paragraphs after the heading.
7374
- Prepends Markdown comments for the YAML filename and timestamp.
7475

7576
**Usage Example:**
77+
7678
```js
7779
const fs = require('fs');
7880
const { parseYamlWithSidebarComments, convertDataToMarkdown } = require('./scripts/yamlToMarkdown');
@@ -93,12 +95,14 @@ convertDataToMarkdown(data, { yamlFilePath: 'sidebars.yaml' }).then(markdown =>
9395
Converts Markdown navigation lists (as generated by `yamlToMarkdown.js`) back into YAML, reconstructing the sidebar structure and restoring comments as YAML comments.
9496

9597
**Features:**
98+
9699
- Parses Markdown headings, paragraphs, and lists to reconstruct the sidebar data structure.
97100
- Converts Markdown paragraphs between headings and the first list item into YAML comments.
98101
- Scalar properties and tags are faithfully restored.
99102
- Prepends YAML comments for the Markdown filename and timestamp.
100103

101104
**Usage Example:**
105+
102106
```js
103107
const fs = require('fs');
104108
const { convertMarkdownToYaml } = require('./scripts/markdownToYaml');
@@ -171,4 +175,4 @@ Have a question or feedback? Please use one of the following channels:
171175

172176
Released under the [MIT License](LICENSE). Use it freely in commercial and open-source projects.
173177

174-
---
178+
---

0 commit comments

Comments
 (0)