semantic-blocks
Easily add Schema.org to your BEM-project.
Install
Just install it as npm package:
npm install bh
Add level node_modules/semantic-blocks/schema
to your BEM/ENB make file, and add i-bem__schema
to deps:
mustDeps: block: 'i-bem' elem: 'schema' ;
Usage
itemtype
Add any available schema to any block or element:
bh;
yields
itemprop
Add any itemprop available for your scheme to any block or element:
bh;
yields
Predefined blocks
Now there is only one block which has schema.org properties: article. So, if you call your block article
, it will get an itemtype= http://schema.org/Article
.
Other blocks are comming soon. Send me pull-request with blocks you need, or open an issue.