Class HandlebarsUtils

java.lang.Object
io.micrometer.docs.commons.templates.HandlebarsUtils

public class HandlebarsUtils extends Object
Utility for Handlebars.
  • Constructor Details

    • HandlebarsUtils

      public HandlebarsUtils()
  • Method Details

    • createHandlebars

      public static com.github.jknack.handlebars.Handlebars createHandlebars()
    • createTemplate

      public static com.github.jknack.handlebars.Template createTemplate(String templateLocation) throws IOException
      Create a handlebar Template from template location.

      While loading the template, this method converts the line delimiter from the one used in template file("LF") to the one from the running OS. (for example, "CRLF" on a windows machine).

      Parameters:
      templateLocation - template location (either in classpath or file system)
      Returns:
      a template
      Throws:
      IOException - If the template's source can't be resolved.