Choose a backend
The backend keeps the content, the users, and the sign-in. Choose it when you create the project. The admin is the same with each backend.
- The Git CMS. It is in
@plutocms/core. It needs no database. - A backend layer. It gives Pluto a database and sign-in. Today, the backend layer is
@plutocms/supabase.
The Git CMS
@plutocms/core can run on its own. It needs no database and no other layer.
- Posts are Markdown files in a Git repository.
- Editors write them in the Pluto admin.
- Each save is a commit. In development, it is a commit in your local repository, with no GitHub step. A deployed site commits to GitHub.
- The deployed site reads the posts from GitHub at run time, with a cache. A save publishes in seconds, with no new build.
- Users with push access to the repository are editors. They sign in with a GitHub App.
The Git CMS is on by default (plutoGithub.enabled: 'auto') when no backend layer is present. It stays off next to a backend layer.
Use it for a Markdown blog or a documentation site. See Git CMS.
A backend layer
A backend layer gives Pluto a database and sign-in.
- Roles and capabilities live in the database.
- Admins invite users and edit roles in the admin.
- Feature layers add a shop, a blog, and a media library.
Use a backend layer for a shop, or for a site with many users and roles.
@plutocms/supabase is the backend layer today. Supabase provides the Postgres database, the auth, and the storage. See Supabase.
Compare the backends
| Git CMS | Supabase layer | |
|---|---|---|
| Database | None | Postgres |
| Content storage | Markdown files in Git (local Git in development, GitHub when deployed) | Database tables |
| Sign-in | GitHub App | Email and password |
| Who can edit | Users with push access to the repository | Users with a role |
| Template | -t blog --backend git, -t admin --backend git | -t blog --backend supabase, -t shop, -t admin --backend supabase |
| Drafts | status: draft in the frontmatter | A status column |
'auto' keeps the Git CMS off and logs nothing. If you set plutoGithub.enabled: true with a backend layer, the module logs an error and stays off.Use Pluto in an existing Nuxt project
You do not need a template. Use the top layer that you need. It brings the layers below it.
First, install the package of the layer. extends does not install an npm package. For the Git CMS, the layer is @plutocms/core:
npm install @plutocms/corepnpm add @plutocms/coreyarn add @plutocms/corebun add @plutocms/coredeno add npm:@plutocms/coreThen extend it in nuxt.config.ts:
export default defineNuxtConfig({
// With a backend layer, use it (for example '@plutocms/supabase') or a
// feature layer on it (for example '@plutocms/supabase-shop').
extends: ['@plutocms/core']
})
Do not list the layers below the top layer. For example, @plutocms/supabase-shop already extends @plutocms/supabase, which extends @plutocms/core. The package.json of your app needs only the top layer, plus nuxt, vue, and vue-router. See Layers.
Your app also needs one CSS entry with the Pluto imports. See Styles.