kofi-stack-template-generator 2.1.37 → 2.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +6 -6
- package/dist/index.js +8057 -440
- package/package.json +1 -1
- package/src/templates.generated.ts +248 -94
- package/templates/integrations/posthog/src/components/providers/posthog-provider.tsx.hbs +4 -1
- package/templates/marketing/payload/package.json.hbs +41 -26
- package/templates/marketing/payload/src/Footer/Component.client.tsx +288 -0
- package/templates/marketing/payload/src/Footer/Component.tsx +11 -0
- package/templates/marketing/payload/src/Footer/RowLabel.tsx +15 -0
- package/templates/marketing/payload/src/Footer/config.ts +178 -0
- package/templates/marketing/payload/src/Footer/hooks/{revalidateFooter.ts.hbs → revalidateFooter.ts} +5 -5
- package/templates/marketing/payload/src/Header/Component.client.tsx +94 -0
- package/templates/marketing/payload/src/Header/Component.tsx +10 -0
- package/templates/marketing/payload/src/Header/MegaMenu/index.tsx +197 -0
- package/templates/marketing/payload/src/Header/MobileMenu/HamburgerIcon.tsx +48 -0
- package/templates/marketing/payload/src/Header/MobileMenu/index.tsx +299 -0
- package/templates/marketing/payload/src/Header/Nav/index.tsx +76 -0
- package/templates/marketing/payload/src/Header/RowLabel.tsx +21 -0
- package/templates/marketing/payload/src/Header/config.ts +208 -0
- package/templates/marketing/payload/src/Header/hooks/{revalidateHeader.ts.hbs → revalidateHeader.ts} +5 -5
- package/templates/marketing/payload/src/access/{authenticated.ts.hbs → authenticated.ts} +1 -1
- package/templates/marketing/payload/src/access/{authenticatedOrPublished.ts.hbs → authenticatedOrPublished.ts} +8 -8
- package/templates/marketing/payload/src/app/(docs)/docs/[[...slug]]/page.tsx +117 -0
- package/templates/marketing/payload/src/app/(docs)/docs/layout.tsx +39 -0
- package/templates/marketing/payload/src/app/(docs)/layout.tsx +44 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/pages-sitemap.xml/route.ts +68 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/posts-sitemap.xml/route.ts +55 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/api/docs-search/route.ts +67 -0
- package/templates/marketing/payload/src/app/(frontend)/api/newsletter/route.ts +260 -0
- package/templates/marketing/payload/src/app/(frontend)/api/pricing/route.ts +266 -0
- package/templates/marketing/payload/src/app/(frontend)/globals.css +1019 -0
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/next/exit-preview/route.ts +7 -0
- package/templates/marketing/payload/src/app/(frontend)/next/preview/route.ts +56 -0
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts +31 -0
- package/templates/marketing/payload/src/app/(frontend)/not-found.tsx +17 -0
- package/templates/marketing/payload/src/app/(frontend)/page.tsx +5 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/BlogPageClient.tsx +190 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/BlogPostContent.tsx +67 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.tsx +118 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page.tsx +49 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js +83 -0
- package/templates/marketing/payload/src/app/(payload)/api/[...slug]/{route.ts.hbs → route.ts} +13 -9
- package/templates/marketing/payload/src/app/(payload)/api/graphql/{route.ts.hbs → route.ts} +2 -2
- package/templates/marketing/payload/src/app/(payload)/api/graphql-playground/{route.ts.hbs → route.ts} +3 -3
- package/templates/marketing/payload/src/app/(payload)/custom.scss +0 -0
- package/templates/marketing/payload/src/app/(payload)/layout.tsx +31 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/config.ts +120 -0
- package/templates/marketing/payload/src/blocks/Banner/Component.tsx +26 -0
- package/templates/marketing/payload/src/blocks/Banner/config.ts +67 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/Component.tsx +243 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/config.ts +147 -0
- package/templates/marketing/payload/src/blocks/CallToAction/Component.tsx +31 -0
- package/templates/marketing/payload/src/blocks/CallToAction/config.ts +68 -0
- package/templates/marketing/payload/src/blocks/Code/Component.client.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/Component.tsx +21 -0
- package/templates/marketing/payload/src/blocks/Code/CopyButton.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/config.ts +33 -0
- package/templates/marketing/payload/src/blocks/Content/Component.tsx +41 -0
- package/templates/marketing/payload/src/blocks/Content/config.ts +105 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/Component.tsx +90 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/config.ts +75 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/Component.tsx +108 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/config.ts +109 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/config.ts +111 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/Component.tsx +117 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/config.ts +50 -0
- package/templates/marketing/payload/src/blocks/Form/Checkbox/index.tsx +45 -0
- package/templates/marketing/payload/src/blocks/Form/Component.tsx +170 -0
- package/templates/marketing/payload/src/blocks/Form/Country/index.tsx +65 -0
- package/templates/marketing/payload/src/blocks/Form/Country/options.ts +982 -0
- package/templates/marketing/payload/src/blocks/Form/Email/index.tsx +38 -0
- package/templates/marketing/payload/src/blocks/Form/Error/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Message/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Number/index.tsx +36 -0
- package/templates/marketing/payload/src/blocks/Form/Select/index.tsx +63 -0
- package/templates/marketing/payload/src/blocks/Form/State/index.tsx +64 -0
- package/templates/marketing/payload/src/blocks/Form/State/options.ts +52 -0
- package/templates/marketing/payload/src/blocks/Form/Text/index.tsx +32 -0
- package/templates/marketing/payload/src/blocks/Form/Textarea/index.tsx +40 -0
- package/templates/marketing/payload/src/blocks/Form/Width/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/Form/fields.tsx +21 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/Component.tsx +59 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/config.ts +88 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/Component.tsx +132 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/Component.tsx +95 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/config.ts +48 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/Component.tsx +67 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/config.ts +14 -0
- package/templates/marketing/payload/src/blocks/Personas/Component.tsx +69 -0
- package/templates/marketing/payload/src/blocks/Personas/config.ts +96 -0
- package/templates/marketing/payload/src/blocks/PricingTable/ComparisonTable.tsx +250 -0
- package/templates/marketing/payload/src/blocks/PricingTable/Component.tsx +443 -0
- package/templates/marketing/payload/src/blocks/PricingTable/config.ts +142 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/config.ts +42 -0
- package/templates/marketing/payload/src/blocks/RelatedPosts/Component.tsx +32 -0
- package/templates/marketing/payload/src/blocks/RenderBlocks.tsx +92 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/config.ts +76 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/Component.tsx +83 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/config.ts +70 -0
- package/templates/marketing/payload/src/collections/Categories.ts +28 -0
- package/templates/marketing/payload/src/collections/FAQs/index.ts +100 -0
- package/templates/marketing/payload/src/collections/Media.ts +160 -0
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts +43 -0
- package/templates/marketing/payload/src/collections/Pages/index.ts +168 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts +41 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts +44 -0
- package/templates/marketing/payload/src/collections/Posts/index.ts +259 -0
- package/templates/marketing/payload/src/collections/Users/index.ts +26 -0
- package/templates/marketing/payload/src/components/AdminBar/index.scss +7 -0
- package/templates/marketing/payload/src/components/AdminBar/index.tsx +89 -0
- package/templates/marketing/payload/src/components/Analytics/CTATracker.tsx +33 -0
- package/templates/marketing/payload/src/components/Analytics/FeatureSectionTracker.tsx +47 -0
- package/templates/marketing/payload/src/components/Analytics/PricingViewTracker.tsx +46 -0
- package/templates/marketing/payload/src/components/Analytics/index.tsx +3 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx +89 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx +69 -0
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx +14 -0
- package/templates/marketing/payload/src/components/BlogCTA/index.tsx +77 -0
- package/templates/marketing/payload/src/components/Card/index.tsx +85 -0
- package/templates/marketing/payload/src/components/CollectionArchive/index.tsx +32 -0
- package/templates/marketing/payload/src/components/JsonLd/index.tsx +138 -0
- package/templates/marketing/payload/src/components/Link/index.tsx +66 -0
- package/templates/marketing/payload/src/components/LivePreviewListener/index.tsx +10 -0
- package/templates/marketing/payload/src/components/Logo/Logo.tsx +46 -0
- package/templates/marketing/payload/src/components/Media/ImageMedia/index.tsx +80 -0
- package/templates/marketing/payload/src/components/Media/VideoMedia/index.tsx +47 -0
- package/templates/marketing/payload/src/components/Media/index.tsx +26 -0
- package/templates/marketing/payload/src/components/Media/types.ts +22 -0
- package/templates/marketing/payload/src/components/PageRange/index.tsx +57 -0
- package/templates/marketing/payload/src/components/Pagination/index.tsx +101 -0
- package/templates/marketing/payload/src/components/PayloadRedirects/index.tsx +48 -0
- package/templates/marketing/payload/src/components/RichText/index.tsx +152 -0
- package/templates/marketing/payload/src/components/TableOfContents/index.tsx +128 -0
- package/templates/marketing/payload/src/components/ui/accordion.tsx +64 -0
- package/templates/marketing/payload/src/components/ui/button.tsx +52 -0
- package/templates/marketing/payload/src/components/ui/card.tsx +48 -0
- package/templates/marketing/payload/src/components/ui/checkbox.tsx +27 -0
- package/templates/marketing/payload/src/components/ui/input.tsx +22 -0
- package/templates/marketing/payload/src/components/ui/label.tsx +19 -0
- package/templates/marketing/payload/src/components/ui/pagination.tsx +92 -0
- package/templates/marketing/payload/src/components/ui/select.tsx +144 -0
- package/templates/marketing/payload/src/components/ui/textarea.tsx +21 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-form.ts +111 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-page.ts +56 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/about.ts +281 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/faqs.ts +224 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/automation.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/custom-fields.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/dashboard.ts +228 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/index.ts +6 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/monetization.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/seo.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/templates.ts +218 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/home.ts +555 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/index.ts +767 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/posts.ts +623 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/pricing.ts +251 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/privacy.ts +457 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/richtext-helper.ts +88 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/terms.ts +478 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/b2b-vendor-hubs.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/communities.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/index.ts +4 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/local-services.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/marketplaces.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/home-static.ts +691 -0
- package/templates/marketing/payload/src/endpoints/seed/home.ts +675 -0
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-3.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero-1.ts +5 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post2.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post3.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/index.ts +335 -0
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts +315 -0
- package/templates/marketing/payload/src/endpoints/seed/post-2.ts +232 -0
- package/templates/marketing/payload/src/endpoints/seed/post-3.ts +268 -0
- package/templates/marketing/payload/src/fields/defaultLexical.ts +73 -0
- package/templates/marketing/payload/src/fields/link.ts +139 -0
- package/templates/marketing/payload/src/fields/linkGroup.ts +28 -0
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx +56 -0
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx +48 -0
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx +50 -0
- package/templates/marketing/payload/src/heros/PostHero/index.tsx +73 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/AnimatedMockup.tsx +241 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx +108 -0
- package/templates/marketing/payload/src/heros/{RenderHero.tsx.hbs → RenderHero.tsx} +9 -9
- package/templates/marketing/payload/src/heros/config.ts +121 -0
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts +15 -0
- package/templates/marketing/payload/src/hooks/{revalidateRedirects.ts.hbs → revalidateRedirects.ts} +3 -3
- package/templates/marketing/payload/src/lib/convex.ts +13 -0
- package/templates/marketing/payload/src/lib/docs-source.ts +138 -0
- package/templates/marketing/payload/src/lib/mdx.tsx +191 -0
- package/templates/marketing/payload/src/payload.config.ts.hbs +95 -145
- package/templates/marketing/payload/src/plugins/index.ts +107 -0
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx +34 -0
- package/templates/marketing/payload/src/providers/PostHogProvider.tsx +33 -0
- package/templates/marketing/payload/src/providers/Theme/InitTheme/{index.tsx.hbs → index.tsx} +11 -10
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/index.tsx +133 -0
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/types.ts +7 -0
- package/templates/marketing/payload/src/providers/Theme/index.tsx +60 -0
- package/templates/marketing/payload/src/providers/Theme/shared.ts +17 -0
- package/templates/marketing/payload/src/providers/Theme/{types.ts.hbs → types.ts} +3 -3
- package/templates/marketing/payload/src/providers/index.tsx +17 -0
- package/templates/marketing/payload/src/search/Component.tsx +42 -0
- package/templates/marketing/payload/src/search/beforeSync.ts +56 -0
- package/templates/marketing/payload/src/search/fieldOverrides.ts +61 -0
- package/templates/marketing/payload/src/utilities/deepMerge.ts +35 -0
- package/templates/marketing/payload/src/utilities/extractHeadings.ts +78 -0
- package/templates/marketing/payload/src/utilities/formatAuthors.ts +24 -0
- package/templates/marketing/payload/src/utilities/formatDateTime.ts +20 -0
- package/templates/marketing/payload/src/utilities/generateMeta.ts +93 -0
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts +33 -0
- package/templates/marketing/payload/src/utilities/getDocument.ts +32 -0
- package/templates/marketing/payload/src/utilities/getGlobals.ts +26 -0
- package/templates/marketing/payload/src/utilities/getMeUser.ts +43 -0
- package/templates/marketing/payload/src/utilities/getMediaUrl.ts +24 -0
- package/templates/marketing/payload/src/utilities/getRedirects.ts +26 -0
- package/templates/marketing/payload/src/utilities/getURL.ts +26 -0
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts +26 -0
- package/templates/marketing/payload/src/utilities/toKebabCase.ts +5 -0
- package/templates/marketing/payload/src/utilities/ui.ts +12 -0
- package/templates/marketing/payload/src/utilities/useClickableCard.ts +108 -0
- package/templates/marketing/payload/src/utilities/useDebounce.ts +17 -0
- package/templates/packages/ui/src/components/button.tsx.hbs +53 -0
- package/templates/packages/ui/src/components/card.tsx.hbs +76 -0
- package/templates/packages/ui/src/components/separator.tsx.hbs +26 -0
- package/templates/marketing/payload/src/Footer/config.ts.hbs +0 -178
- package/templates/marketing/payload/src/Footer/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/Header/RowLabel.tsx.hbs +0 -21
- package/templates/marketing/payload/src/Header/config.ts.hbs +0 -208
- package/templates/marketing/payload/src/Header/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/access/index.ts.hbs +0 -3
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx.hbs +0 -19
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts.hbs +0 -31
- package/templates/marketing/payload/src/app/(frontend)/page.tsx.hbs +0 -83
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/custom.scss.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/layout.tsx.hbs +0 -31
- package/templates/marketing/payload/src/app/globals.css.hbs +0 -83
- package/templates/marketing/payload/src/app/layout.tsx.hbs +0 -10
- package/templates/marketing/payload/src/blocks/Benefits.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/CTA.ts.hbs +0 -39
- package/templates/marketing/payload/src/blocks/Content.ts.hbs +0 -9
- package/templates/marketing/payload/src/blocks/FAQ.ts.hbs +0 -18
- package/templates/marketing/payload/src/blocks/Features.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/Hero.ts.hbs +0 -40
- package/templates/marketing/payload/src/blocks/LogoBanner.ts.hbs +0 -17
- package/templates/marketing/payload/src/blocks/Pricing.ts.hbs +0 -37
- package/templates/marketing/payload/src/blocks/Testimonials.ts.hbs +0 -21
- package/templates/marketing/payload/src/blocks/index.ts.hbs +0 -9
- package/templates/marketing/payload/src/collections/Categories/index.ts.hbs +0 -28
- package/templates/marketing/payload/src/collections/FAQs/index.ts.hbs +0 -100
- package/templates/marketing/payload/src/collections/Media.ts.hbs +0 -164
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts.hbs +0 -43
- package/templates/marketing/payload/src/collections/Pages/index.ts.hbs +0 -142
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts.hbs +0 -41
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts.hbs +0 -44
- package/templates/marketing/payload/src/collections/Posts/index.ts.hbs +0 -244
- package/templates/marketing/payload/src/collections/Users/index.ts.hbs +0 -26
- package/templates/marketing/payload/src/collections/index.ts.hbs +0 -6
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx.hbs +0 -89
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx.hbs +0 -69
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx.hbs +0 -14
- package/templates/marketing/payload/src/components/Link/index.tsx.hbs +0 -79
- package/templates/marketing/payload/src/components/Media/index.tsx.hbs +0 -67
- package/templates/marketing/payload/src/components/RichText/index.tsx.hbs +0 -44
- package/templates/marketing/payload/src/endpoints/seed/home.ts.hbs +0 -76
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-hero.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/index.ts.hbs +0 -235
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts.hbs +0 -252
- package/templates/marketing/payload/src/fields/defaultLexical.ts.hbs +0 -73
- package/templates/marketing/payload/src/fields/link.ts.hbs +0 -139
- package/templates/marketing/payload/src/fields/linkGroup.ts.hbs +0 -28
- package/templates/marketing/payload/src/globals/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx.hbs +0 -53
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx.hbs +0 -48
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx.hbs +0 -46
- package/templates/marketing/payload/src/heros/PostHero/index.tsx.hbs +0 -68
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx.hbs +0 -88
- package/templates/marketing/payload/src/heros/config.ts.hbs +0 -112
- package/templates/marketing/payload/src/heros/index.ts.hbs +0 -7
- package/templates/marketing/payload/src/hooks/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts.hbs +0 -15
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx.hbs +0 -34
- package/templates/marketing/payload/src/providers/Theme/index.tsx.hbs +0 -60
- package/templates/marketing/payload/src/providers/Theme/shared.ts.hbs +0 -17
- package/templates/marketing/payload/src/providers/index.tsx.hbs +0 -18
- package/templates/marketing/payload/src/utilities/deepMerge.ts.hbs +0 -35
- package/templates/marketing/payload/src/utilities/formatAuthors.ts.hbs +0 -24
- package/templates/marketing/payload/src/utilities/formatDateTime.ts.hbs +0 -13
- package/templates/marketing/payload/src/utilities/generateMeta.ts.hbs +0 -87
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts.hbs +0 -33
- package/templates/marketing/payload/src/utilities/getURL.ts.hbs +0 -26
- package/templates/marketing/payload/src/utilities/index.ts.hbs +0 -8
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts.hbs +0 -26
- /package/templates/marketing/payload/src/access/{anyone.ts.hbs → anyone.ts} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/fields/{index.ts.hbs → index.ts} +0 -0
- /package/templates/marketing/payload/src/utilities/{canUseDOM.ts.hbs → canUseDOM.ts} +0 -0
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
import * as fs from "node:fs"
|
|
2
|
+
import * as path from "node:path"
|
|
3
|
+
import type { CollectionSlug, File, Payload, PayloadRequest } from "payload"
|
|
4
|
+
|
|
5
|
+
import { directoryHubAbout } from "./about"
|
|
6
|
+
import { faqData } from "./faqs"
|
|
7
|
+
import {
|
|
8
|
+
automationPage,
|
|
9
|
+
customFieldsPage,
|
|
10
|
+
dashboardPage,
|
|
11
|
+
monetizationPage,
|
|
12
|
+
seoPage,
|
|
13
|
+
templatesPage,
|
|
14
|
+
} from "./features"
|
|
15
|
+
import { directoryHubHome } from "./home"
|
|
16
|
+
import { blogPosts } from "./posts"
|
|
17
|
+
import { directoryHubPricing } from "./pricing"
|
|
18
|
+
import { directoryHubPrivacy } from "./privacy"
|
|
19
|
+
import { directoryHubTerms } from "./terms"
|
|
20
|
+
import {
|
|
21
|
+
b2bVendorHubsPage,
|
|
22
|
+
communitiesPage,
|
|
23
|
+
localServicesPage,
|
|
24
|
+
marketplacesPage,
|
|
25
|
+
} from "./use-cases"
|
|
26
|
+
|
|
27
|
+
const collections: CollectionSlug[] = [
|
|
28
|
+
"categories",
|
|
29
|
+
"media",
|
|
30
|
+
"pages",
|
|
31
|
+
"posts",
|
|
32
|
+
"forms",
|
|
33
|
+
"form-submissions",
|
|
34
|
+
"search",
|
|
35
|
+
"faqs",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
const categories = [
|
|
39
|
+
{ title: "Business", slug: "business" },
|
|
40
|
+
{ title: "Technology", slug: "technology" },
|
|
41
|
+
{ title: "News", slug: "news" },
|
|
42
|
+
{ title: "Guides", slug: "guides" },
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
// Contact form configuration for DirectoryHub
|
|
46
|
+
const contactFormData = {
|
|
47
|
+
title: "Contact Form",
|
|
48
|
+
confirmationMessage: {
|
|
49
|
+
root: {
|
|
50
|
+
type: "root",
|
|
51
|
+
children: [
|
|
52
|
+
{
|
|
53
|
+
type: "paragraph",
|
|
54
|
+
children: [
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
detail: 0,
|
|
58
|
+
format: 0,
|
|
59
|
+
mode: "normal",
|
|
60
|
+
style: "",
|
|
61
|
+
text: "Thanks for reaching out! We'll get back to you within 24 hours.",
|
|
62
|
+
version: 1,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
direction: "ltr" as const,
|
|
66
|
+
format: "" as const,
|
|
67
|
+
indent: 0,
|
|
68
|
+
textFormat: 0,
|
|
69
|
+
version: 1,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
direction: "ltr" as const,
|
|
73
|
+
format: "" as const,
|
|
74
|
+
indent: 0,
|
|
75
|
+
version: 1,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
confirmationType: "message" as const,
|
|
79
|
+
fields: [
|
|
80
|
+
{
|
|
81
|
+
name: "name",
|
|
82
|
+
label: "Name",
|
|
83
|
+
required: true,
|
|
84
|
+
blockType: "text" as const,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "email",
|
|
88
|
+
label: "Email",
|
|
89
|
+
required: true,
|
|
90
|
+
blockType: "email" as const,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "subject",
|
|
94
|
+
label: "Subject",
|
|
95
|
+
required: false,
|
|
96
|
+
blockType: "text" as const,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "message",
|
|
100
|
+
label: "Message",
|
|
101
|
+
required: true,
|
|
102
|
+
blockType: "textarea" as const,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
submitButtonLabel: "Send Message",
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const seedDirectoryHub = async ({
|
|
109
|
+
payload,
|
|
110
|
+
req,
|
|
111
|
+
}: {
|
|
112
|
+
payload: Payload
|
|
113
|
+
req: PayloadRequest
|
|
114
|
+
}): Promise<void> => {
|
|
115
|
+
payload.logger.info("Seeding DirectoryHub database...")
|
|
116
|
+
|
|
117
|
+
// Clear collections and globals
|
|
118
|
+
payload.logger.info("— Clearing collections and globals...")
|
|
119
|
+
|
|
120
|
+
// Clear header
|
|
121
|
+
await payload.updateGlobal({
|
|
122
|
+
slug: "header",
|
|
123
|
+
data: {
|
|
124
|
+
navItems: [],
|
|
125
|
+
},
|
|
126
|
+
depth: 0,
|
|
127
|
+
context: {
|
|
128
|
+
disableRevalidate: true,
|
|
129
|
+
},
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
// Clear footer with new structure
|
|
133
|
+
await payload.updateGlobal({
|
|
134
|
+
slug: "footer",
|
|
135
|
+
data: {
|
|
136
|
+
columns: [],
|
|
137
|
+
socialLinks: {},
|
|
138
|
+
newsletter: { enabled: false },
|
|
139
|
+
copyrightText: "",
|
|
140
|
+
bottomLinks: [],
|
|
141
|
+
},
|
|
142
|
+
depth: 0,
|
|
143
|
+
context: {
|
|
144
|
+
disableRevalidate: true,
|
|
145
|
+
},
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
// Delete collections sequentially to avoid database deadlocks
|
|
149
|
+
for (const collection of collections) {
|
|
150
|
+
if (payload.collections[collection]) {
|
|
151
|
+
try {
|
|
152
|
+
await payload.db.deleteMany({ collection, req, where: {} })
|
|
153
|
+
} catch (error) {
|
|
154
|
+
payload.logger.warn(`Warning: Could not clear ${collection}: ${error}`)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Delete versions sequentially
|
|
160
|
+
for (const collection of collections) {
|
|
161
|
+
if (payload.collections[collection]?.config?.versions) {
|
|
162
|
+
try {
|
|
163
|
+
await payload.db.deleteVersions({ collection, req, where: {} })
|
|
164
|
+
} catch (error) {
|
|
165
|
+
payload.logger.warn(`Warning: Could not clear ${collection} versions: ${error}`)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
payload.logger.info("— Seeding demo author...")
|
|
171
|
+
|
|
172
|
+
await payload.delete({
|
|
173
|
+
collection: "users",
|
|
174
|
+
depth: 0,
|
|
175
|
+
where: {
|
|
176
|
+
email: {
|
|
177
|
+
equals: "demo-author@example.com",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
const _demoAuthor = await payload.create({
|
|
183
|
+
collection: "users",
|
|
184
|
+
data: {
|
|
185
|
+
name: "DirectoryHub Team",
|
|
186
|
+
email: "demo-author@example.com",
|
|
187
|
+
password: "password",
|
|
188
|
+
},
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
// Seed categories
|
|
192
|
+
payload.logger.info("— Seeding categories...")
|
|
193
|
+
|
|
194
|
+
const categoryDocs = await Promise.all(
|
|
195
|
+
categories.map((category) =>
|
|
196
|
+
payload.create({
|
|
197
|
+
collection: "categories",
|
|
198
|
+
data: {
|
|
199
|
+
title: category.title,
|
|
200
|
+
slug: category.slug,
|
|
201
|
+
},
|
|
202
|
+
}),
|
|
203
|
+
),
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
// Seed FAQs
|
|
207
|
+
payload.logger.info("— Seeding FAQs...")
|
|
208
|
+
|
|
209
|
+
const faqDocs = await Promise.all(
|
|
210
|
+
faqData.map((faq) =>
|
|
211
|
+
payload.create({
|
|
212
|
+
collection: "faqs",
|
|
213
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
214
|
+
data: faq as any,
|
|
215
|
+
}),
|
|
216
|
+
),
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
payload.logger.info(`— Seeded ${faqDocs.length} FAQs`)
|
|
220
|
+
|
|
221
|
+
// Upload hero dashboard image
|
|
222
|
+
payload.logger.info("— Uploading hero media...")
|
|
223
|
+
|
|
224
|
+
let heroImageDoc = null
|
|
225
|
+
try {
|
|
226
|
+
const heroImagePath = path.join(process.cwd(), "public/media/hero-dashboard.png")
|
|
227
|
+
if (fs.existsSync(heroImagePath)) {
|
|
228
|
+
const heroImageBuffer = fs.readFileSync(heroImagePath)
|
|
229
|
+
const heroImageFile: File = {
|
|
230
|
+
name: "hero-dashboard.png",
|
|
231
|
+
data: heroImageBuffer,
|
|
232
|
+
mimetype: "image/png",
|
|
233
|
+
size: heroImageBuffer.byteLength,
|
|
234
|
+
}
|
|
235
|
+
heroImageDoc = await payload.create({
|
|
236
|
+
collection: "media",
|
|
237
|
+
data: {
|
|
238
|
+
alt: "DirectoryHub Dashboard - Manage directories, track usage, and configure settings",
|
|
239
|
+
},
|
|
240
|
+
file: heroImageFile,
|
|
241
|
+
})
|
|
242
|
+
payload.logger.info("— Hero image uploaded successfully")
|
|
243
|
+
} else {
|
|
244
|
+
payload.logger.info("— Hero image not found, using animated mockup fallback")
|
|
245
|
+
}
|
|
246
|
+
} catch (_error) {
|
|
247
|
+
payload.logger.info("— Error uploading hero image, using animated mockup fallback")
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Upload testimonial images
|
|
251
|
+
payload.logger.info("— Uploading testimonial images...")
|
|
252
|
+
|
|
253
|
+
const testimonialImages: (typeof heroImageDoc)[] = []
|
|
254
|
+
const testimonialImageFiles = [
|
|
255
|
+
{ name: "testimonial-1.jpg", alt: "Professional woman entrepreneur" },
|
|
256
|
+
{ name: "testimonial-2.jpg", alt: "Business professional reviewing analytics" },
|
|
257
|
+
{ name: "testimonial-3.jpg", alt: "Team collaboration meeting" },
|
|
258
|
+
]
|
|
259
|
+
|
|
260
|
+
for (const imgData of testimonialImageFiles) {
|
|
261
|
+
try {
|
|
262
|
+
const imagePath = path.join(process.cwd(), `public/media/${imgData.name}`)
|
|
263
|
+
if (fs.existsSync(imagePath)) {
|
|
264
|
+
const imageBuffer = fs.readFileSync(imagePath)
|
|
265
|
+
const imageFile: File = {
|
|
266
|
+
name: imgData.name,
|
|
267
|
+
data: imageBuffer,
|
|
268
|
+
mimetype: "image/jpeg",
|
|
269
|
+
size: imageBuffer.byteLength,
|
|
270
|
+
}
|
|
271
|
+
const imageDoc = await payload.create({
|
|
272
|
+
collection: "media",
|
|
273
|
+
data: {
|
|
274
|
+
alt: imgData.alt,
|
|
275
|
+
},
|
|
276
|
+
file: imageFile,
|
|
277
|
+
})
|
|
278
|
+
testimonialImages.push(imageDoc)
|
|
279
|
+
}
|
|
280
|
+
} catch (_error) {
|
|
281
|
+
payload.logger.info(`— Error uploading ${imgData.name}`)
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
payload.logger.info(`— Uploaded ${testimonialImages.length} testimonial images`)
|
|
285
|
+
|
|
286
|
+
payload.logger.info("— Seeding contact form...")
|
|
287
|
+
|
|
288
|
+
const contactForm = await payload.create({
|
|
289
|
+
collection: "forms",
|
|
290
|
+
depth: 0,
|
|
291
|
+
data: contactFormData,
|
|
292
|
+
})
|
|
293
|
+
|
|
294
|
+
payload.logger.info("— Seeding pages...")
|
|
295
|
+
|
|
296
|
+
// Seed main pages
|
|
297
|
+
const [homePage, pricingPage, aboutPage, privacyPage, termsPage] = await Promise.all([
|
|
298
|
+
payload.create({
|
|
299
|
+
collection: "pages",
|
|
300
|
+
depth: 0,
|
|
301
|
+
context: {
|
|
302
|
+
disableRevalidate: true,
|
|
303
|
+
},
|
|
304
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
305
|
+
data: directoryHubHome({ heroImage: heroImageDoc, testimonialImages }) as any,
|
|
306
|
+
}),
|
|
307
|
+
payload.create({
|
|
308
|
+
collection: "pages",
|
|
309
|
+
depth: 0,
|
|
310
|
+
context: {
|
|
311
|
+
disableRevalidate: true,
|
|
312
|
+
},
|
|
313
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
314
|
+
data: directoryHubPricing() as any,
|
|
315
|
+
}),
|
|
316
|
+
payload.create({
|
|
317
|
+
collection: "pages",
|
|
318
|
+
depth: 0,
|
|
319
|
+
context: {
|
|
320
|
+
disableRevalidate: true,
|
|
321
|
+
},
|
|
322
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
323
|
+
data: directoryHubAbout({ contactForm }) as any,
|
|
324
|
+
}),
|
|
325
|
+
payload.create({
|
|
326
|
+
collection: "pages",
|
|
327
|
+
depth: 0,
|
|
328
|
+
context: {
|
|
329
|
+
disableRevalidate: true,
|
|
330
|
+
},
|
|
331
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
332
|
+
data: directoryHubPrivacy() as any,
|
|
333
|
+
}),
|
|
334
|
+
payload.create({
|
|
335
|
+
collection: "pages",
|
|
336
|
+
depth: 0,
|
|
337
|
+
context: {
|
|
338
|
+
disableRevalidate: true,
|
|
339
|
+
},
|
|
340
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
341
|
+
data: directoryHubTerms() as any,
|
|
342
|
+
}),
|
|
343
|
+
])
|
|
344
|
+
|
|
345
|
+
// Seed feature pages
|
|
346
|
+
payload.logger.info("— Seeding feature pages...")
|
|
347
|
+
|
|
348
|
+
const featurePages = await Promise.all([
|
|
349
|
+
payload.create({
|
|
350
|
+
collection: "pages",
|
|
351
|
+
depth: 0,
|
|
352
|
+
context: { disableRevalidate: true },
|
|
353
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
354
|
+
data: templatesPage() as any,
|
|
355
|
+
}),
|
|
356
|
+
payload.create({
|
|
357
|
+
collection: "pages",
|
|
358
|
+
depth: 0,
|
|
359
|
+
context: { disableRevalidate: true },
|
|
360
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
361
|
+
data: monetizationPage() as any,
|
|
362
|
+
}),
|
|
363
|
+
payload.create({
|
|
364
|
+
collection: "pages",
|
|
365
|
+
depth: 0,
|
|
366
|
+
context: { disableRevalidate: true },
|
|
367
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
368
|
+
data: seoPage() as any,
|
|
369
|
+
}),
|
|
370
|
+
payload.create({
|
|
371
|
+
collection: "pages",
|
|
372
|
+
depth: 0,
|
|
373
|
+
context: { disableRevalidate: true },
|
|
374
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
375
|
+
data: dashboardPage() as any,
|
|
376
|
+
}),
|
|
377
|
+
payload.create({
|
|
378
|
+
collection: "pages",
|
|
379
|
+
depth: 0,
|
|
380
|
+
context: { disableRevalidate: true },
|
|
381
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
382
|
+
data: automationPage() as any,
|
|
383
|
+
}),
|
|
384
|
+
payload.create({
|
|
385
|
+
collection: "pages",
|
|
386
|
+
depth: 0,
|
|
387
|
+
context: { disableRevalidate: true },
|
|
388
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
389
|
+
data: customFieldsPage() as any,
|
|
390
|
+
}),
|
|
391
|
+
])
|
|
392
|
+
|
|
393
|
+
payload.logger.info(`— Seeded ${featurePages.length} feature pages`)
|
|
394
|
+
|
|
395
|
+
// Seed use case pages
|
|
396
|
+
payload.logger.info("— Seeding use case pages...")
|
|
397
|
+
|
|
398
|
+
const useCasePages = await Promise.all([
|
|
399
|
+
payload.create({
|
|
400
|
+
collection: "pages",
|
|
401
|
+
depth: 0,
|
|
402
|
+
context: { disableRevalidate: true },
|
|
403
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
404
|
+
data: localServicesPage() as any,
|
|
405
|
+
}),
|
|
406
|
+
payload.create({
|
|
407
|
+
collection: "pages",
|
|
408
|
+
depth: 0,
|
|
409
|
+
context: { disableRevalidate: true },
|
|
410
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
411
|
+
data: b2bVendorHubsPage() as any,
|
|
412
|
+
}),
|
|
413
|
+
payload.create({
|
|
414
|
+
collection: "pages",
|
|
415
|
+
depth: 0,
|
|
416
|
+
context: { disableRevalidate: true },
|
|
417
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
418
|
+
data: communitiesPage() as any,
|
|
419
|
+
}),
|
|
420
|
+
payload.create({
|
|
421
|
+
collection: "pages",
|
|
422
|
+
depth: 0,
|
|
423
|
+
context: { disableRevalidate: true },
|
|
424
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
425
|
+
data: marketplacesPage() as any,
|
|
426
|
+
}),
|
|
427
|
+
])
|
|
428
|
+
|
|
429
|
+
payload.logger.info(`— Seeded ${useCasePages.length} use case pages`)
|
|
430
|
+
|
|
431
|
+
// Seed blog posts
|
|
432
|
+
payload.logger.info("— Seeding blog posts...")
|
|
433
|
+
|
|
434
|
+
const posts = blogPosts(categoryDocs)
|
|
435
|
+
const createdPosts = await Promise.all(
|
|
436
|
+
posts.map((post) =>
|
|
437
|
+
payload.create({
|
|
438
|
+
collection: "posts",
|
|
439
|
+
depth: 0,
|
|
440
|
+
context: { disableRevalidate: true },
|
|
441
|
+
// biome-ignore lint/suspicious/noExplicitAny: Payload seed data type mismatch
|
|
442
|
+
data: post as any,
|
|
443
|
+
}),
|
|
444
|
+
),
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
payload.logger.info(`— Seeded ${createdPosts.length} blog posts`)
|
|
448
|
+
|
|
449
|
+
payload.logger.info("— Seeding globals...")
|
|
450
|
+
|
|
451
|
+
await Promise.all([
|
|
452
|
+
payload.updateGlobal({
|
|
453
|
+
slug: "header",
|
|
454
|
+
data: {
|
|
455
|
+
navItems: [
|
|
456
|
+
{
|
|
457
|
+
type: "megaMenu",
|
|
458
|
+
label: "Product",
|
|
459
|
+
megaMenuColumns: [
|
|
460
|
+
{
|
|
461
|
+
columnLabel: "Features",
|
|
462
|
+
items: [
|
|
463
|
+
{
|
|
464
|
+
label: "Templates",
|
|
465
|
+
description: "Beautiful, ready-to-use directory templates",
|
|
466
|
+
icon: "layout",
|
|
467
|
+
link: {
|
|
468
|
+
type: "reference",
|
|
469
|
+
reference: {
|
|
470
|
+
relationTo: "pages",
|
|
471
|
+
value: featurePages[0].id,
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
label: "Monetization",
|
|
477
|
+
description: "Built-in payments and subscriptions",
|
|
478
|
+
icon: "dollarSign",
|
|
479
|
+
link: {
|
|
480
|
+
type: "reference",
|
|
481
|
+
reference: {
|
|
482
|
+
relationTo: "pages",
|
|
483
|
+
value: featurePages[1].id,
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
label: "SEO",
|
|
489
|
+
description: "Schema markup and optimizations",
|
|
490
|
+
icon: "search",
|
|
491
|
+
link: {
|
|
492
|
+
type: "reference",
|
|
493
|
+
reference: {
|
|
494
|
+
relationTo: "pages",
|
|
495
|
+
value: featurePages[2].id,
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
],
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
columnLabel: "Tools",
|
|
503
|
+
items: [
|
|
504
|
+
{
|
|
505
|
+
label: "Dashboard",
|
|
506
|
+
description: "Powerful admin and analytics",
|
|
507
|
+
icon: "barChart",
|
|
508
|
+
link: {
|
|
509
|
+
type: "reference",
|
|
510
|
+
reference: {
|
|
511
|
+
relationTo: "pages",
|
|
512
|
+
value: featurePages[3].id,
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
label: "Automation",
|
|
518
|
+
description: "Smart workflows and actions",
|
|
519
|
+
icon: "zap",
|
|
520
|
+
link: {
|
|
521
|
+
type: "reference",
|
|
522
|
+
reference: {
|
|
523
|
+
relationTo: "pages",
|
|
524
|
+
value: featurePages[4].id,
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
label: "Custom Fields",
|
|
530
|
+
description: "Flexible schemas for any niche",
|
|
531
|
+
icon: "layers",
|
|
532
|
+
link: {
|
|
533
|
+
type: "reference",
|
|
534
|
+
reference: {
|
|
535
|
+
relationTo: "pages",
|
|
536
|
+
value: featurePages[5].id,
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
|
+
],
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
type: "megaMenu",
|
|
546
|
+
label: "Use Cases",
|
|
547
|
+
megaMenuColumns: [
|
|
548
|
+
{
|
|
549
|
+
columnLabel: "Directory Types",
|
|
550
|
+
items: [
|
|
551
|
+
{
|
|
552
|
+
label: "Local Services",
|
|
553
|
+
description: "Plumbers, restaurants, photographers",
|
|
554
|
+
icon: "globe",
|
|
555
|
+
link: {
|
|
556
|
+
type: "reference",
|
|
557
|
+
reference: {
|
|
558
|
+
relationTo: "pages",
|
|
559
|
+
value: useCasePages[0].id,
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
label: "B2B Vendor Hubs",
|
|
565
|
+
description: "SaaS tools, agencies, consultants",
|
|
566
|
+
icon: "building",
|
|
567
|
+
link: {
|
|
568
|
+
type: "reference",
|
|
569
|
+
reference: {
|
|
570
|
+
relationTo: "pages",
|
|
571
|
+
value: useCasePages[1].id,
|
|
572
|
+
},
|
|
573
|
+
},
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
label: "Communities",
|
|
577
|
+
description: "Member directories, alumni networks",
|
|
578
|
+
icon: "users",
|
|
579
|
+
link: {
|
|
580
|
+
type: "reference",
|
|
581
|
+
reference: {
|
|
582
|
+
relationTo: "pages",
|
|
583
|
+
value: useCasePages[2].id,
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
label: "Marketplaces",
|
|
589
|
+
description: "Multi-vendor platforms",
|
|
590
|
+
icon: "store",
|
|
591
|
+
link: {
|
|
592
|
+
type: "reference",
|
|
593
|
+
reference: {
|
|
594
|
+
relationTo: "pages",
|
|
595
|
+
value: useCasePages[3].id,
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
],
|
|
600
|
+
},
|
|
601
|
+
],
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
type: "link",
|
|
605
|
+
label: "Pricing",
|
|
606
|
+
link: {
|
|
607
|
+
type: "reference",
|
|
608
|
+
reference: {
|
|
609
|
+
relationTo: "pages",
|
|
610
|
+
value: pricingPage.id,
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
type: "link",
|
|
616
|
+
label: "Blog",
|
|
617
|
+
link: {
|
|
618
|
+
type: "custom",
|
|
619
|
+
url: "/posts",
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
type: "link",
|
|
624
|
+
label: "Sign In",
|
|
625
|
+
link: {
|
|
626
|
+
type: "custom",
|
|
627
|
+
url: "/sign-in",
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
type: "link",
|
|
632
|
+
label: "Get Started",
|
|
633
|
+
link: {
|
|
634
|
+
type: "custom",
|
|
635
|
+
url: "/sign-up",
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
],
|
|
639
|
+
},
|
|
640
|
+
}),
|
|
641
|
+
payload.updateGlobal({
|
|
642
|
+
slug: "footer",
|
|
643
|
+
data: {
|
|
644
|
+
columns: [
|
|
645
|
+
{
|
|
646
|
+
title: "Product",
|
|
647
|
+
links: [
|
|
648
|
+
{
|
|
649
|
+
link: {
|
|
650
|
+
type: "reference",
|
|
651
|
+
label: "Home",
|
|
652
|
+
reference: {
|
|
653
|
+
relationTo: "pages",
|
|
654
|
+
value: homePage.id,
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
link: {
|
|
660
|
+
type: "reference",
|
|
661
|
+
label: "Pricing",
|
|
662
|
+
reference: {
|
|
663
|
+
relationTo: "pages",
|
|
664
|
+
value: pricingPage.id,
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
link: {
|
|
670
|
+
type: "reference",
|
|
671
|
+
label: "Templates",
|
|
672
|
+
reference: {
|
|
673
|
+
relationTo: "pages",
|
|
674
|
+
value: featurePages[0].id,
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
],
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
title: "Resources",
|
|
682
|
+
links: [
|
|
683
|
+
{
|
|
684
|
+
link: {
|
|
685
|
+
type: "custom",
|
|
686
|
+
label: "Blog",
|
|
687
|
+
url: "/posts",
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
link: {
|
|
692
|
+
type: "custom",
|
|
693
|
+
label: "Documentation",
|
|
694
|
+
url: "/docs",
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
],
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
title: "Company",
|
|
701
|
+
links: [
|
|
702
|
+
{
|
|
703
|
+
link: {
|
|
704
|
+
type: "reference",
|
|
705
|
+
label: "About",
|
|
706
|
+
reference: {
|
|
707
|
+
relationTo: "pages",
|
|
708
|
+
value: aboutPage.id,
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
},
|
|
712
|
+
],
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
title: "Legal",
|
|
716
|
+
links: [
|
|
717
|
+
{
|
|
718
|
+
link: {
|
|
719
|
+
type: "reference",
|
|
720
|
+
label: "Privacy",
|
|
721
|
+
reference: {
|
|
722
|
+
relationTo: "pages",
|
|
723
|
+
value: privacyPage.id,
|
|
724
|
+
},
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
link: {
|
|
729
|
+
type: "reference",
|
|
730
|
+
label: "Terms",
|
|
731
|
+
reference: {
|
|
732
|
+
relationTo: "pages",
|
|
733
|
+
value: termsPage.id,
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
],
|
|
738
|
+
},
|
|
739
|
+
],
|
|
740
|
+
socialLinks: {
|
|
741
|
+
twitter: "https://x.com/directoryhub",
|
|
742
|
+
linkedin: "https://linkedin.com/company/directoryhub",
|
|
743
|
+
github: "https://github.com/directoryhub",
|
|
744
|
+
},
|
|
745
|
+
newsletter: {
|
|
746
|
+
enabled: true,
|
|
747
|
+
title: "Newsletter",
|
|
748
|
+
description: "Stay up to date with DirectoryHub through weekly updates to your inbox.",
|
|
749
|
+
buttonText: "Subscribe",
|
|
750
|
+
placeholder: "Enter your email",
|
|
751
|
+
},
|
|
752
|
+
copyrightText: "DirectoryHub",
|
|
753
|
+
bottomLinks: [
|
|
754
|
+
{
|
|
755
|
+
link: {
|
|
756
|
+
type: "custom",
|
|
757
|
+
label: "Contact Support",
|
|
758
|
+
url: "/support",
|
|
759
|
+
},
|
|
760
|
+
},
|
|
761
|
+
],
|
|
762
|
+
},
|
|
763
|
+
}),
|
|
764
|
+
])
|
|
765
|
+
|
|
766
|
+
payload.logger.info("DirectoryHub database seeded successfully!")
|
|
767
|
+
}
|