meta-cards

1.0.0 • Public • Published

meta-cards Build Status


A library to add open graph meta cards to HTML documents.

Installation

npm install meta-cards --save


Usage

const metaCards = require('meta-cards');

const cardOptions = {
      url: 'www.jestrocks.com',
      description: 'mocking DOM',
      image: 'http://i0.kym-cdn.com/photos/images/original/000/234/739/fa5.jpg',
      title: 'test title',
      'twitter:card' : 'summary',
      'twitter:site' : '@site',
      'twitter:creator' : '@admin',
      'custom:tag': 'very custom'
    };

metaCards.addCards(cardOptions, true, true)

API

addCards(options,[autofill] ,[override])

add open graph meta cards to HTML documents

options

Type: object
options object containing meta properties.
sub properties are documented with jsdoc for IDE auto completion.

[autofill=false]

Type: boolean
autofill not included tags with 'no' prefix

[override=false]

Type: boolean
override tags with custom properties


License

Copyright © 2017, Erdem Bircan. Released under the MIT License.

Package Sidebar

Install

npm i meta-cards

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • erdembircan