This is a simple command-line app that converts any Markdown (.md) file into a styled HTML (.html) file using Node.js and the markdown-it library.
Perfect for beginners learning how to use JavaScript, Node.js, and Visual Studio Code.
- Converts
.mdfiles into readable, styled.htmlpages - Automatically wraps the content in a complete HTML document
- Adds basic CSS for clean formatting
- [Node.js]
- Visual Studio Code
Create a folder and open it in Visual Studio Code.
Use Terminal > New Terminal
npm init -y
npm install markdown-it
Example: test.md
node convert.js test.md test.html
- Find the generated test.html file in your folder.
- Double-click to open it in your browser.
- The script reads your .md file.
- It uses markdown-it to convert Markdown to HTML.
- It wraps the HTML inside a full document with CSS styling.
- It saves the result as a .html file.