This package has been deprecated

Author message:

Try the react-helmet package.

simply-meta

0.1.1 • Public • Published

Simply Meta

Simply Meta allows for the quick addition of complex meta tags, including SEO tags, from an javascript object or JSON.

View all supported meta tags here

var simplyMeta = require('simply-meta');
return simplyMeta({
    charset: "utf-8",
    httpEquiv: {
        cacheControl: "Public"
    }
});

Outputs...

<meta data-sm="" charset="utf-8"><meta data-sm="" http-equiv="Cache-Control" content="Public">

Install

npm i -D simply-meta
yarn add -D simply-meta

Functions

var simplyMeta = require('simply-meta');

var meta = {
    charset: "utf-8",
    httpEquiv: {
        cacheControl: "Public"
    }
};
var options = {};

var metaHtml = simplyMeta(meta, options);
// returns the meta tags as html

var html = '<!DOCTYPE html><html><head></head><body></body></html>';
var metaHtmlAdded = simplyMeta.html(meta, html, options);
// returns the html with meta tags in the header

Options

var options = {
    disableHelper: true // disables the output of data-sm="" (use only if you are not reusing the html)
};

Readme

Keywords

none

Package Sidebar

Install

npm i simply-meta

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • russellsteadman