include the post_type (if not 'post'), and post_id (optional) in the frontmatter; also filter out 'attachments' (images)