New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

semantic-blocks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-blocks

Easily add Schema.org to your BEM-project

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

semantic-blocks

NPM version Build status devDependency status

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.match('my-blog__post', function(ctx) {
    ctx.itemtype('Article');
});

yields

<div class="my-blog__post" itemscope itemtype="http://schema.org/Article"></div>

itemprop

Add any itemprop available for your scheme to any block or element:

bh.match('quote__author', function(ctx) {
    ctx.itemprop('author');
});

yields

<div class="quote__author" itemprop="author"></div>

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.

Keywords

FAQs

Package last updated on 15 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc