1.0.0 • Published 6 years ago

meta-cards v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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.