update to allow building an index and use precompiled template