Created
September 12, 2014 19:47
-
-
Save dyama/c2841c138f24ccab6f4f to your computer and use it in GitHub Desktop.
My 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
#!/bin/bash | |
for file in `find . -type f -name '*.md' | xargs -I{} basename {} | sed 's/\.md$//g'` | |
do | |
( | |
echo '<!--#include file="head.html" -->' | |
markdown $file.md | |
echo '<!--#include file="foot.html" -->' | |
) > $file.html | |
chmod 644 $file.html | |
done | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment