-
Notifications
You must be signed in to change notification settings - Fork 0
/
payload.config.ts
72 lines (69 loc) · 2.03 KB
/
payload.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { postgresAdapter } from "@payloadcms/db-postgres";
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import path from "path";
import { buildConfig } from "payload";
import { fileURLToPath } from "url";
import sharp from "sharp";
import { Users } from "./collections/Users";
import { Media } from "./collections/Media";
import { Person } from "./collections/Person";
import { Material } from "./collections/Material";
import { SportsTeam } from "./collections/SportsTeam";
import { SpaceData } from "./collections/SpaceData";
import { Sponsor } from "./collections/Sponsor";
import { Association } from "./collections/Association";
import { StudentGuide } from "./collections/StudentGuide";
import { Link } from "./collections/Link";
import { Position } from "./collections/Position";
import { BoardSection } from "./collections/BoardSection";
import { President } from "./collections/President";
import { Event } from "./collections/Event";
import { DocumentFolder } from "./collections/DocumentFolder";
import { DocFile } from "./collections/DocFile";
import { Video } from "./collections/Video";
import { Faq } from "./collections/Faq";
import { Place } from "./collections/Place";
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
export default buildConfig({
admin: {
user: Users.slug,
dateFormat: "dd MMMM yyyy",
},
collections: [
Users,
Media,
Person,
Material,
SportsTeam,
Sponsor,
Association,
StudentGuide,
Link,
Position,
BoardSection,
President,
SpaceData,
Event,
DocumentFolder,
DocFile,
Video,
Faq,
Place
],
editor: lexicalEditor(),
secret: process.env.PAYLOAD_SECRET || "",
typescript: {
outputFile: path.resolve(dirname, "payload-types.ts"),
},
db: postgresAdapter({
pool: {
connectionString: process.env.POSTGRES_URL || "",
},
}),
sharp,
plugins: [
// storage-adapter-placeholder
],
//livePreview: false, // Lets set it to true if we use pages collection (Globals)
});