aboutsummaryrefslogtreecommitdiff
path: root/compile.sh
blob: 58c296863f5e01b3cb183095951f13189750b7c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/bash

md=`find . -name "*.md"`

for file in $md; do
  # build the page into an intermediate file, so when I reload in the browser,
  # it's not a 50/50 whether the page is empty or not.
  cat header.html > build.html
  pandoc -f markdown -t html $file | iconv -f UTF-8 -t ASCII//TRANSLIT >> build.html
  cat footer.html >> build.html
  cp build.html `echo $file | sed s/\.md$/.html/`
done

rm build.html