Updated structure, now uses php

Blog posts in particular benefit from this
Not having to duplicate code is a plus
Can't believe I overlooked this earlier