Skip to content

Instantly share code, notes, and snippets.

@dyama
Created September 12, 2014 19:47
Show Gist options
  • Save dyama/c2841c138f24ccab6f4f to your computer and use it in GitHub Desktop.
Save dyama/c2841c138f24ccab6f4f to your computer and use it in GitHub Desktop.
My markdown to html
#!/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