feat(template): complete encode part in template