|
@@ -18,9 +18,8 @@ export class MarkdownWriter {
|
18
|
18
|
}
|
19
|
19
|
|
20
|
20
|
public writeMenu(classContexts: ClassContext[]) {
|
21
|
|
- const menuMarkdown = this.menuFn({
|
22
|
|
- classes: classContexts.map((c) => ({ name: c.name, path: `/api/${c.name}` }))
|
23
|
|
- });
|
|
21
|
+ const files = classContexts.map((c) => ({ name: c.name, path: `/api/${c.name}` }));
|
|
22
|
+ const menuMarkdown = this.menuFn({ files });
|
24
|
23
|
fs.writeFileSync(`${this.outputDir}/_sidebar.md`, menuMarkdown, { encoding: 'utf8' });
|
25
|
24
|
fs.writeFileSync(`${this.outputDir}/README.md`, menuMarkdown, { encoding: 'utf8' });
|
26
|
25
|
}
|