readDir should read pages and resources