Refactor post template into partials