Brokie Marketplace Preview

Selmer Template Engine for Clojure

A fast, Django-inspired template library for Clojure developers. Build HTML pages, emails, and reusable layouts with variables, filters, tags, includes, and inheritance.

Developer library, not a visual theme. Selmer is source code you add to a Clojure project — not a drag-and-drop website builder. This Brokie edition is based on upstream Selmer 1.13.4 (yogthos/Selmer, EPL-1.0) with community bug fixes applied. Brokie does not claim authorship of the original library.
View upstream Selmer on GitHub See syntax example
HTML & email templatesRender pages and messages from reusable template files
Layouts & partials{% extends %}, {% block %}, and {% include %} composition
Control flow{% if %}, {% for %}, {% with %}, and custom tags
Clojure integrationrender, render-file, custom filters, and Leiningen/tools.deps ready
Quick example
(require '[selmer.parser :as selmer])

(selmer/render "Hello {{name|capitalize}}!"
               {:name "world"})
;;=> "Hello World!"

(selmer/render-file "home.html" {:items ["Clojure" "Selmer" "Templates"]})
Template syntax
<ul>
{% for item in items %}
  <li>{{ item|title }}</li>
{% empty %}
  <li>No items yet.</li>
{% endfor %}
</ul>
Brokie edition — community fixes included