Getting started
You can easily install Imput from npm:
npm install imput-cms
You can then use it in your Next.js app by creating a new page:
my-nextjs-app/
├─ app/
│ ├─ admin/
│ │ ├─ [[...imput]]
│ │ │ ├─ page.jsx or page.tsx
Create a folder inside your app
directory (admin
in our case), then add a catch-all route within it [[...imput]]
finally add a page.tsx
or page.jsx
.
💡
At the moment Imput only supports the app
directory because of the way Next.js handles css imports.
Then you just need to import the main Imput component to render your new CMS:
'use client'
import dynamic from 'next/dynamic'
const ImputCMS = dynamic(() => import('imput-cms'), {
ssr: false,
})
const CMS = () => (
<ImputCMS
{...{
// your settings will go here!
}}
/>
)
export default CMS
💡
Note: We use Next's dynamic import so Imput isn't added to the page's bundle. This also ensures Imput is only rendered client-side.