add index for custom template engines