@lxgicstudios/meta-tags
v1.1.0
Published
Generate perfect meta tags for SEO. HTML meta, Open Graph, Twitter Cards, JSON-LD schema markup. Copy-paste ready.
Downloads
85
Maintainers
Readme
meta-tags
Generate perfect meta tags for SEO. HTML meta, Open Graph, Twitter Cards, JSON-LD schema. Copy-paste ready.
Installation
npm install -g @lxgicstudios/meta-tagsOr use directly:
npx @lxgicstudios/meta-tags -t "My Page" -d "Description"Usage
# Basic usage
meta-tags -t "My Website" -d "Welcome to my site" -u "https://example.com"
# With image for social sharing
meta-tags -t "Blog Post" -d "An amazing article" -i "https://example.com/image.jpg"
# Article type with author
meta-tags -t "How to Code" --type article --author "John Doe" --published "2024-01-15"
# From config file
meta-tags --config seo.json -o head.htmlOptions
| Option | Description |
|--------|-------------|
| -t, --title | Page title (required) |
| -d, --description | Meta description |
| -u, --url | Canonical URL |
| -i, --image | OG/Twitter image URL |
| -k, --keywords | Keywords (comma-separated) |
| --site-name | Website name |
| --twitter | Twitter handle |
| --type | OG type: website, article, product |
| --author | Article author |
| --published | Published date (ISO format) |
| --robots | Robots directive |
| --locale | Locale (e.g., en_US) |
Output Formats
# HTML (default)
meta-tags -t "Title" -d "Description"
# JSON
meta-tags -t "Title" --format json
# React (Helmet/Next.js)
meta-tags -t "Title" --format react
# Vue (useHead)
meta-tags -t "Title" --format vueConfig File
Create seo.json:
{
"title": "My Website - Home",
"description": "Welcome to my website. We do amazing things.",
"url": "https://example.com",
"image": "https://example.com/og-image.jpg",
"siteName": "My Website",
"twitter": "@myhandle",
"type": "website",
"locale": "en_US"
}Then run:
meta-tags --config seo.jsonExample Output
<!-- Primary Meta Tags -->
<title>My Website - Home</title>
<meta name="title" content="My Website - Home">
<meta name="description" content="Welcome to my website.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://example.com">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:title" content="My Website - Home">
<meta property="og:description" content="Welcome to my website.">
<meta property="og:url" content="https://example.com">
<meta property="og:image" content="https://example.com/og-image.jpg">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="My Website - Home">
<meta property="twitter:description" content="Welcome to my website.">
<meta property="twitter:image" content="https://example.com/og-image.jpg">
<!-- Schema.org JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "My Website - Home",
"description": "Welcome to my website.",
"url": "https://example.com"
}
</script>Programmatic Usage
const { generate } = require('@lxgicstudios/meta-tags');
const html = generate({
title: 'My Page',
description: 'Page description',
url: 'https://example.com',
image: 'https://example.com/image.jpg'
});
console.log(html);2026 SEO Features
AI Search Optimization
Make your content AI-crawler friendly (GPTBot, Claude-Web, CCBot):
meta-tags -t "My Page" -d "Description" --ai-friendlyFAQ Schema (High value for AI citations)
# Create faq.json
[
{"question": "What is X?", "answer": "X is..."},
{"question": "How does Y work?", "answer": "Y works by..."}
]
meta-tags -t "FAQ Page" --type faq --faq faq.jsonHowTo Schema
# Create steps.json
[
{"name": "Step 1", "text": "First, do this..."},
{"name": "Step 2", "text": "Then, do that..."}
]
meta-tags -t "How to Build X" --type howto --howto steps.jsonProduct Schema with Ratings
meta-tags -t "My Product" --type product --price 29.99 --currency USD --rating 4.5 --rating-count 123Breadcrumb Navigation
# Create breadcrumbs.json
[
{"name": "Home", "url": "https://example.com"},
{"name": "Products", "url": "https://example.com/products"},
{"name": "Widget", "url": "https://example.com/products/widget"}
]
meta-tags -t "Widget" --breadcrumbs breadcrumbs.jsonSpeakable Specification (Voice/AI assistants)
meta-tags -t "News Article" --type article --speakableWhy meta-tags?
- Complete - All essential tags in one command
- 2026 Ready - AI search optimization, FAQ/HowTo schemas, Speakable
- Framework support - React, Vue, plain HTML
- JSON-LD included - Schema.org markup for rich results
- Copy-paste ready - Just paste into your
<head>
Built by LXGIC Studios
GitHub: https://github.com/lxgicstudios Twitter: https://x.com/lxgicstudios
Want more free tools like this? We have 100+ on our GitHub: github.com/lxgicstudios
