(relativePath)
| 24 | }; |
| 25 | |
| 26 | async function readContentFromPath(relativePath) { |
| 27 | let MdDoc = await fs.readFile(path.join(repositoryRootPath, relativePath), { |
| 28 | encoding: "utf8", |
| 29 | }); |
| 30 | let MdContent = Fm(MdDoc.toString()); |
| 31 | let TableOfContents = Toc(MdContent.body).content; |
| 32 | return { |
| 33 | frontmatter: MdContent.attributes, |
| 34 | body: MdContent.body, |
| 35 | toc: TableOfContents, |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | async function updateSectionWith(options) { |
| 40 | const { |