Drafts are on so a post can be written across sittings without saving being publishing. afterChange and afterDelete revalidate every path a post appears on. Blog pages are ISR because CI builds with no database, so without these a published post would not appear until the revalidate window expired — up to an hour of a writer concluding that publishing is broken. Payload runs in the same process as Next, so these are direct revalidatePath calls with no webhook and no shared secret. Media writes to an absolute /app/media matching the compose mount; a mismatch would write into the container filesystem, where the next redeploy silently discards it. Alt text is required rather than optional. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017YmbBhr8s7GusjDE12hrZM
26 lines
764 B
TypeScript
26 lines
764 B
TypeScript
import type { Block } from 'payload';
|
|
|
|
/**
|
|
* The house block: "what this number doesn't tell you".
|
|
*
|
|
* Blocks are the reason this site runs a CMS rather than flat files — a post
|
|
* can carry live product components, not screenshots of them. This is the
|
|
* first and simplest one; a live-chart block follows when a post needs it.
|
|
*/
|
|
export const Callout: Block = {
|
|
slug: 'callout',
|
|
labels: { singular: 'Callout', plural: 'Callouts' },
|
|
fields: [
|
|
{
|
|
name: 'tone',
|
|
type: 'select',
|
|
defaultValue: 'caveat',
|
|
options: [
|
|
{ label: 'Caveat — what this does not show', value: 'caveat' },
|
|
{ label: 'Note — useful aside', value: 'note' },
|
|
],
|
|
},
|
|
{ name: 'body', type: 'textarea', required: true },
|
|
],
|
|
};
|