Add version control to posts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
tobias 2024-05-19 22:15:23 +02:00
parent 200bfcce2a
commit 40d257a0eb

View File

@ -1,6 +1,7 @@
import { CollectionConfig } from "payload/types"; import { CollectionConfig } from "payload/types";
const Posts: CollectionConfig = { const Posts: CollectionConfig = {
slug: "posts", slug: "posts",
versions: true,
admin: { admin: {
defaultColumns: ["title", "author", "status"], defaultColumns: ["title", "author", "status"],
useAsTitle: "title", useAsTitle: "title",
@ -103,6 +104,10 @@ const Posts: CollectionConfig = {
value: "published", value: "published",
label: "Published", label: "Published",
}, },
{
value: "archived",
label: "Archived",
},
], ],
defaultValue: "draft", defaultValue: "draft",
admin: { admin: {