Skip to content
Find file
Failed to load latest commit information.
.bem Rename html tech to bemjson2html, add json2bemjson tech module Nov 23, 2012
benchmarks benchmark: add cache benchmarks Dec 7, 2012
common.blocks A bit more formatting fixes in BEMHTML reference Dec 7, 2012
test bemhtml: numeric modificator value test Nov 22, 2012
.gitignore Add .gitignore Nov 17, 2012
.travis.yml Add Travis CI integration Nov 17, 2012 bemhtml -> BEMHTML Nov 26, 2012
package.json benchmark: add cache benchmarks Dec 7, 2012

BEMHTML core library

Build Status

BEMHTML is an XSLT inspired template language that helps to write BEM-oriented templates to generate HTML in a declarative way.

bemhtml library provides:

  • bemhtml block with core templates
  • bemhtml tech module for use with bem build command of BEM tools to help compiling of templates into JavaScript
  • bemjson2html tech module for use with bem create command to help building static .html from static .bemjson.js and compiled .bemhtml.js bundle files

The core of BEMHTML compiler is implemented using OmetaJS and xjst.

Quick syntax example

// Override rendering of `link` block
block link {

    // Specify block tag
    tag: 'a'

    // Specify block html attributes
    attrs: {
        return { href: this.ctx.url }

Something went wrong with that request. Please try again.