Refactor post generation

(Prep for homepage generation)