All Projects → rafaelrinaldi → html-meta-tags

rafaelrinaldi / html-meta-tags

Licence: MIT license
Generate HTML meta tags from JSON data.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to html-meta-tags

svelte-seo
Optimize your website for search engines and social media with meta tags, Open Graph, and JSON-LD.
Stars: ✭ 257 (+851.85%)
Mutual labels:  open-graph, meta-tags
laravel-meta
💥 Render meta tags within your Laravel application
Stars: ✭ 36 (+33.33%)
Mutual labels:  open-graph, meta-tags
Seotools
SEO Tools for Laravel
Stars: ✭ 2,406 (+8811.11%)
Mutual labels:  meta-tags
Ngmeta
Dynamic meta tags in your AngularJS single page application
Stars: ✭ 152 (+462.96%)
Mutual labels:  meta-tags
Fusebox Angular Universal Starter
Angular Universal seed project featuring Server-Side Rendering, @fuse-box bundling, material, firebase, Jest, Nightmare, and more
Stars: ✭ 132 (+388.89%)
Mutual labels:  meta-tags
Meta Tags
Search Engine Optimization (SEO) for Ruby on Rails applications.
Stars: ✭ 2,464 (+9025.93%)
Mutual labels:  meta-tags
furlex
A structured data extraction tool written in Elixir
Stars: ✭ 42 (+55.56%)
Mutual labels:  open-graph
vuepress-plugin-autometa
Auto meta tags plugin for VuePress 1.x
Stars: ✭ 40 (+48.15%)
Mutual labels:  meta-tags
axiom
Axiom - A Hugo Theme. GitTip: https://gitcoin.co/tip?username=jhauraw
Stars: ✭ 67 (+148.15%)
Mutual labels:  open-graph
SeoTags
SeoTags create all SEO tags you need such as meta, link, twitter card (twitter:), open graph (og:), and JSON-LD schema (structred data).
Stars: ✭ 113 (+318.52%)
Mutual labels:  open-graph
Og Image
Open Graph Image as a Service - generate cards for Twitter, Facebook, Slack, etc
Stars: ✭ 2,706 (+9922.22%)
Mutual labels:  open-graph
Vue Headful
Set document title and meta tags with Vue.js
Stars: ✭ 229 (+748.15%)
Mutual labels:  meta-tags
flyyer-ruby
Ruby helpers to create https://cdn.flyyer.io URLs | Og:Image as a Service
Stars: ✭ 13 (-51.85%)
Mutual labels:  open-graph
Unfurl
Scraper for oEmbed, Twitter Cards and Open Graph metadata - fast and Promise-based ⚡️
Stars: ✭ 193 (+614.81%)
Mutual labels:  meta-tags
flyyer-wp
👉 Visit the wiki: https://github.com/useflyyer/flyyer-wp/wiki | Generate social share images with web technologies
Stars: ✭ 13 (-51.85%)
Mutual labels:  open-graph
oge
Page metadata as a service
Stars: ✭ 22 (-18.52%)
Mutual labels:  open-graph
flyyer-python
Python helpers to create https://flyyer.io URLs for link previews | Manage your og:images from a single dashboard
Stars: ✭ 11 (-59.26%)
Mutual labels:  open-graph
laravel-assets
Laravel Assets manager
Stars: ✭ 13 (-51.85%)
Mutual labels:  meta-tags
meta-tag-gen
Generate HTML code optimal for social media, SEO, mobile. Uses web standards from Open Graph (Facebook) and Twitter to provide optimal results. Also generates social media posts.
Stars: ✭ 24 (-11.11%)
Mutual labels:  meta-tags
Awesome-meta-tags
📙 Awesome collection of meta tags
Stars: ✭ 18 (-33.33%)
Mutual labels:  meta-tags

html-meta-tags Build Status

Generate HTML meta tags from JSON data.

Install

npm install html-meta-tags -g

Usage

CLI

You can either pipe data from the standard input or specify a file path for the program.

$ html-meta-tags

Usage: html-meta-tags <file> [options]

Example:
  cat data.json | html-meta-tags

Options:
  -v --version          Display current program version
  -h --help             Display help and usage details
     --no-charset       Do not specify UTF-8 as document charset
     --no-og            Do not generate Open Graph meta tags
     --no-twitter       Do not generate Twitter meta tags

$ echo '
{
  "title": "My Website",
  "url": "https://mywebsite.com",
  "keywords": ["blockchain", "infosec", "crypto"],
  "description": "This is my personal website"
}' | html-meta-tags
<meta charset="utf-8">
<meta name="title" content="My Website">
<meta name="url" content="https://mywebsite.com">
<meta name="keywords" content="blockchain, infosec, crypto">
<meta name="description" content="This is my personal website">
<meta name="twitter:description" content="This is my personal website">
<meta name="twitter:title" content="My Website">
<meta property="og:description" content="This is my personal website">
<meta property="og:title" content="My Website">

Node.js

var htmlMetaTags = require('html-meta-tags')
var data = require('./data.json')

console.log(htmlMetaTags(data))

API

htmlMetaTags(data, [options])

Returns an HTML string containing a representation of all meta tags from data.

data

Type: Object

Meta tags in object notation format.

  • You can use arrays for comma-separated such as keywords or viewport.
  • If a specific value for a prefixed key is specified it will take precedence over the default.
  • Prefixed keys should have their own entry, og:title for example, should be represented as:
{
  og: {
    title: 'value'
  }
}

options

Type: Object

shouldIgnoreCharset

Type: boolean
Default: false

Whether or not it should render UTF-8 charset meta tag.

shouldIgnoreTwitter

Type: boolean
Default: false

Whether or not it should render Twitter specific meta tags.

shouldIgnoreOpenGraph

Type: boolean
Default: false

Whether or not it should render Open Graph specific meta tags.

License

MIT © Rafael Rinaldi


Buy me a

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].