Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

DEPRECATED

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .bem
Octocat-spinner-32 benchmarks
Octocat-spinner-32 common.blocks
Octocat-spinner-32 common.docs
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
README.md

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.