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
- Host: GitHub
- URL: https://github.com/fabioricali/metaset
- Owner: fabioricali
- License: mit
- Created: 2018-09-23T19:08:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-28T18:05:43.000Z (about 6 years ago)
- Last Synced: 2024-04-26T22:01:03.550Z (about 1 year ago)
- Topics: document-title, head, html, injection, metatags, pre-render, server-side-rendering
- Language: JavaScript
- Homepage:
- Size: 210 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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