Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nrigaudiere/shoebill-js
Node module to generate different kind of meta for SEO (open graph and twitter cards)
https://github.com/nrigaudiere/shoebill-js
Last synced: 23 days ago
JSON representation
Node module to generate different kind of meta for SEO (open graph and twitter cards)
- Host: GitHub
- URL: https://github.com/nrigaudiere/shoebill-js
- Owner: nrigaudiere
- License: mit
- Created: 2015-11-18T23:00:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T13:47:58.000Z (almost 7 years ago)
- Last Synced: 2024-11-28T21:17:43.575Z (about 1 month ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ShoebillJS
Node module to generate different kind of meta for SEO (open graph and twitter cards)## Installation
```sh
$ npm install --save shoebill-js
```##Usage
###JavaScript
```
/* Require and initialise the module*/
var ShoebillJS = require('shoebill-js');
var sbjs = new ShoebillJS();/* Generate your Metas */
sbjs.ogtitle('MyTitle');
sbjs.ogtype('website');
sbjs.ogsitename('My Website');
sbjs.ogdescription('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.');
sbjs.ogurl('http://www.myurl.com');
sbjs.ogimage({
url: 'http://myurl.com/img/mylogo.png',
width: 300,
height: 300
});sbjs.twcard('summary');
sbjs.twsite('@MyTwitter');var metaTags = sbjs.toHTML();
/* Use metaTags variable and send your meta to your template ! */
```###HTML Render
```
```
The available meta are the following :
- og:title
- og:type
- og:url
- og:description
- og:site_name
- og:determiner
- og:locale
- og:locale:alternate
- og:image
- og:image:url
- og:image:secure_url
- og:image:type
- og:image:width
- og:image:height
- og:video
- og:video:secure_url
- og:video:type
- og:video:width
- og:video:height
- og:audio
- og:audio:secure_url
- og:audio:type- twitter:card
- twitter:site
- twitter:creator
- twitter:title
- twitter:description
- twitter:imageLicense
----MIT