refactors main page to use layout and markdown