@founderhq/payload-cms-kit
v1.1.0
Published
Payload CMS presets for FounderHQ-compatible blogs
Readme
@founderhq/payload-cms-kit
Payload CMS presets for FounderHQ-compatible blogs.
This package is the CMS-side companion to @founderhq/next-blog. It provides
Payload 3 collection presets for posts, authors, categories, tags, media,
redirects, blog settings, and CTA/newsletter blocks.
The existing @founderhq/payload-plugin package remains the small rich-text
compatibility package for teams that only need FounderHQ embeds and tables.
Install
pnpm add @founderhq/payload-cms-kit @founderhq/payload-plugin payload @payloadcms/richtext-lexicalInstall one Payload database adapter separately:
pnpm add @payloadcms/db-postgres
# or
pnpm add @payloadcms/db-sqliteUsage
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import { buildConfig } from "payload";
import {
createFounderHQCmsUsersCollection,
createFounderHQBlogCollections,
createFounderHQBlogGlobals,
founderHQBlogRichTextFeatures,
} from "@founderhq/payload-cms-kit";
export default buildConfig({
editor: lexicalEditor({
features: founderHQBlogRichTextFeatures(),
}),
collections: [
createFounderHQCmsUsersCollection(),
...createFounderHQBlogCollections(),
],
globals: createFounderHQBlogGlobals(),
secret: process.env.PAYLOAD_SECRET || "",
});The post preset stores normalized searchText so public search can work across
Postgres, SQLite, Turso, and other Payload adapters without database-specific
full-text search.
The post preset stores Lexical JSON as the source of truth, keeps slug history
in Payload array-row shape, exposes SEO/schema override fields, estimates
reading time, and registers FounderHQ-compatible embeds, tables, uploads,
CTA/newsletter blocks, and custom HTML converters. The media preset derives an
aspectRatio value from upload dimensions when Payload exposes them.
contentHtml is kept as a hidden legacy compatibility field only; public pages
do not depend on it.
Set PAYLOAD_MEDIA_CDN_URL only when uploaded media should be served from a
CDN/custom asset domain. When omitted or blank, media URLs are left exactly as
the selected Payload storage adapter returns them. When set, the media preset
rewrites url, thumbnailURL, and generated image-size URLs in Payload
afterRead output.
Default access controls allow public reads for public blog data, restrict
anonymous post reads to published posts, and require a CMS user with admin or
editor role for writes. createFounderHQCmsUsersCollection() enables Payload
API keys by default for FounderHQ Publish connections. Override
collection/global presets when a client needs a stricter model.
All collection and global factories accept preset overrides so clients can keep the portable model but adapt labels, slugs, admin options, or fields to their own design and content workflow.
