public static Template addTemplate(Path catalogFile, String name, Map<String, String> fileRefs,
			String description, Map<String, TemplateProperty> properties) {
		Path cwd = Util.getCwd();
		catalogFile = cwd.resolve(catalogFile);
		Catalog catalog = Catalog.get(catalogFile);
		Map<String, String> relFileRefs = fileRefs.entrySet()
			.stream()
			.map(e -> entry(e.getKey(), catalog.relativize(e.getValue())))
			.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
		Template template = new Template(relFileRefs, description, properties, catalog);
		catalog.templates.put(name, template);
		try {
			catalog.write();
			return template;
		} catch (IOException ex) {
			Util.warnMsg("Unable to add template: " + ex.getMessage());
			return null;
		}
	}
Adds a new template to the given catalog

@param catalogFile Path to catalog file
@param name        The name of the new template
@param properties  Properties that the template uses and can be used during
                   script initialization to customize the script.
src/main/java/dev/jbang/catalog/CatalogUtil.java