Skip to content

Commit

Permalink
feat: bruk nytt slug-felt på komponentsider
Browse files Browse the repository at this point in the history
  • Loading branch information
piofinn committed Jan 31, 2025
1 parent e0035f6 commit ea3f701
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions ny-portal/src/app/(payload)/admin/importMap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions ny-portal/src/collections/ComponentPages/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { CollectionBeforeReadHook, CollectionConfig } from "payload";
import { CollectionConfig } from "payload";
import { CodeExampleField } from "@/fields/code-example";
import { slugField } from "@/fields/slug";

export const ComponentPages: CollectionConfig = {
slug: "component-page",
admin: {
useAsTitle: "title",
},
fields: [
{
name: "slug",
type: "text",
label: "URL-segment",
required: true,
},
...slugField(),
{
name: "title",
type: "text",
Expand Down

0 comments on commit ea3f701

Please sign in to comment.