-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7636ef
commit b2aee92
Showing
3 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const fs = require('fs'); | ||
const markdownIt = require('markdown-it'); | ||
const markdownItMermaid = require('markdown-it-mermaid').default; | ||
|
||
// Initialize markdown-it with the mermaid plugin | ||
const md = markdownIt().use(markdownItMermaid); | ||
|
||
// Read the Markdown file | ||
const markdown = fs.readFileSync('cool-root-doc.md', 'utf8'); | ||
|
||
// Convert it to HTML | ||
const result = md.render(markdown); | ||
|
||
// Write the HTML output to a file | ||
fs.writeFileSync('cool-root-doc.html', result); | ||
|
||
console.log('Markdown converted to HTML successfully.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters