Filter posts in archive/index to only show published

* Create an onlyPublished function that filters lists of items to only be published ones.
* Use onlyPublished to filter archive and index.