Introduction
SEO for Next.js made simple - Type-safe metadata, JSON-LD, and CLI tools
SEOX
SEOX is a powerful yet simple SEO library for Next.js applications. It provides type-safe metadata management, JSON-LD structured data components, and CLI tools for seamless SEO configuration.
Architecture Overview
Features
Type-Safe Metadata
Full TypeScript support with autocomplete for all Next.js metadata fields. Catch errors at build time.
JSON-LD Components
Ready-to-use React components for structured data. Support for Article, Product, Organization, and more.
CLI Tools
Initialize projects with seox init, configure metadata with seox configure, and diagnose issues with seox doctor.
Quick Start
# Install the package
bun add seox
# Initialize your project
bunx seox init
# Configure your metadata
bunx seox configureBasic Usage
import { SEOX } from 'seox/next';
import { config } from '@/seox.config';
export async function generateMetadata() {
return new SEOX(config).metadata({
title: 'My Page',
description: 'Page description',
});
}
export default function Page() {
return <main>Content</main>;
}