UNPKG

@dijitrak/react-nextjs-seo-plugin

Version:

A modern, user-friendly SEO plugin for React and Next.js with multilingual support and comprehensive optimization tools

76 lines (59 loc) 1.69 kB
# React Next.js SEO Plugin A modern, user-friendly SEO plugin for React and Next.js that simplifies SEO management with advanced multilingual support and comprehensive optimization tools. ## Features - ✅ Meta tag management with social media previews - ✅ JSON-LD structured data support - ✅ Sitemap.xml generation - ✅ Robots.txt configuration - ✅ Multi-language support (hreflang) - ✅ SEO scoring and content analysis - ✅ Admin panel for SEO management - ✅ Next.js App Router & Pages Router support ## Installation ```bash npm install react-nextjs-seo-plugin # or yarn add react-nextjs-seo-plugin ``` ## Quick Start ```jsx import { initSEOPlugin, SEOHead } from 'react-nextjs-seo-plugin'; // Initialize the plugin initSEOPlugin({ apiUrl: '/api/seo', defaultTitle: 'My Website', defaultDescription: 'Welcome to my website' }); // Use in your components function HomePage() { return ( <div> <SEOHead title="Home Page" description="This is my home page" ogImage="/images/home-social.jpg" /> <h1>Welcome to my website</h1> </div> ); } ``` ## Usage with Next.js ```jsx // For Next.js App Router import { Metadata } from 'next'; import { generateNextMetadata } from 'react-nextjs-seo-plugin/next'; export async function generateMetadata(): Promise<Metadata> { return generateNextMetadata({ title: 'My Page', description: 'Page description', openGraph: { images: [{ url: '/images/social.jpg' }] } }); } ``` ## Documentation For full documentation, visit our [GitHub repository](https://github.com/seo-plugin-team/react-nextjs-seo-plugin). ## License MIT © SEO Plugin Team