{"id":17501901,"url":"https://github.com/sfxcode/pebble-scala","last_synced_at":"2025-04-23T03:23:02.760Z","repository":{"id":49259349,"uuid":"273935725","full_name":"sfxcode/pebble-scala","owner":"sfxcode","description":"A wrapper library for using [Pebble Templates](https://pebbletemplates.io/) in Scala.","archived":false,"fork":false,"pushed_at":"2024-01-14T18:48:56.000Z","size":116,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T21:32:21.340Z","etag":null,"topics":["pebble","pebble-templates","scala","template-engine","templating"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sfxcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-21T15:49:32.000Z","updated_at":"2023-02-23T15:25:32.000Z","dependencies_parsed_at":"2024-01-14T20:09:30.101Z","dependency_job_id":"18277342-eb38-4d77-9a23-d20efcbe1f9f","html_url":"https://github.com/sfxcode/pebble-scala","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfxcode%2Fpebble-scala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfxcode%2Fpebble-scala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfxcode%2Fpebble-scala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfxcode%2Fpebble-scala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfxcode","download_url":"https://codeload.github.com/sfxcode/pebble-scala/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250361728,"owners_count":21417953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pebble","pebble-templates","scala","template-engine","templating"],"created_at":"2024-10-19T20:16:26.108Z","updated_at":"2025-04-23T03:23:02.740Z","avatar_url":"https://github.com/sfxcode.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pebble-scala\n\nA wrapper library for using [Pebble Templates](https://pebbletemplates.io/) in Scala.\n\nAdds first class scala support to Pebble.\n\n## Features\n\n* Resolver for Scala values\n* Support Scala Lists, Set, Maps, Options, ...\n* Loops support scala collections\n* Scala Support for Tests (empty, map, iterable)\n* iterate over scala collections\n* implement do Tag\n* ...\n\n\n## Version\nScala Version is 2.13.x / 3.0.0\n\n## SBT\n\n```\nlibraryDependencies += \"com.sfxcode.templating\" %% \"pebble-scala\" % \"1.0.2\"\n```\n\n## Travis\n\n[![Build Status](https://travis-ci.org/sfxcode/pebble-scala.svg?branch=master)](https://travis-ci.org/sfxcode/pebble-scala)\n\n## Download\n\n[ ![Download](https://api.bintray.com/packages/sfxcode/maven/pebble-scala/images/download.svg) ](https://bintray.com/sfxcode/maven/pebble-scala/_latestVersion)\n\n\n## Usage\n\n1. Write Template\n\n```html\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003e{{ info.name }}\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cul\u003e\n{% for value in list %}\n    \u003cli\u003e{{ value }}\u003c/li\u003e\n{% endfor %}\n\u003c/ul\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n2. Init Engine\n\nScala map with global engine parameter is optional ...\n\n```scala\n val Engine: ScalaPebbleEngine = ScalaPebbleEngine(globalContext = Map(\"header\" -\u003e \"pebble-scala\"))\n```\n\n3. Evaluate\n\n```\n val context   = Map(\"list\" -\u003e List(\"Resolver for Scala values\", \"iterate over scala collections\"))\n val evaluated = Engine.evaluateToString(\"templates/template.peb\", context)\n```\n\n4. Result\n\n```html\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003epebble-scala\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cul\u003e\n    \u003cli\u003eResolver for Scala values\u003c/li\u003e\n    \u003cli\u003eiterate over scala collections\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Supporters\n\nJetBrains is supporting this open source project with:\n\n[![Intellij IDEA](http://www.jetbrains.com/img/logos/logo_intellij_idea.png)](http://www.jetbrains.com/idea/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfxcode%2Fpebble-scala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfxcode%2Fpebble-scala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfxcode%2Fpebble-scala/lists"}