build a pages dir with each file