An open API service indexing awesome lists of open source software.

https://github.com/fabioricali/metaset

Managing meta tag
https://github.com/fabioricali/metaset

document-title head html injection metatags pre-render server-side-rendering

Last synced: about 2 months ago
JSON representation

Managing meta tag

Awesome Lists containing this project

README

        

# metaset

> This tiny library provides some functions for managing meta tag in your HTML document


[Demo](https://fabioricali.github.io/metaset/demo/)

## Installation
```
npm install --save metaset
```

## Usage
```js
import Metaset from 'metaset'

const metaset = new Metaset();

// Set title
metaset.setTitle('The title');
// Get title
metaset.getTitle(); //The title

// Set meta tag description
metaset.setMetaName('description', 'A description...');
// Get metatag description
metaset.getMetaName('description'); //A description...

// Set OG meta tag
metaset.setMetaProperty('og:description', 'A description...');
// Get OG meta tag
metaset.getMetaProperty('og:description'); //A description...
```

## Changelog
You can view the changelog here

## License
Metaset is open-sourced software licensed under the MIT license

## Author
Fabio Ricali