@easy-cms/plugin-seo
v0.24.0
Published
SEO for Easy CMS: meta fields, length meters, a search result preview, generators and page metadata
Downloads
1,916
Maintainers
Readme
@easy-cms/plugin-seo
SEO for Easy CMS: meta fields with length meters, a search preview and Generate buttons in the admin; page metadata, sitemaps, robots.txt, hreflang, JSON-LD and llms.txt for your site. Part of Easy CMS, the embedded, code-first headless CMS for Nuxt and Next.js.
Install
npm install @easy-cms/plugin-seoOr pnpm add, yarn add or bun add.
Usage
import { seoPlugin } from '@easy-cms/plugin-seo'
export default defineConfig({
// …
plugins: [
seoPlugin({
collections: ['posts'],
generateTitle: ({ doc }) => `${doc.title} | My Blog`,
generateDescription: ({ doc }) => doc.excerpt,
}),
],
})import { seoMeta } from '@easy-cms/plugin-seo'
useSeoMeta(seoMeta(post, { url: `/posts/${post.slug}` }).nuxt) // Nuxt
return seoMeta(post, { config, url: `/posts/${post.slug}` }).next // Next.js generateMetadata()Links
SEO · Documentation (ภาษาไทย) · GitHub
MIT License
