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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM