Linux下使用Markdown

1、在Linux系统中,编辑markdown可以用retext工具

# Debian/Ubuntu
sudo apt-get install retext
retext Release-Notes.md

2、使用python-markdown将markdown文件转换成html文件

markdown_py -o html4 Release-Notest.md > Release-Notes.html

3、使用python-pisa将html转换成pdf文件

xhtml2pdf --html Release-Notes.html Release-Notes.pdf

4、通过在文件的开头加上meta标记解决markdown的内容是中文乱码

sed -i '1i<meta http-equiv="content-type" content="text/html; charset=UTF-8">' *.md
原文地址:https://www.cnblogs.com/HectorHou/p/6113214.html