@easy-cms/plugin-nested-docs
v0.24.0
Published
Nested pages for Easy CMS: a parent for each page, breadcrumbs and full paths kept up to date, and a tree in the admin
Maintainers
Readme
@easy-cms/plugin-nested-docs
Nested pages for Easy CMS: a parent for each page, its full path (/about/team) and breadcrumbs kept up to date when a page above it moves, and a tree in the admin. Part of Easy CMS, the embedded, code-first headless CMS for Nuxt and Next.js.
Install
npm install @easy-cms/plugin-nested-docsOr pnpm add, yarn add or bun add.
Usage
import { nestedDocsPlugin } from '@easy-cms/plugin-nested-docs'
export default defineConfig({
// …
plugins: [nestedDocsPlugin({ collections: ['pages'] })],
})import { findByPath, getTree } from '@easy-cms/plugin-nested-docs'
const page = await findByPath(cms, 'pages', '/about/team')
const menu = await getTree(cms, 'pages', { depth: 2 })Links
Nested pages · Documentation (ภาษาไทย) · GitHub
MIT License
