* feat: integrate payload cms to landing page * feat: add payload configuration and update TypeScript target * fix: update TypeScript paths for payload configuration * refactor: update config import paths to use local payload.config * fix: update quotation marks for testimonials to use HTML entities * fix: include withPayload in Next.js plugins for proper configuration * feat: implement HeroSection global configuration and integrate with Hero component * feat: add FeaturesSection global configuration and integrate with Features component * feat: add revalidate constant to control page revalidation interval * refactor: optimize data fetching by using Promise.all * fix: update revalidation interval to 10 seconds * feat: add CommunitiesSection configuration and integrate with Community component * refactor: move global section functions to services directory * feat: add support for s3 bucket for media * feat: update Community component to use Iconify for icons and adjust CommunitiesSection configuration * feat: replace Link component with Button for improved button styling in Community component * feat: update FeaturesSection to use Iconify icons and adjust icon properties * feat: add heroImage field to HeroSection and implement image formatting utility * feat: add Learning Resources section with dynamic data fetching and UI integration * feat: enhance LearningResourcesSection with primary and secondary button links * refactor: reorganize layout structure by moving Header and Footer components to RootLayout * feat: implement Testimonials section with dynamic data fetching and UI integration * feat: simplify joinTitle rendering in Testimonials section * feat: implement CallToAction section with dynamic data fetching and UI integration * feat: update CallToActionSection label and wrap Discord button in link * feat: update button components to use onClick for external links and improve styling * feat: wrap logo image in a link to navigate to the homepage * fix: supress scss deps warning * fix: add placeholder to .env.example * chore: add environment placeholder variables for CMS configuration in test build workflow * fix: remove unused environment variables from test build workflow * fix: text color (#26) * chore: update action * feat: integrate payload cms to landing page * feat: add payload configuration and update TypeScript target * fix: update TypeScript paths for payload configuration * refactor: update config import paths to use local payload.config * fix: include withPayload in Next.js plugins for proper configuration * feat: implement HeroSection global configuration and integrate with Hero component * feat: add FeaturesSection global configuration and integrate with Features component * feat: add revalidate constant to control page revalidation interval * refactor: optimize data fetching by using Promise.all * fix: update revalidation interval to 10 seconds * feat: add CommunitiesSection configuration and integrate with Community component * refactor: move global section functions to services directory * feat: add support for s3 bucket for media * feat: update Community component to use Iconify for icons and adjust CommunitiesSection configuration * feat: replace Link component with Button for improved button styling in Community component * feat: update FeaturesSection to use Iconify icons and adjust icon properties * feat: add heroImage field to HeroSection and implement image formatting utility * feat: add Learning Resources section with dynamic data fetching and UI integration * feat: enhance LearningResourcesSection with primary and secondary button links * refactor: reorganize layout structure by moving Header and Footer components to RootLayout * feat: implement Testimonials section with dynamic data fetching and UI integration * feat: simplify joinTitle rendering in Testimonials section * feat: implement CallToAction section with dynamic data fetching and UI integration * feat: update CallToActionSection label and wrap Discord button in link * feat: update button components to use onClick for external links and improve styling * feat: wrap logo image in a link to navigate to the homepage * fix: supress scss deps warning * fix: add placeholder to .env.example * chore: add environment placeholder variables for CMS configuration in test build workflow * fix: remove unused environment variables from test build workflow * fix: remove mistakenly added env from test-build workflow --------- Co-authored-by: Fahim Ardani <fahimardani25@gmail.com> Co-authored-by: Maulana Sodiqin <53475078+maulanasdqn@users.noreply.github.com>
79 lines
2.2 KiB
TypeScript
79 lines
2.2 KiB
TypeScript
import { postgresAdapter } from '@payloadcms/db-postgres';
|
|
import { lexicalEditor } from '@payloadcms/richtext-lexical';
|
|
import { s3Storage } from '@payloadcms/storage-s3';
|
|
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
|
import https from 'https';
|
|
import path from 'path';
|
|
import { buildConfig } from 'payload';
|
|
import sharp from 'sharp';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
import { CallToActionSection } from './collections/CallToActionSection';
|
|
import { CommunitiesSection } from './collections/CommunitiesSection';
|
|
import { FeaturesSection } from './collections/FeaturesSection';
|
|
import { HeroSection } from './collections/HeroSection';
|
|
import { LearningResourcesSection } from './collections/LearningResourcesSection';
|
|
import { Media } from './collections/Media';
|
|
import { TestimonialsSection } from './collections/TestimonialsSection';
|
|
import { Users } from './collections/Users';
|
|
|
|
const filename = fileURLToPath(import.meta.url);
|
|
const dirname = path.dirname(filename);
|
|
|
|
export default buildConfig({
|
|
admin: {
|
|
user: Users.slug,
|
|
importMap: {
|
|
importMapFile: path.resolve(
|
|
__dirname,
|
|
'app',
|
|
'(payload)',
|
|
'admin',
|
|
'importMap.js'
|
|
),
|
|
},
|
|
},
|
|
collections: [Users, Media],
|
|
globals: [
|
|
HeroSection,
|
|
FeaturesSection,
|
|
CommunitiesSection,
|
|
LearningResourcesSection,
|
|
TestimonialsSection,
|
|
CallToActionSection,
|
|
],
|
|
editor: lexicalEditor(),
|
|
secret: process.env.CMS_SECRET || '',
|
|
typescript: {
|
|
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
|
},
|
|
db: postgresAdapter({
|
|
pool: {
|
|
connectionString: process.env.CMS_POSTGRES_URL || '',
|
|
},
|
|
}),
|
|
sharp,
|
|
plugins: [
|
|
s3Storage({
|
|
collections: {
|
|
media: {
|
|
disableLocalStorage: true,
|
|
},
|
|
},
|
|
bucket: 'landing-cms',
|
|
config: {
|
|
endpoint: process.env.CMS_STORAGE_ENDPOINT,
|
|
credentials: {
|
|
accessKeyId: process.env.CMS_STORAGE_ACCESS_KEY_ID!,
|
|
secretAccessKey: process.env.CMS_STORAGE_SECRET_ACCESS_KEY!,
|
|
},
|
|
region: process.env.CMS_STORAGE_REGION!,
|
|
forcePathStyle: true,
|
|
requestHandler: new NodeHttpHandler({
|
|
httpsAgent: new https.Agent({ rejectUnauthorized: false }),
|
|
}),
|
|
},
|
|
}),
|
|
],
|
|
});
|