compile templates synchronously