Created
July 2, 2012 09:03
-
-
Save akkunchoi/3032143 to your computer and use it in GitHub Desktop.
markdown to html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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