generate posts controller and index page