vite-plugin-decap-cms
v0.4.0
Published
Simplify the configuration of Decap cms for Vite projects
Downloads
16
Maintainers
Readme
vite-plugin-decap-cms
A Vite plugin to connect Decap CMS
[!WARNING] This plugin has not reached a stable version, 1.0.0, and can include breaking changes following the semver specification. This plugin is open for contributions, both for code, suggestions and (missing) documentation.
Install
pnpm add vite-plugin-decap-cms -D
npm install vite-plugin-decap-cms -D
yarn add vite-plugin-decap-cms -D
Usage
// vite.config.ts
import { defineConfig } from 'vite'
import decap, {
createFolderCollection,
createField,
} from 'vite-plugin-decap-cms'
export default defineConfig({
publicDir: 'public',
plugins: [
decap({
config: {
backend: {
name: 'test-repo',
},
mediaFolder: '/src/public/',
collections: [
createFolderCollection({
name: 'test',
label: 'Test collection',
folder: 'test',
fields: [
createField('markdown', { name: 'body' }),
],
}),
]
}
})
],
})
For more options and guides, see the documentation
Example
See the documentation CMS for an example
Development
# in /docs/
npm run docs:dev