Skip to content

Instantly share code, notes, and snippets.

@akkunchoi
Created July 2, 2012 09:03
Show Gist options
  • Save akkunchoi/3032143 to your computer and use it in GitHub Desktop.
Save akkunchoi/3032143 to your computer and use it in GitHub Desktop.
markdown to html
#!/usr/bin/bash
# Get Markdown.pl http://daringfireball.net/projects/markdown/
mkdir ./html
for i in foo.md bar.md
do
out=${i/.md/.html}
content=`perl ./Markdown.pl $i`
cat << EOF > ./html/$out 2>&1
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>$i</title>
</head>
<body>
$content
</body>
</html>
EOF
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment