chore(templates-website): update website template's seed script with content (#7088)

This commit is contained in:
Paul
2024-07-09 16:33:56 -04:00
committed by GitHub
parent 6c99326d59
commit 2db80213b7
18 changed files with 428 additions and 397 deletions

View File

@@ -22,7 +22,11 @@ export async function generateStaticParams() {
overrideAccess: false,
})
return pages.docs?.map(({ slug }) => slug)
return pages.docs
?.filter((doc) => {
return doc.slug !== 'home'
})
.map(({ slug }) => slug)
}
export default async function Page({ params: { slug = 'home' } }) {

View File

@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import { RelatedPosts } from '@/blocks/RelatedPosts'
import { PayloadRedirects } from '@/components/PayloadRedirects'
import configPromise from '@payload-config'
import { getPayloadHMR } from '@payloadcms/next/utilities'
@@ -49,6 +50,11 @@ export default async function Post({ params: { slug = '' } }) {
enableGutter={false}
/>
</div>
<RelatedPosts
className="mt-12"
docs={post.relatedPosts.filter((post) => typeof post !== 'string')}
/>
</div>
</article>
)

View File

@@ -4,13 +4,13 @@ import { cn } from '@/utilities/cn'
import React from 'react'
import RichText from 'src/app/components/RichText'
type Props = BannerBlockProps & {
type Props = {
className?: string
}
} & BannerBlockProps
export const BannerBlock: React.FC<Props> = ({ className, content, style }) => {
return (
<div className={cn('mx-auto w-full', className)}>
<div className={cn('mx-auto my-8 w-full', className)}>
<div
className={cn('border py-3 px-6 flex items-center rounded', {
'border-border bg-card': style === 'info',
@@ -19,12 +19,7 @@ export const BannerBlock: React.FC<Props> = ({ className, content, style }) => {
'border-warning bg-warning/30': style === 'warning',
})}
>
<RichText
className="classes.richText"
content={content}
enableGutter={false}
enableProse={false}
/>
<RichText content={content} enableGutter={false} enableProse={false} />
</div>
</div>
)

View File

@@ -9,9 +9,9 @@ import { CMSLink } from '../../components/Link'
type Props = Extract<Page['layout'][0], { blockType: 'content' }>
export const ContentBlock: React.FC<
Props & {
{
id?: string
}
} & Props
> = (props) => {
const { columns } = props
@@ -38,7 +38,7 @@ export const ContentBlock: React.FC<
key={index}
>
<RichText content={richText} enableGutter={false} />
{enableLink && <CMSLink className="classes.link" {...link} />}
{enableLink && <CMSLink {...link} />}
</div>
)
})}

View File

@@ -31,9 +31,9 @@ export type FormBlockType = {
}
export const FormBlock: React.FC<
FormBlockType & {
{
id?: string
}
} & FormBlockType
> = (props) => {
const {
enableIntro,
@@ -132,7 +132,7 @@ export const FormBlock: React.FC<
<RichText className="mb-8" content={introContent} enableGutter={false} />
)}
{!isLoading && hasSubmitted && confirmationType === 'message' && (
<RichText className="classes.confirmationMessage" content={confirmationMessage} />
<RichText content={confirmationMessage} />
)}
{isLoading && !hasSubmitted && <p>Loading, please wait...</p>}
{error && <div>{`${error.status || '500'}: ${error.message || ''}`}</div>}

View File

@@ -1,3 +1,4 @@
import clsx from 'clsx'
import React from 'react'
import RichText from 'src/app/components/RichText'
@@ -6,36 +7,25 @@ import type { Post } from '../../../payload-types'
import { Card } from '../../components/Card'
export type RelatedPostsProps = {
blockName: string
blockType: 'relatedPosts'
docs?: (Post | string)[]
className?: string
docs?: Post[]
introContent?: any
relationTo: 'posts'
}
export const RelatedPosts: React.FC<RelatedPostsProps> = (props) => {
const { docs, introContent, relationTo } = props
const { className, docs, introContent } = props
return (
<div className="classes.relatedPosts">
<div className={clsx('container', className)}>
{introContent && <RichText content={introContent} enableGutter={false} />}
<div className="classes.grid">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-8">
{docs?.map((doc, index) => {
if (typeof doc === 'string') return null
return (
<div
className={[
'classes.column',
docs.length === 2 && "classes['cols-half']",
docs.length >= 3 && "classes['cols-thirds']",
]
.filter(Boolean)
.join(' ')}
key={index}
>
<Card doc={doc} relationTo={relationTo} showCategories />
<div key={index}>
<Card doc={doc} relationTo="posts" showCategories />
</div>
)
})}

View File

@@ -75,11 +75,7 @@ export const Card: React.FC<{
</h3>
</div>
)}
{description && (
<div className="mt-2">
{description && <p className="classes.description">{sanitizedDescription}</p>}
</div>
)}
{description && <div className="mt-2">{description && <p>{sanitizedDescription}</p>}</div>}
</div>
</article>
)

View File

@@ -14,7 +14,9 @@ export const generateMeta = async (args: { doc: Page | Post }): Promise<Metadata
'url' in doc.meta.image &&
`${process.env.NEXT_PUBLIC_SERVER_URL}${doc.meta.image.url}`
const title = doc?.meta?.title ? doc?.meta?.title + ' | Payload Template' : 'Payload Template'
const title = doc?.meta?.title
? doc?.meta?.title + ' | Payload Website Template'
: 'Payload Website Template'
return {
description: doc?.meta?.description,

View File

@@ -1,3 +1,4 @@
// storage-adapter-import-placeholder
import { mongooseAdapter } from '@payloadcms/db-mongodb' // database-adapter-import
import { payloadCloudPlugin } from '@payloadcms/plugin-cloud'
@@ -6,15 +7,13 @@ import { nestedDocsPlugin } from '@payloadcms/plugin-nested-docs'
import { redirectsPlugin } from '@payloadcms/plugin-redirects'
import { seoPlugin } from '@payloadcms/plugin-seo'
import {
BoldFeature,
FixedToolbarFeature,
HeadingFeature,
LinkFeature,
lexicalEditor,
} from '@payloadcms/richtext-lexical'
ItalicFeature,
LinkFeature , lexicalEditor } from '@payloadcms/richtext-lexical'
import sharp from 'sharp' // editor-import
import { UnderlineFeature } from '@payloadcms/richtext-lexical'
import { ItalicFeature } from '@payloadcms/richtext-lexical'
import { BoldFeature } from '@payloadcms/richtext-lexical'
import dotenv from 'dotenv'
import path from 'path'
import { buildConfig } from 'payload'
@@ -163,7 +162,7 @@ export default buildConfig({
},
},
}),
payloadCloudPlugin(),
payloadCloudPlugin(), // storage-adapter-placeholder
],
secret: process.env.PAYLOAD_SECRET,
sharp,

View File

@@ -5,9 +5,7 @@ const BeforeLogin: React.FC = () => {
<div>
<p>
<b>Welcome to your dashboard!</b>
{' This is where site admins will log in to manage your website. Users will need to '}
<a href={`${process.env.PAYLOAD_PUBLIC_SERVER_URL}/login`}>log in to the site instead</a>
{' to access their user account, comment history, and more.'}
{' This is where site admins will log in to manage your website.'}
</p>
</div>
)

View File

@@ -1,7 +1,6 @@
import type { Form } from '../../payload-types'
export const contactForm: Form = {
id: '63c07ffd4cb6b574b4977573',
export const contactForm: Partial<Form> = {
confirmationMessage: {
root: {
type: 'root',
@@ -36,7 +35,6 @@ export const contactForm: Form = {
createdAt: '2023-01-12T21:47:41.374Z',
emails: [
{
id: '6644edb9cffd2c6c48a44730',
emailFrom: '"Payload" \u003Cdemo@payloadcms.com\u003E',
emailTo: '{{email}}',
message: {
@@ -74,7 +72,6 @@ export const contactForm: Form = {
],
fields: [
{
id: '63c07f4e69853127a889530c',
name: 'full-name',
blockName: 'full-name',
blockType: 'text',
@@ -83,7 +80,6 @@ export const contactForm: Form = {
width: 100,
},
{
id: '63c07f7069853127a889530d',
name: 'email',
blockName: 'email',
blockType: 'email',
@@ -92,7 +88,6 @@ export const contactForm: Form = {
width: 100,
},
{
id: '63c07f8169853127a889530e',
name: 'phone',
blockName: 'phone',
blockType: 'number',
@@ -101,7 +96,6 @@ export const contactForm: Form = {
width: 100,
},
{
id: '63c07f9d69853127a8895310',
name: 'message',
blockName: 'message',
blockType: 'textarea',

View File

@@ -8,7 +8,6 @@ export const contact: Partial<Page> = {
},
layout: [
{
id: '63adc92568224b995af9df13',
blockType: 'formBlock',
enableIntro: true,
form: '{{CONTACT_FORM_ID}}',

View File

@@ -71,7 +71,7 @@ export const home: Partial<Page> = {
},
format: '',
indent: 0,
version: 2,
version: 3,
},
{
type: 'text',
@@ -83,7 +83,7 @@ export const home: Partial<Page> = {
version: 1,
},
{
type: 'autolink',
type: 'link',
children: [
{
type: 'text',
@@ -91,18 +91,28 @@ export const home: Partial<Page> = {
format: 0,
mode: 'normal',
style: '',
text: 'https://github.com/payloadcms/payload/tree/main/templates/website',
text: 'here',
version: 1,
},
],
direction: 'ltr',
fields: {
linkType: 'custom',
url: 'https://github.com/payloadcms/payload/tree/main/templates/website',
newTab: true,
url: 'https://github.com/payloadcms/payload/tree/beta/templates/website',
},
format: '',
indent: 0,
version: 2,
version: 3,
},
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: '. ',
version: 1,
},
],
direction: 'ltr',
@@ -159,11 +169,6 @@ export const home: Partial<Page> = {
},
{
enableLink: false,
link: {
label: '',
reference: null,
url: '',
},
richText: {
root: {
type: 'root',
@@ -249,11 +254,6 @@ export const home: Partial<Page> = {
},
{
enableLink: false,
link: {
label: '',
reference: null,
url: '',
},
richText: {
root: {
type: 'root',
@@ -307,11 +307,6 @@ export const home: Partial<Page> = {
},
{
enableLink: false,
link: {
label: '',
reference: null,
url: '',
},
richText: {
root: {
type: 'root',
@@ -365,11 +360,6 @@ export const home: Partial<Page> = {
},
{
enableLink: false,
link: {
label: '',
reference: null,
url: '',
},
richText: {
root: {
type: 'root',
@@ -455,11 +445,6 @@ export const home: Partial<Page> = {
},
{
enableLink: false,
link: {
label: '',
reference: null,
url: '',
},
richText: {
root: {
type: 'root',

View File

@@ -238,7 +238,7 @@ export const seed = async (payload: Payload): Promise<void> => {
const contactForm = await payload.create({
collection: 'forms',
data: contactFormData,
data: JSON.parse(JSON.stringify(contactFormData)),
})
let contactFormID = contactForm.id

View File

@@ -1,7 +1,7 @@
import type { Post } from '../../payload-types'
export const post1: Partial<Post> = {
slug: 'post-1',
slug: 'digital-horizons',
_status: 'published',
authors: ['{{AUTHOR}}'],
content: {
@@ -9,7 +9,7 @@ export const post1: Partial<Post> = {
type: 'root',
children: [
{
type: 'paragraph',
type: 'heading',
children: [
{
type: 'text',
@@ -17,21 +17,20 @@ export const post1: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: "In the dynamic landscape of website development and content management, a robust CMS (Content Management System) is the cornerstone of a successful digital presence. While several CMS platforms vie for attention, PayloadCMS emerges as a versatile and powerful tool, offering a plethora of features and functionalities that empower developers and content creators alike. Let's delve into the transformative potential of PayloadCMS and how it's reshaping the way we manage and deliver digital content.",
text: 'Dive into the marvels of modern innovation, where the only constant is change. A journey where pixels and data converge to craft the future.',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
tag: 'h2',
version: 1,
},
{
type: 'block',
fields: {
id: '6643854cf1b6f340d1c1f367',
blockName: '',
blockName: 'Disclaimer',
blockType: 'banner',
content: {
root: {
@@ -40,13 +39,54 @@ export const post1: Partial<Post> = {
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 1,
mode: 'normal',
style: '',
text: 'Disclaimer:',
version: 1,
},
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'The Payload config is where you configure everything that Payload does.',
text: ' This content is fabricated and for demonstration purposes only. To edit this post, ',
version: 1,
},
{
type: 'link',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'navigate to the admin dashboard',
version: 1,
},
],
direction: 'ltr',
fields: {
linkType: 'custom',
newTab: true,
url: '/admin',
},
format: '',
indent: 0,
version: 3,
},
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: '.',
version: 1,
},
],
@@ -77,7 +117,7 @@ export const post1: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'Streamlined Content Management',
text: 'The Rise of AI and Machine Learning',
version: 1,
},
],
@@ -96,7 +136,94 @@ export const post1: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'PayloadCMS prioritizes simplicity without compromising on functionality. Its intuitive interface allows users to effortlessly manage content, from creating and editing pages to organizing media assets. With a user-friendly dashboard, content updates become swift and seamless, enabling teams to focus on crafting engaging content rather than grappling with complex technicalities.',
text: 'We find ourselves in a transformative era where artificial intelligence (AI) stands at the forefront of technological evolution. The ripple effects of its advancements are reshaping industries at an unprecedented pace. No longer are businesses bound by the limitations of tedious, manual processes. Instead, sophisticated machines, fueled by vast amounts of historical data, are now capable of making decisions previously left to human intuition. These intelligent systems are not only optimizing operations but also pioneering innovative approaches, heralding a new age of business transformation worldwide. ',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'To demonstrate basic AI functionality, here is a javascript snippet that makes a POST request to a generic AI API in order to generate text based on a prompt. ',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h4',
version: 1,
},
{
type: 'block',
fields: {
blockName: 'Generate Text',
blockType: 'code',
code: "async function generateText(prompt) {\n const apiKey = 'your-api-key';\n const apiUrl = 'https://api.example.com/generate-text';\n\n const response = await fetch(apiUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${apiKey}`\n },\n body: JSON.stringify({\n model: 'text-generation-model',\n prompt: prompt,\n max_tokens: 50\n })\n });\n\n const data = await response.json();\n console.log(data.choices[0].text.trim());\n}\n\n// Example usage\ngenerateText(\"Once upon a time in a faraway land,\");\n",
language: 'javascript',
},
format: '',
version: 2,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'IoT: Connecting the World Around Us',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h2',
version: 1,
},
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "In today's rapidly evolving technological landscape, the Internet of Things (IoT) stands out as a revolutionary force. From transforming our residences with smart home systems to redefining transportation through connected cars, IoT's influence is palpable in nearly every facet of our daily lives.",
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "This technology hinges on the seamless integration of devices and systems, allowing them to communicate and collaborate effortlessly. With each connected device, we move a step closer to a world where convenience and efficiency are embedded in the very fabric of our existence. As a result, we're transitioning into an era where our surroundings intuitively respond to our needs, heralding a smarter and more interconnected global community.",
version: 1,
},
],
@@ -109,7 +236,6 @@ export const post1: Partial<Post> = {
{
type: 'block',
fields: {
id: '664e17c98fe68d721423c1d0',
blockName: '',
blockType: 'mediaBlock',
media: '{{IMAGE_2}}',
@@ -119,24 +245,14 @@ export const post1: Partial<Post> = {
version: 2,
},
{
type: 'heading',
type: 'block',
fields: {
blockName: 'Dynamic Components',
blockType: 'banner',
content: {
root: {
type: 'root',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Flexibility and Customization',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h3',
version: 1,
},
{
type: 'paragraph',
children: [
@@ -146,7 +262,7 @@ export const post1: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: "One of PayloadCMS's standout features is its flexibility and extensibility. Tailored to suit diverse project requirements, it offers customizable schemas that empower developers to define content structures tailored to specific needs. Whether it's a blog, e-commerce site, or a portfolio showcase, PayloadCMS adapts effortlessly, providing a solid foundation for building dynamic, content-rich websites.",
text: "This content above is completely dynamic using custom layout building blocks configured in the CMS. This can be anything you'd like from rich text and images, to highly designed, complex components.",
version: 1,
},
],
@@ -156,75 +272,18 @@ export const post1: Partial<Post> = {
textFormat: 0,
version: 1,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Simple Collection Example',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h3',
version: 1,
},
{
type: 'block',
fields: {
id: '664397d9e0ef87fa1fec2fc0',
blockName: '',
blockType: 'code',
code: "import { CollectionConfig } from 'payload'\n\nexport const Orders: CollectionConfig = {\n slug: 'orders',\n fields: [\n {\n name: 'total',\n type: 'number',\n required: true,\n },\n {\n name: 'placedBy',\n type: 'relationship',\n relationTo: 'customers',\n required: true,\n },\n ],\n}",
language: 'typescript',
},
style: 'info',
},
format: '',
version: 2,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Conclusion',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h2',
version: 1,
},
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "In an era where content is king, a powerful CMS is the linchpin of digital success. PayloadCMS stands out as a formidable contender, offering a potent blend of simplicity, flexibility, and performance. By empowering developers and content creators with intuitive tools and robust features, PayloadCMS is redefining the landscape of content management, enabling organizations to create immersive digital experiences that captivate audiences and drive growth. Whether you're a developer seeking efficiency or a content creator craving creativity, PayloadCMS unlocks a world of possibilities, revolutionizing the way we manage and deliver digital content.",
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
],
direction: 'ltr',
format: '',
@@ -232,11 +291,13 @@ export const post1: Partial<Post> = {
version: 1,
},
},
meta: {
description: 'This is the first post.',
description:
'Dive into the marvels of modern innovation, where the only constant is change. A journey where pixels and data converge to craft the future.',
image: '{{IMAGE_1}}',
title: 'Post 1',
title: 'Digital Horizons: A Glimpse into Tomorrow',
},
relatedPosts: [], // this is populated by the seed script
title: 'Post 1',
title: 'Digital Horizons: A Glimpse into Tomorrow',
}

View File

@@ -1,7 +1,7 @@
import type { Post } from '../../payload-types'
export const post2: Partial<Post> = {
slug: 'post-2',
slug: 'global-gaze',
_status: 'published',
authors: ['{{AUTHOR}}'],
content: {
@@ -9,7 +9,7 @@ export const post2: Partial<Post> = {
type: 'root',
children: [
{
type: 'paragraph',
type: 'heading',
children: [
{
type: 'text',
@@ -17,21 +17,20 @@ export const post2: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: "In the dynamic landscape of website development and content management, a robust CMS (Content Management System) is the cornerstone of a successful digital presence. While several CMS platforms vie for attention, PayloadCMS emerges as a versatile and powerful tool, offering a plethora of features and functionalities that empower developers and content creators alike. Let's delve into the transformative potential of PayloadCMS and how it's reshaping the way we manage and deliver digital content.",
text: 'Explore the untold and overlooked. A magnified view into the corners of the world, where every story deserves its spotlight.',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
tag: 'h2',
version: 1,
},
{
type: 'block',
fields: {
id: '6643854cf1b6f340d1c1f367',
blockName: '',
blockName: 'Disclaimer',
blockType: 'banner',
content: {
root: {
@@ -40,20 +39,52 @@ export const post2: Partial<Post> = {
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 1,
mode: 'normal',
style: '',
text: 'Disclaimer:',
version: 1,
},
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'The Payload config is where you configure everything that Payload does.',
text: ' This content is fabricated and for demonstration purposes only. To edit this post, ',
version: 1,
},
{
type: 'link',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'navigate to the admin dashboard.',
version: 1,
},
],
direction: 'ltr',
fields: {
linkType: 'custom',
newTab: true,
url: '/admin',
},
format: '',
indent: 0,
version: 3,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
textFormat: 1,
version: 1,
},
],
@@ -77,7 +108,7 @@ export const post2: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'Streamlined Content Management',
text: 'The Power of Resilience: Stories of Recovery and Hope',
version: 1,
},
],
@@ -96,7 +127,7 @@ export const post2: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'PayloadCMS prioritizes simplicity without compromising on functionality. Its intuitive interface allows users to effortlessly manage content, from creating and editing pages to organizing media assets. With a user-friendly dashboard, content updates become swift and seamless, enabling teams to focus on crafting engaging content rather than grappling with complex technicalities.',
text: "Throughout history, regions across the globe have faced the devastating impact of natural disasters, the turbulence of political unrest, and the challenging ripples of economic downturns. In these moments of profound crisis, an often-underestimated force emerges: the indomitable resilience of the human spirit. These aren't just tales of mere survival, but stories of communities forging bonds, uniting with a collective purpose, and demonstrating an innate ability to overcome.",
version: 1,
},
],
@@ -109,7 +140,6 @@ export const post2: Partial<Post> = {
{
type: 'block',
fields: {
id: '664e17c98fe68d721423c1d0',
blockName: '',
blockType: 'mediaBlock',
media: '{{IMAGE_2}}',
@@ -118,25 +148,6 @@ export const post2: Partial<Post> = {
format: '',
version: 2,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Flexibility and Customization',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h3',
version: 1,
},
{
type: 'paragraph',
children: [
@@ -146,7 +157,7 @@ export const post2: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: "One of PayloadCMS's standout features is its flexibility and extensibility. Tailored to suit diverse project requirements, it offers customizable schemas that empower developers to define content structures tailored to specific needs. Whether it's a blog, e-commerce site, or a portfolio showcase, PayloadCMS adapts effortlessly, providing a solid foundation for building dynamic, content-rich websites.",
text: 'From neighbors forming makeshift rescue teams during floods to entire cities rallying to rebuild after economic collapse, the essence of humanity is most evident in these acts of solidarity. As we delve into these narratives, we witness the transformative power of community spirit, where adversity becomes a catalyst for growth, unity, and a brighter, rebuilt future.',
version: 1,
},
],
@@ -156,56 +167,15 @@ export const post2: Partial<Post> = {
textFormat: 0,
version: 1,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Simple Collection Example',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h3',
version: 1,
},
{
type: 'block',
fields: {
id: '664397d9e0ef87fa1fec2fc0',
blockName: '',
blockType: 'code',
code: "import { CollectionConfig } from 'payload'\n\nexport const Orders: CollectionConfig = {\n slug: 'orders',\n fields: [\n {\n name: 'total',\n type: 'number',\n required: true,\n },\n {\n name: 'placedBy',\n type: 'relationship',\n relationTo: 'customers',\n required: true,\n },\n ],\n}",
language: 'typescript',
},
format: '',
version: 2,
},
{
type: 'heading',
blockName: 'Dynamic components',
blockType: 'banner',
content: {
root: {
type: 'root',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Conclusion',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h2',
version: 1,
},
{
type: 'paragraph',
children: [
@@ -215,7 +185,7 @@ export const post2: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: "In an era where content is king, a powerful CMS is the linchpin of digital success. PayloadCMS stands out as a formidable contender, offering a potent blend of simplicity, flexibility, and performance. By empowering developers and content creators with intuitive tools and robust features, PayloadCMS is redefining the landscape of content management, enabling organizations to create immersive digital experiences that captivate audiences and drive growth. Whether you're a developer seeking efficiency or a content creator craving creativity, PayloadCMS unlocks a world of possibilities, revolutionizing the way we manage and deliver digital content.",
text: "This content above is completely dynamic using custom layout building blocks configured in the CMS. This can be anything you'd like from rich text and images, to highly designed, complex components.",
version: 1,
},
],
@@ -232,11 +202,24 @@ export const post2: Partial<Post> = {
version: 1,
},
},
style: 'info',
},
format: '',
version: 2,
},
],
direction: 'ltr',
format: '',
indent: 0,
version: 1,
},
},
meta: {
description: 'This is the second post.',
description:
'Explore the untold and overlooked. A magnified view into the corners of the world, where every story deserves its spotlight.',
image: '{{IMAGE_1}}',
title: 'Post 2',
title: 'Global Gaze: Beyond the Headlines',
},
relatedPosts: [], // this is populated by the seed script
title: 'Post 2',
title: 'Global Gaze: Beyond the Headlines',
}

View File

@@ -8,30 +8,10 @@ export const post3: Partial<Post> = {
root: {
type: 'root',
children: [
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "In the dynamic landscape of website development and content management, a robust CMS (Content Management System) is the cornerstone of a successful digital presence. While several CMS platforms vie for attention, PayloadCMS emerges as a versatile and powerful tool, offering a plethora of features and functionalities that empower developers and content creators alike. Let's delve into the transformative potential of PayloadCMS and how it's reshaping the way we manage and deliver digital content.",
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
{
type: 'block',
fields: {
id: '6643854cf1b6f340d1c1f367',
blockName: '',
blockName: 'Disclaimer',
blockType: 'banner',
content: {
root: {
@@ -40,20 +20,52 @@ export const post3: Partial<Post> = {
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 1,
mode: 'normal',
style: '',
text: 'Disclaimer: ',
version: 1,
},
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'The Payload config is where you configure everything that Payload does.',
text: 'This content is fabricated and for demonstration purposes only. To edit this post, ',
version: 1,
},
{
type: 'link',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'navigate to the admin dashboard.',
version: 1,
},
],
direction: 'ltr',
fields: {
linkType: 'custom',
newTab: true,
url: '/admin',
},
format: '',
indent: 0,
version: 3,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
textFormat: 1,
version: 1,
},
],
@@ -77,7 +89,25 @@ export const post3: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'Streamlined Content Management',
text: "Money isn't just currency; ",
version: 1,
},
{
type: 'text',
detail: 0,
format: 2,
mode: 'normal',
style: '',
text: "it's a language. ",
version: 1,
},
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Dive deep into its nuances, where strategy meets intuition in the vast sea of finance.',
version: 1,
},
],
@@ -96,7 +126,7 @@ export const post3: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'PayloadCMS prioritizes simplicity without compromising on functionality. Its intuitive interface allows users to effortlessly manage content, from creating and editing pages to organizing media assets. With a user-friendly dashboard, content updates become swift and seamless, enabling teams to focus on crafting engaging content rather than grappling with complex technicalities.',
text: "Money, in its essence, transcends the mere concept of coins and paper notes; it becomes a profound language that speaks of value, trust, and societal structures. Like any language, it possesses intricate nuances and subtleties that require a discerning understanding. It's in these depths where the calculated world of financial strategy collides with the raw, instinctive nature of human intuition. Just as a seasoned linguist might dissect the syntax and semantics of a sentence, a financial expert navigates the vast and tumultuous ocean of finance, guided not only by logic and data but also by gut feelings and foresight. Every transaction, investment, and financial decision becomes a dialogue in this expansive lexicon of commerce and value.",
version: 1,
},
],
@@ -109,7 +139,6 @@ export const post3: Partial<Post> = {
{
type: 'block',
fields: {
id: '664e17c98fe68d721423c1d0',
blockName: '',
blockType: 'mediaBlock',
media: '{{IMAGE_2}}',
@@ -127,76 +156,7 @@ export const post3: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: 'Flexibility and Customization',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h3',
version: 1,
},
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "One of PayloadCMS's standout features is its flexibility and extensibility. Tailored to suit diverse project requirements, it offers customizable schemas that empower developers to define content structures tailored to specific needs. Whether it's a blog, e-commerce site, or a portfolio showcase, PayloadCMS adapts effortlessly, providing a solid foundation for building dynamic, content-rich websites.",
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Simple Collection Example',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
tag: 'h3',
version: 1,
},
{
type: 'block',
fields: {
id: '664397d9e0ef87fa1fec2fc0',
blockName: '',
blockType: 'code',
code: "import { CollectionConfig } from 'payload'\n\nexport const Orders: CollectionConfig = {\n slug: 'orders',\n fields: [\n {\n name: 'total',\n type: 'number',\n required: true,\n },\n {\n name: 'placedBy',\n type: 'relationship',\n relationTo: 'customers',\n required: true,\n },\n ],\n}",
language: 'typescript',
},
format: '',
version: 2,
},
{
type: 'heading',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: 'Conclusion',
text: 'Stock Market Dynamics: Bulls, Bears, and the Uncertain Middle',
version: 1,
},
],
@@ -215,7 +175,54 @@ export const post3: Partial<Post> = {
format: 0,
mode: 'normal',
style: '',
text: "In an era where content is king, a powerful CMS is the linchpin of digital success. PayloadCMS stands out as a formidable contender, offering a potent blend of simplicity, flexibility, and performance. By empowering developers and content creators with intuitive tools and robust features, PayloadCMS is redefining the landscape of content management, enabling organizations to create immersive digital experiences that captivate audiences and drive growth. Whether you're a developer seeking efficiency or a content creator craving creativity, PayloadCMS unlocks a world of possibilities, revolutionizing the way we manage and deliver digital content.",
text: 'The stock market is a realm of vast opportunity but also poses risks. Discover the forces that drive market trends and the strategies employed by top traders to navigate this complex ecosystem. From market analysis to understanding investor psychology, get a comprehensive insight into the world of stocks.',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "The stock market, often visualized as a bustling arena of numbers and ticker tapes, is as much about human behavior as it is about economics. It's a place where optimism, represented by the bullish rally, meets the caution of bearish downturns, with each vying to dictate the market's direction. But between these two extremes lies an uncertain middle ground, a zone populated by traders and investors who constantly weigh hope against fear. Successful navigation requires more than just financial acumen; it demands an understanding of collective sentiments and the ability to predict not just market movements, but also the reactions of other market participants. In this intricate dance of numbers and nerves, the most astute players are those who master both the hard data and the soft nuances of human behavior.",
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
textFormat: 0,
version: 1,
},
{
type: 'block',
fields: {
blockName: 'Dynamic components',
blockType: 'banner',
content: {
root: {
type: 'root',
children: [
{
type: 'paragraph',
children: [
{
type: 'text',
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: "This content above is completely dynamic using custom layout building blocks configured in the CMS. This can be anything you'd like from rich text and images, to highly designed, complex components.",
version: 1,
},
],
@@ -232,11 +239,23 @@ export const post3: Partial<Post> = {
version: 1,
},
},
style: 'info',
},
format: '',
version: 2,
},
],
direction: 'ltr',
format: '',
indent: 0,
version: 1,
},
},
meta: {
description: 'This is the third post.',
description: `Money isn't just currency; it's a language. Dive deep into its nuances, where strategy meets intuition in the vast sea of finance.`,
image: '{{IMAGE_1}}',
title: 'Post 3',
title: 'Dollar and Sense: The Financial Forecast',
},
relatedPosts: [], // this is populated by the seed script
title: 'Post 3',
title: 'Dollar and Sense: The Financial Forecast',
}