A small command line tool to convert Markdown files into HTML formatted for WordPress configured with the WP-GeSHi-Highlight plugin. It uses Showdown and then performs additional processing.
- Install Node.js. Version 14 is confirmed to work with macOS 11.0 and Windows 10 20H2.
- Run
npm install
- Write the Markdown file you want to convert to HTML
- Run
node /path/to/md2wphtml.js /path/to/input.md /path/to/output.html
The output HTML is now in /path/to/output.html
and has been copied to the clipboard so it can be pasted into WordPress.