A wrapper library for using [Pebble Templates](https://pebbletemplates.io/) in Scala.
APACHE-2.0 License
A wrapper library for using Pebble Templates in Scala.
Adds first class scala support to Pebble.
Scala Version is 2.13.x / 3.0.0
libraryDependencies += "com.sfxcode.templating" %% "pebble-scala" % "1.0.2"
<html>
<head>
<title>{{ info.name }}</title>
</head>
<body>
<ul>
{% for value in list %}
<li>{{ value }}</li>
{% endfor %}
</ul>
</body>
</html>
Scala map with global engine parameter is optional ...
val Engine: ScalaPebbleEngine = ScalaPebbleEngine(globalContext = Map("header" -> "pebble-scala"))
val context = Map("list" -> List("Resolver for Scala values", "iterate over scala collections"))
val evaluated = Engine.evaluateToString("templates/template.peb", context)
<html>
<head>
<title>pebble-scala</title>
</head>
<body>
<ul>
<li>Resolver for Scala values</li>
<li>iterate over scala collections</li>
</ul>
</body>
</html>
JetBrains is supporting this open source project with: