Getting Started
Get up and running with m-seo in minutes.
Installation
npm install m-seoyarn add m-seopnpm add m-seoCLI Usage
M-SEO provides a comprehensive command-line interface for SEO operations. Install globally or use with npx:
# Install globally
npm install -g m-seo
# Use anywhere
m-seo --help
m-seo --version# Use directly without installation
npx m-seo --help
npx m-seo audit -u https://example.comCommon Commands
Generate Meta Tags
m-seo meta \
-t "My Awesome Page" \
-d "Comprehensive guide to web development" \
-u "https://example.com" \
-k "web,development,seo" \
-i "https://example.com/og-image.jpg" \
-o meta-tags.htmlRun SEO Audit
# HTML report
m-seo audit -u https://example.com -f html -o report.html
# JSON output
m-seo audit -u https://example.com -f json -o audit.json
# With score threshold
m-seo audit -u https://example.com -t 80 --fixBatch Audit Multiple URLs
# Create urls.txt with one URL per line
echo "https://example.com
https://example.com/about
https://example.com/contact" > urls.txt
# Run batch audit
m-seo audit-batch -u urls.txt -o ./reports -f json -p 5Generate Sitemap
# From URLs file
m-seo sitemap -u urls.txt -o sitemap.xml
# From JSON
m-seo sitemap -u '[
{"loc": "https://example.com", "priority": 1.0},
{"loc": "https://example.com/about", "priority": 0.8}
]' -o sitemap.xml
# With compression
m-seo sitemap -u urls.txt -o sitemap.xml -cGenerate Robots.txt
m-seo robots \
-s https://example.com/sitemap.xml \
-d "/admin,/private,/api" \
-o robots.txtBot Detection
# Check if user agent is a bot
m-seo bot-check -u "Googlebot/2.1" -d
# Output:
# ✓ Bot detected: Googlebot
# Type: Search Engine
# Category: Major Search EngineGenerate Structured Data
# Product schema
m-seo schema -t product -d '{
"name": "Premium Widget",
"price": "99.99",
"currency": "USD",
"description": "High-quality widget"
}' -o product-schema.json
# Article schema
m-seo schema -t article -d article-data.json -vStart REST API Server
# Start server for multi-language SDKs (Python, PHP, Ruby, Go)
m-seo server --port 3100 --api-key your_secret_key --cors
# Server endpoints:
# POST /api/meta - Generate meta tags
# POST /api/sitemap - Generate sitemap
# POST /api/audit - Run SEO audit
# GET /health - Health checkWatch URLs for Changes
m-seo watch \
-u "https://example.com,https://example.com/blog" \
-i 300 \
-n consoleValidate Existing SEO
m-seo validate -u https://example.com -c meta,og,schema,perfAll Available Commands
| Command | Description | Options |
|---|---|---|
meta | Generate SEO meta tags | -t, -d, -u, -k, -i, -o, -f |
sitemap | Generate XML sitemap | -u, -o, --changefreq, --priority, -c |
robots | Generate robots.txt | -s, -o, -d, -u |
audit | Run SEO audit | -u, -o, -f, -t, --fix |
audit-batch | Audit multiple URLs | -u, -o, -f, -p |
schema | Generate structured data | -t, -d, -o, -v |
bot-check | Check bot detection | -u, -d |
validate | Validate existing SEO | -u, -c, -o |
watch | Monitor URL changes | -u, -i, -n |
server | Start REST API server | -p, -h, -k, --cors |
Command Help
Get detailed help for any command:
m-seo <command> --help
# Examples:
m-seo meta --help
m-seo audit --help
m-seo server --helpRequirements
- Node.js ≥ 16.0.0
- TypeScript (optional, but recommended)
Quick Start
1. Import the Library
// Core (framework-agnostic)
import { SeoEngine, createSEO } from "m-seo";
// React adapter
import { useSeo, useStructuredData } from "m-seo/adapters/ReactSPAAdapter";
// Vue adapter
import { useSeo, useStructuredData } from "m-seo/adapters/VueSPAAdapter";
// Express adapter
import { ExpressAdapter } from "m-seo/adapters/ExpressAdapter";2. Basic Usage
Simple API (Recommended for Most Cases)
import { createSEO } from "m-seo";
const seo = createSEO({
title: "My Awesome Website",
description: "A comprehensive guide to web development",
image: "https://example.com/og-image.jpg",
url: "https://example.com",
keywords: ["web", "development", "seo"],
});
// Get HTML meta tags
console.log(seo.html);
// Output: <title>My Awesome Website</title>
// <meta name="description" content="A comprehensive guide...">
// <meta property="og:title" content="My Awesome Website">
// ...
// Get JSON-LD structured data
console.log(seo.jsonLd);Advanced API (Full Control)
import { SeoEngine } from "m-seo";
const seo = new SeoEngine({
title: "Custom Title",
description: "Custom description",
canonical: "https://example.com/page",
ogImage: "https://example.com/og.png",
twitterCard: "summary_large_image",
robots: "index, follow",
author: "John Doe",
siteName: "My Site",
locale: "en_US",
themeColor: "#3490dc",
});
// Generate meta tags as objects
const metaTags = seo.generateMetaTags();
// [{ name: 'description', content: '...' }, ...]
// Generate as HTML string
const htmlString = seo.toHtmlString();
// Update configuration
seo.updateConfig({ title: "New Title" });Framework-Specific Setup
React (Hooks)
import { useSeo, useStructuredData } from "m-seo/adapters/ReactSPAAdapter";
function HomePage() {
// Set SEO tags
useSeo({
title: "Home - My React App",
description: "Welcome to my awesome React application",
canonical: "https://example.com",
ogImage: "https://example.com/og.jpg",
});
// Add structured data
useStructuredData({
"@context": "https://schema.org",
"@type": "WebSite",
name: "My React App",
url: "https://example.com",
});
return (
<div>
<h1>Welcome!</h1>
</div>
);
}React (Components)
import { SeoHead, JsonLd } from "m-seo/adapters/ReactSPAAdapter";
function BlogPost({ post }) {
return (
<div>
<SeoHead
title={`${post.title} - Blog`}
description={post.excerpt}
ogImage={post.image}
/>
<JsonLd
data={{
"@type": "BlogPosting",
headline: post.title,
datePublished: post.date,
author: { "@type": "Person", name: post.author },
}}
/>
<article>
<h1>{post.title}</h1>
<p>{post.content}</p>
</article>
</div>
);
}Vue 3 (Composables)
<template>
<div>
<h1>{{ article.title }}</h1>
<p>{{ article.content }}</p>
</div>
</template>
<script setup lang="ts">
import { reactive } from "vue";
import { useSeo, useStructuredData } from "m-seo/adapters/VueSPAAdapter";
const article = reactive({
title: "Getting Started with Vue SEO",
content: "Learn how to implement SEO in Vue applications",
author: "John Doe",
publishedDate: "2024-01-15",
});
// Set SEO tags
useSeo({
title: `${article.title} - Blog`,
description: article.content,
canonical: "https://example.com/blog",
});
// Add structured data
useStructuredData({
"@context": "https://schema.org",
"@type": "Article",
headline: article.title,
author: {
"@type": "Person",
name: article.author,
},
datePublished: article.publishedDate,
});
</script>Vue 3 (Components)
<template>
<div>
<SeoHead
:title="`${post.title} - Blog`"
:description="post.excerpt"
:ogImage="post.image"
/>
<JsonLd :data="articleSchema" />
<article>
<h1>{{ post.title }}</h1>
<p>{{ post.content }}</p>
</article>
</div>
</template>
<script setup lang="ts">
import { reactive } from "vue";
import { SeoHead, JsonLd } from "m-seo/adapters/VueSPAAdapter";
const post = reactive({
title: "Blog Post Title",
excerpt: "Post excerpt",
content: "Post content",
image: "https://example.com/image.jpg",
author: "John Doe",
date: "2024-01-15",
});
const articleSchema = {
"@type": "BlogPosting",
headline: post.title,
datePublished: post.date,
author: { "@type": "Person", name: post.author },
};
</script>Next.js (App Router)
// app/layout.tsx
import { Metadata } from "next";
import { createSEO } from "m-seo";
export async function generateMetadata(): Promise<Metadata> {
const seo = createSEO({
title: "My Next.js App",
description: "Welcome to my site",
});
return {
title: seo.title,
description: seo.description,
openGraph: seo.openGraph,
};
}Next.js (Pages Router)
// pages/index.tsx
import Head from "next/head";
import { SeoEngine } from "m-seo";
export default function HomePage() {
const seo = new SeoEngine({
title: "Home",
description: "Welcome",
});
return (
<>
<Head>
<title>{seo.getConfig().title}</title>
{seo.generateMetaTags().map((tag, i) => (
<meta key={i} {...tag} />
))}
</Head>
<h1>Home</h1>
</>
);
}Express.js
const express = require("express");
const { ExpressAdapter, SeoEngine } = require("m-seo");
const app = express();
// Use middleware (optional)
app.use(
ExpressAdapter({
defaults: {
siteName: "My Express App",
locale: "en_US",
},
})
);
// Route-specific SEO
app.get("/", (req, res) => {
const seo = new SeoEngine({
title: "Home",
description: "Welcome to my Express app",
canonical: "https://example.com",
});
res.send(`
<!DOCTYPE html>
<html>
<head>
${seo.toHtmlString()}
</head>
<body>
<h1>Home</h1>
</body>
</html>
`);
});
app.listen(3000);Vue 3 (Composition API)
<script setup>
import { onMounted } from "vue";
import { SeoEngine } from "m-seo";
onMounted(() => {
const seo = new SeoEngine({
title: "Vue 3 App",
description: "Built with Vue 3 and m-seo",
});
document.title = seo.getConfig().title;
// Inject meta tags
const metaTags = seo.generateMetaTags();
metaTags.forEach((tag) => {
const meta = document.createElement("meta");
Object.keys(tag).forEach((key) => {
meta.setAttribute(key, tag[key]);
});
document.head.appendChild(meta);
});
});
</script>
<template>
<div>
<h1>Vue 3 App</h1>
</div>
</template>Vanilla JavaScript
import { SeoEngine } from "m-seo";
// Initialize SEO
const seo = new SeoEngine({
title: "My Static Site",
description: "Built with vanilla JS",
canonical: window.location.href,
});
// Set document title
document.title = seo.getConfig().title;
// Inject meta tags
const metaTags = seo.generateMetaTags();
metaTags.forEach((tag) => {
const meta = document.createElement("meta");
if (tag.name) meta.setAttribute("name", tag.name);
if (tag.property) meta.setAttribute("property", tag.property);
meta.setAttribute("content", tag.content);
document.head.appendChild(meta);
});CMS Integration (NEW v1.1.1)
M-SEO now includes powerful CMS integration for WordPress, Ghost, Drupal, Joomla, Contentful, and Strapi.
WordPress Integration
import { CMSPlugins } from "m-seo";
// Initialize WordPress connection
const cms = new CMSPlugins({
platform: "wordpress",
baseUrl: "https://your-wordpress-site.com",
credentials: {
username: "admin",
password: "your-app-password", // WordPress Application Password
},
});
// Fetch content from WordPress
const content = await cms.fetchContent({ id: "123" });
// Generate SEO data from content
const seo = await cms.generateSeoData(
{ platform: "wordpress", baseUrl: "https://your-site.com" },
content
);
// Sync SEO data back to WordPress
await cms.syncToWordPress(
{ platform: "wordpress", baseUrl: "https://your-site.com" },
content,
seo
);Batch Processing
// Process multiple posts simultaneously
const results = await cms.batchProcess({
operations: [
{ type: "fetch", id: "1" },
{ type: "fetch", id: "2" },
{ type: "generate-seo", content: content1 },
{ type: "sync", content: content2, seo: seo2 },
],
config: { platform: "wordpress", baseUrl: "https://your-site.com" },
});
console.log(`Processed ${results.length} operations`);Export/Import
// Export content to various formats
const exported = await cms.exportContent(
[content1, content2],
{ format: "json" } // or 'csv', 'xml', 'markdown'
);
// Import from external sources
const imported = await cms.importContent(externalData, "json", {
platform: "wordpress",
});AI Content Analysis (NEW v1.1.1)
Analyze content for SEO optimization with AI-powered recommendations.
Basic Analysis
import { AIContentAnalysis } from "m-seo";
// Analyze article content
const analysis = await AIContentAnalysis.analyzeContent(
"Your article text here...",
{
provider: "openai", // or 'claude', 'huggingface'
apiKey: "your-api-key",
enableReadability: true,
enableSentiment: true,
enableKeywordAnalysis: true,
}
);
// Get results
console.log("SEO Score:", analysis.scores.overall); // 0-100
console.log("Readability:", analysis.readability);
console.log("Sentiment:", analysis.sentiment.type); // positive/negative/neutral
console.log("Top Keywords:", analysis.keywords.slice(0, 5));
console.log("Recommendations:", analysis.recommendations);Readability Scores
// Access multiple readability formulas
const { readability } = analysis;
console.log("Flesch Reading Ease:", readability.fleschReadingEase); // 0-100
console.log("Gunning Fog Index:", readability.gunningFog); // Grade level
console.log("SMOG Index:", readability.smog);
console.log("Coleman-Liau:", readability.colemanLiau);
console.log("ARI:", readability.automatedReadability);
console.log("Dale-Chall:", readability.daleChall);Keyword Analysis
// Get keyword insights
const { keywords } = analysis;
keywords.forEach((kw) => {
console.log(`${kw.word}: ${kw.frequency} times (${kw.density}%)`);
console.log(`Relevance: ${kw.relevance}/100`);
});Export Reports
// Export analysis as report
const report = await AIContentAnalysis.exportAnalysis(analysis, {
format: "markdown", // or 'json', 'html', 'pdf'
includeCharts: true,
includeSuggestions: true,
includeHistory: true,
});
// Save to file
fs.writeFileSync("seo-report.md", report);Batch Analysis
// Analyze multiple articles
const batchResults = await AIContentAnalysis.batchAnalyze({
requests: [
{ content: "Article 1...", config: { enableReadability: true } },
{ content: "Article 2...", config: { enableSentiment: true } },
],
globalConfig: { provider: "openai", apiKey: "your-key" },
});
console.log(`Analyzed ${batchResults.length} articles`);Image Optimization (NEW v1.1.1)
Optimize images for better SEO and performance with AI-powered features.
Analyze Image
import { ImageOptimizer } from "m-seo";
// Analyze existing image
const analysis = await ImageOptimizer.analyzeImage(
"https://example.com/image.jpg",
"Product photo"
);
console.log("Alt Quality:", analysis.altQuality); // 0-100
console.log("Is Optimized:", analysis.isOptimized);
console.log("Potential Savings:", analysis.potentialSavings);
console.log("Recommendations:", analysis.recommendations);Optimize Image
// Optimize with responsive variants
const optimized = await ImageOptimizer.optimizeImage({
src: "https://example.com/image.jpg",
format: "webp", // or 'avif', 'jpeg', 'png', 'auto'
quality: 85,
maxWidth: 1920,
maxHeight: 1080,
responsive: true,
breakpoints: [320, 640, 768, 1024, 1280, 1536],
sizes: "(max-width: 768px) 100vw, 50vw",
loading: "lazy",
generateAlt: true, // AI-generated alt text
keywords: ["product", "demo", "feature"],
});
// Use optimized image
console.log(optimized.html); // Complete <picture> tag
console.log(optimized.srcset); // Responsive srcset
console.log(optimized.alt); // SEO-optimized alt textVideo SEO (NEW v1.1.1)
Optimize video content for search engines with schema markup and sitemaps.
Basic Video Optimization
import { VideoSeo } from "m-seo";
const videoSeo = VideoSeo.optimizeVideo(
{
name: "Product Demo Video",
description: "Learn how to use our amazing product",
thumbnailUrl: "https://example.com/thumb.jpg",
uploadDate: "2024-01-15T10:00:00Z",
duration: "PT5M30S", // ISO 8601: 5 minutes 30 seconds
contentUrl: "https://example.com/video.mp4",
embedUrl: "https://example.com/embed/video",
transcript: "Full video transcript here...",
tags: ["tutorial", "demo", "product"],
category: "Education",
viewCount: 1500,
},
"https://example.com/videos/demo"
);
// Add schema to page
console.log(videoSeo.schemaJson); // JSON-LD script tag
// Add to video sitemap
console.log(videoSeo.sitemapEntry); // XML sitemap entry
// Use embed code
console.log(videoSeo.embedCode); // Optimized iframe
// Check SEO score
console.log("Video SEO Score:", videoSeo.seoScore); // 0-100Video Sitemap Generation
// Generate complete video sitemap
const sitemap = VideoSeo.generateVideoSitemap([
{
name: "Video 1",
description: "First video",
thumbnailUrl: "https://example.com/thumb1.jpg",
uploadDate: "2024-01-01",
duration: "PT3M",
},
{
name: "Video 2",
description: "Second video",
thumbnailUrl: "https://example.com/thumb2.jpg",
uploadDate: "2024-01-02",
duration: "PT5M",
},
]);
fs.writeFileSync("video-sitemap.xml", sitemap);Social Media Previews (NEW v1.1.1)
Generate and validate social media preview cards for all platforms.
Generate Preview
import { SocialPreviewGenerator } from "m-seo";
// Generate Facebook preview
const facebookPreview = SocialPreviewGenerator.generatePreview("facebook", {
og: {
title: "Amazing Blog Post",
description: "Learn about modern web development best practices",
image: "https://example.com/og-image.jpg",
url: "https://example.com/blog/post",
type: "article",
siteName: "My Blog",
locale: "en_US",
},
});
console.log("Title:", facebookPreview.title);
console.log("Is Valid:", facebookPreview.validation.isValid);
console.log("Errors:", facebookPreview.validation.errors);
console.log("Warnings:", facebookPreview.validation.warnings);Validate Social Tags
// Validate Twitter Card
const twitterPreview = SocialPreviewGenerator.generatePreview("twitter", {
twitter: {
card: "summary_large_image",
title: "Amazing Blog Post",
description: "Learn about modern web development",
image: "https://example.com/twitter-card.jpg",
site: "@mysite",
creator: "@author",
},
});
// Check validation
if (!twitterPreview.validation.isValid) {
console.error("Validation errors:", twitterPreview.validation.errors);
console.warn("Warnings:", twitterPreview.validation.warnings);
}Generate All Meta Tags
// Generate complete meta tags for all platforms
const metaTags = SocialPreviewGenerator.generateMetaTags({
og: {
title: "My Page",
description: "Page description",
image: "https://example.com/og.jpg",
url: "https://example.com",
type: "website",
},
twitter: {
card: "summary_large_image",
site: "@mysite",
},
});
// Add to HTML <head>
document.head.innerHTML += metaTags;Multi-Language SDKs
M-SEO provides enterprise-grade SDKs for popular backend frameworks. These SDKs connect to the REST API Server (RestApiServer.ts) for language-agnostic SEO management.
Python SDK (Django/Flask/FastAPI)
# Install
pip install m-seo # (when published to PyPI)
# Django Integration
from mseo import DjangoSeoMiddleware, get_seo_client
from mseo.models import SeoMetadata
# settings.py
MIDDLEWARE = [
'mseo.middleware.DjangoSeoMiddleware',
# ...
]
# views.py
from mseo import get_seo_client
def blog_post(request, slug):
client = get_seo_client()
post = Post.objects.get(slug=slug)
seo = client.create_seo({
'title': post.title,
'description': post.excerpt,
'image': post.featured_image,
'url': request.build_absolute_uri()
})
return render(request, 'blog/post.html', {
'post': post,
'seo_tags': seo.html
})
# Flask Integration
from flask import Flask
from mseo import FlaskSeo
app = Flask(__name__)
seo = FlaskSeo(app)
@app.route('/product/<id>')
def product(id):
product = get_product(id)
return seo.render('product.html',
title=product.name,
description=product.description,
image=product.image
)
# FastAPI Integration
from fastapi import FastAPI, Depends
from mseo import get_seo_client
app = FastAPI()
@app.get("/api/seo/{page}")
async def get_seo(page: str, seo = Depends(get_seo_client)):
tags = seo.create_seo({
'title': f'{page.title()} Page',
'description': f'Description for {page}'
})
return {"html": tags.html, "json_ld": tags.json_ld}Features:
- Django middleware & ORM models
- Flask extension with template integration
- FastAPI dependency injection
- Async/await support
- Celery integration for background SEO tasks
- Django admin panel for SEO management
- Template filters and tags
Location: src/service/SdkLayer/DjangoSdk.py
PHP SDK (Laravel/Lumen)
<?php
// Install
composer require m-seo/sdk // (when published to Packagist)
// Laravel Service Provider auto-discovery
use MSeo\Client;
use MSeo\Facades\Seo;
// routes/web.php
Route::get('/blog/{slug}', function ($slug) {
$post = Post::where('slug', $slug)->first();
$seo = Seo::create([
'title' => $post->title,
'description' => $post->excerpt,
'image' => $post->featured_image,
'url' => url()->current()
]);
return view('blog.post', compact('post', 'seo'));
});
// Blade Template (resources/views/blog/post.blade.php)
<!DOCTYPE html>
<html>
<head>
@seo($seo->html)
</head>
<body>
<h1>{{ $post->title }}</h1>
</body>
</html>
// Advanced: Artisan Command
php artisan seo:generate --cms=wordpress --batch=100Features:
- Laravel Service Provider
- Eloquent models for SEO data
- Blade directives (
@seo,@jsonLd) - Artisan commands
- Middleware for automatic SEO injection
- Queue integration
- Broadcasting events
- Cache integration
Location: src/service/SdkLayer/LaravelSdk.php
Ruby SDK (Rails)
# Gemfile
gem 'm-seo' # (when published to RubyGems)
# app/controllers/posts_controller.rb
class PostsController < ApplicationController
include MSeo::SeoHelper
def show
@post = Post.find(params[:id])
@seo = mseo_client.create_seo(
title: @post.title,
description: @post.excerpt,
image: @post.featured_image_url,
url: post_url(@post)
)
end
end
# app/views/layouts/application.html.erb
<!DOCTYPE html>
<html>
<head>
<%= raw @seo&.html %>
<%= stylesheet_link_tag 'application' %>
</head>
<body>
<%= yield %>
</body>
</html>
# Background Job
class SeoGeneratorJob < ApplicationJob
queue_as :default
def perform(post_id)
post = Post.find(post_id)
seo = MSeo::Client.new.create_seo(
title: post.title,
description: post.excerpt
)
post.update(seo_metadata: seo.to_json)
end
endFeatures:
- Rails Engine integration
- ActiveRecord models and concerns
- ActionController helpers
- View helpers and partials
- ActiveJob integration
- ActionCable support for live SEO updates
- Rake tasks
- Generators for scaffolding
Location: src/service/SdkLayer/RailsSdk.rb
Go SDK
package main
import (
"context"
"fmt"
"log"
"github.com/yourusername/m-seo-go" // (when published)
)
func main() {
// Create client
client, err := mseo.NewClient(mseo.Config{
APIEndpoint: "http://localhost:3000",
Timeout: 30,
})
if err != nil {
log.Fatal(err)
}
// Create SEO tags
ctx := context.Background()
seo, err := client.CreateSEO(ctx, mseo.SEORequest{
Title: "My Go Application",
Description: "Built with Go and M-SEO",
Image: "https://example.com/image.jpg",
URL: "https://example.com",
Keywords: []string{"go", "seo", "performance"},
})
if err != nil {
log.Fatal(err)
}
fmt.Println("HTML Tags:", seo.HTML)
fmt.Println("JSON-LD:", seo.JSONLD)
// Generate sitemap
sitemap, err := client.GenerateSitemap(ctx, []mseo.SitemapURL{
{Loc: "https://example.com", Priority: 1.0},
{Loc: "https://example.com/about", Priority: 0.8},
})
if err != nil {
log.Fatal(err)
}
fmt.Println("Sitemap:", sitemap.XML)
}Features:
- Native Go client (no Node.js required)
- Concurrency support with goroutines
- Context-aware requests
- Struct-based configuration
- Native Go error handling
- HTTP/2 support
Location: src/service/SdkLayer/GoSdk.go
SDK Connection Architecture
All SDKs connect to the M-SEO REST API Server (RestApiServer.ts), which provides language-agnostic HTTP endpoints:
Python/PHP/Ruby/Go App → REST API Server → M-SEO Core Engine → SEO OutputThis allows teams using different tech stacks to share the same SEO infrastructure and configuration.
REST API Server Location: src/service/RestApiServer.ts
Configuration Options
SeoEngine Options
interface SeoConfig {
title: string; // Page title
description: string; // Meta description
keywords?: string[]; // Meta keywords
canonical?: string; // Canonical URL
ogImage?: string; // Open Graph image
ogType?: string; // og:type (default: 'website')
twitterCard?: string; // Twitter card type
author?: string; // Author name
siteName?: string; // Site name
locale?: string; // Language locale (e.g., 'en_US')
themeColor?: string; // Theme color for mobile browsers
robots?: string; // Robots meta tag
viewport?: string; // Viewport meta tag
}Global Defaults
import { SeoEngine } from "m-seo";
// Set global defaults
SeoEngine.setDefaults({
siteName: "My Website",
locale: "en_US",
author: "John Doe",
themeColor: "#3490dc",
});
// All instances will inherit these defaults
const seo = new SeoEngine({
title: "Home",
description: "Welcome",
// siteName, locale, author, themeColor are inherited
});Next Steps
- Explore Examples - See real-world usage patterns
- API Reference - Deep dive into all methods and options
- FAQ - Common questions and troubleshooting
Need help? Check the FAQ or open an issue.