How to print out a markdown file on the console using node.js?

前端 未结 2 1190
一整个雨季
一整个雨季 2021-01-04 13:18

I have a README.md (markdown syntax) that I want to print out to the console using node.js.

Is this possible?

2条回答
  •  误落风尘
    2021-01-04 13:35

    npm i -g marky-markdown
    marky-markdown input.md > output.html
    cat output.html
    

    npmjs display pages use Maruku markdown. If you want to see how they will be displayed use the npm package marky-markdown as this is what npmjs uses. A full description is available on their blog.

提交回复
热议问题