sh 此脚本将完整Markdown文件的目录转换为HTML文件。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 此脚本将完整Markdown文件的目录转换为HTML文件。相关的知识,希望对你有一定的参考价值。

# This script converts a directory full of Markdown files into HTML files.
# It uses pandoc to do the conversion.
#
# 1. Copy this script into the directory containing the .md files
# 2. Run 'sh md-to-html.sh'
# 3. HTML files will be outputted with same filename as the original Markdown files

FILES=*.md
for f in $FILES
do
  filename="${f%.*}"
  echo "Converting $f to $filename.md"
  `pandoc $f -t html -o $filename.html`
  # Uncomment to delete the source .rst files.
  # rm $f
done

以上是关于sh 此脚本将完整Markdown文件的目录转换为HTML文件。的主要内容,如果未能解决你的问题,请参考以下文章