@riverbankcms/sdk 0.129.0 → 0.129.1
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/README.md +19 -256
- package/dist/{PreviewEditorSidebar-B43CJ0g_.mjs → PreviewEditorSidebar-DceRseRV.mjs} +3 -3
- package/dist/{PreviewEditorUI-DHirVkeM.mjs → PreviewEditorUI-BNunq3kk.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-BJumZy1B.mjs → SdkPreviewModeRuntime-Bt87-62u.mjs} +3 -3
- package/dist/{SiteChromeCustomizeContext-D9SlpwEj.mjs → SiteChromeCustomizeContext-BLl-OlL4.mjs} +460 -393
- package/dist/_dts/ai/src/contracts/commandExposure.d.ts +1 -1
- package/dist/_dts/ai/src/contracts/proposals.d.ts +4897 -4897
- package/dist/_dts/api/src/index.d.ts +2 -1
- package/dist/_dts/api/src/sdk-event-management.d.ts +53 -0
- package/dist/_dts/api/src/sdk-event-schedule.d.ts +3 -6
- package/dist/_dts/api/src/sdkContracts.d.ts +37 -50
- package/dist/_dts/api/src/sdkThemeWire.d.ts +2595 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +13 -29
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/sdk/src/config/types.d.ts +4 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyleCatalog.d.ts +254 -0
- package/dist/_dts/theme-core/src/site-styles/headerLegacyLooks.d.ts +372 -0
- package/dist/_dts/theme-core/src/site-styles/headerLookBranding.d.ts +106 -0
- package/dist/_dts/theme-core/src/site-styles/headerLookSelection.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/headerLookTypes.d.ts +212 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +7 -841
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompilerPrimitives.d.ts +23 -0
- package/dist/client/client.mjs +492 -426
- package/dist/client/hooks.mjs +59 -36
- package/dist/client/rendering/client.mjs +593 -547
- package/dist/client/rendering.mjs +491 -425
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-CfZd5pAm.mjs → sdk-runtime-C20CVWbb.mjs} +1 -1
- package/dist/{separator-DkTe68HE.mjs → separator-BE3NCquy.mjs} +1 -1
- package/dist/server/components.mjs +72 -49
- package/dist/server/config-validation.mjs +59 -36
- package/dist/server/config.mjs +59 -36
- package/dist/server/data.mjs +59 -36
- package/dist/server/index.mjs +1 -1
- package/dist/server/manifest.mjs +4966 -0
- package/dist/server/next.mjs +73 -50
- package/dist/server/page-converter.mjs +40 -36
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +72 -49
- package/dist/server/rendering.mjs +72 -49
- package/dist/server/routing.mjs +472 -402
- package/dist/server/server.mjs +60 -37
- package/dist/server/theme-bridge.mjs +70 -66
- package/package.json +9 -12
- package/dist/_dts/api/src/event-presentation.d.ts +0 -14
- package/dist/_dts/blocks/src/definitions.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +0 -53
- package/dist/_dts/sdk/src/cli/commands/audit.d.ts +0 -101
- package/dist/_dts/sdk/src/cli/commands/block.d.ts +0 -24
- package/dist/_dts/sdk/src/cli/commands/compare.d.ts +0 -62
- package/dist/_dts/sdk/src/cli/commands/content-type.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/content.d.ts +0 -56
- package/dist/_dts/sdk/src/cli/commands/delete.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +0 -43
- package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/commands/entry.d.ts +0 -55
- package/dist/_dts/sdk/src/cli/commands/env.d.ts +0 -31
- package/dist/_dts/sdk/src/cli/commands/event.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/commands/identifiers.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +0 -13
- package/dist/_dts/sdk/src/cli/commands/manifest.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/media-validation.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/commands/navigation.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/commands/page.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +0 -50
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/pull-dry-run.d.ts +0 -70
- package/dist/_dts/sdk/src/cli/commands/pull-scope-diff.d.ts +0 -8
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +0 -43
- package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +0 -19
- package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +0 -42
- package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/commands/push/execute/media.d.ts +0 -22
- package/dist/_dts/sdk/src/cli/commands/push/execute/metadata.d.ts +0 -1
- package/dist/_dts/sdk/src/cli/commands/push/execute/reporting.d.ts +0 -7
- package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +0 -63
- package/dist/_dts/sdk/src/cli/commands/push/filter.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +0 -29
- package/dist/_dts/sdk/src/cli/commands/push/normalizeLocalContent.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +0 -32
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +0 -25
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +0 -83
- package/dist/_dts/sdk/src/cli/commands/push/scopes/eventCategories.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/push/scopes/events.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/commands/push/scopes/pushScopeGeneric.d.ts +0 -6
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +0 -87
- package/dist/_dts/sdk/src/cli/commands/push/scopes/venues.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +0 -48
- package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +0 -17
- package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +0 -56
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +0 -34
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +0 -54
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +0 -40
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +0 -60
- package/dist/_dts/sdk/src/cli/commands/verify.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/commands/webhooks.d.ts +0 -44
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +0 -47
- package/dist/_dts/sdk/src/cli/content/collectionWriters.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +0 -46
- package/dist/_dts/sdk/src/cli/content/entryPaths.d.ts +0 -6
- package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +0 -39
- package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +0 -5
- package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +0 -17
- package/dist/_dts/sdk/src/cli/content/media-manifest.d.ts +0 -13
- package/dist/_dts/sdk/src/cli/content/metadataAfterPush.d.ts +0 -25
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +0 -29
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +0 -488
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +0 -142
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/env.d.ts +0 -71
- package/dist/_dts/sdk/src/cli/errors.d.ts +0 -62
- package/dist/_dts/sdk/src/cli/helpers/ai-runtime.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/helpers.d.ts +0 -399
- package/dist/_dts/sdk/src/cli/index.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/init-docs/constants.d.ts +0 -16
- package/dist/_dts/sdk/src/cli/init-docs/index.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/init-docs/templates.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/init-docs/zod-to-markdown.d.ts +0 -28
- package/dist/_dts/sdk/src/cli/load-config.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/media/identifiers.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/media/local-media.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +0 -91
- package/dist/_dts/sdk/src/cli/media/portable.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/media/rich-text.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/media/value-utils.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/media/write-guard.d.ts +0 -52
- package/dist/_dts/sdk/src/cli/merge-remote/entryLocal.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/merge-remote/entryMerge.d.ts +0 -78
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePlan.d.ts +0 -45
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +0 -24
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/merge-remote/entryRemote.d.ts +0 -9
- package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +0 -48
- package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +0 -22
- package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +0 -78
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +0 -36
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +0 -17
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +0 -46
- package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +0 -32
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +0 -27
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +0 -63
- package/dist/_dts/sdk/src/cli/migrations/entries.d.ts +0 -28
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +0 -73
- package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/output.d.ts +0 -133
- package/dist/_dts/sdk/src/cli/program.d.ts +0 -29
- package/dist/_dts/sdk/src/cli/push-config.d.ts +0 -49
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +0 -51
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +0 -13
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +0 -170
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +0 -21
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +0 -32
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +0 -53
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +0 -65
- package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +0 -24
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +0 -68
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +0 -53
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +0 -8
- package/dist/_dts/sdk/src/cli/site-commands/localBlockManifestResolver.d.ts +0 -31
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +0 -57
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +0 -82
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +0 -84
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +0 -39
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +0 -8
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +0 -97
- package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +0 -222
- package/dist/_dts/sdk/src/cli/sync/executor.d.ts +0 -84
- package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +0 -39
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/sync/mapper.d.ts +0 -41
- package/dist/_dts/sdk/src/cli/sync/media-sync.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/sync/media.d.ts +0 -158
- package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/sync/validation.d.ts +0 -68
- package/dist/_dts/sdk/src/cli/utils/checksum.d.ts +0 -1
- package/dist/_dts/sdk/src/client/management/blocks.d.ts +0 -19
- package/dist/_dts/sdk/src/client/management/catalog.d.ts +0 -10
- package/dist/_dts/sdk/src/client/management/entries.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/eventCategories.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/events.d.ts +0 -7
- package/dist/_dts/sdk/src/client/management/footer.d.ts +0 -9
- package/dist/_dts/sdk/src/client/management/forms.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/http.d.ts +0 -79
- package/dist/_dts/sdk/src/client/management/identifiers.d.ts +0 -11
- package/dist/_dts/sdk/src/client/management/index.d.ts +0 -41
- package/dist/_dts/sdk/src/client/management/media.d.ts +0 -72
- package/dist/_dts/sdk/src/client/management/navigation.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/pages.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/pull.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/settings-branding.d.ts +0 -32
- package/dist/_dts/sdk/src/client/management/settings.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/theme.d.ts +0 -8
- package/dist/_dts/sdk/src/client/management/types.d.ts +0 -1069
- package/dist/_dts/sdk/src/client/management/venues.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/webhooks.d.ts +0 -3
- package/dist/_dts/sdk/src/test/env.d.ts +0 -4
- package/dist/_dts/site-commands/src/adapter.d.ts +0 -23
- package/dist/_dts/site-commands/src/appointmentCommandSchemas.d.ts +0 -100
- package/dist/_dts/site-commands/src/capabilityGaps.d.ts +0 -8
- package/dist/_dts/site-commands/src/commandContract.d.ts +0 -1277
- package/dist/_dts/site-commands/src/commandDomain.d.ts +0 -20
- package/dist/_dts/site-commands/src/commandIdentifiers.d.ts +0 -7
- package/dist/_dts/site-commands/src/commandValidation.d.ts +0 -10
- package/dist/_dts/site-commands/src/commands.d.ts +0 -1983
- package/dist/_dts/site-commands/src/domain.d.ts +0 -104
- package/dist/_dts/site-commands/src/eventCommandContent.d.ts +0 -11
- package/dist/_dts/site-commands/src/exposure.d.ts +0 -41
- package/dist/_dts/site-commands/src/guards.d.ts +0 -1
- package/dist/_dts/site-commands/src/index.d.ts +0 -18
- package/dist/_dts/site-commands/src/metadata.d.ts +0 -555
- package/dist/_dts/site-commands/src/pagePaths.d.ts +0 -6
- package/dist/_dts/site-commands/src/planner.d.ts +0 -58
- package/dist/_dts/site-commands/src/refContributions.d.ts +0 -11
- package/dist/_dts/site-commands/src/refs.d.ts +0 -90
- package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +0 -405
- package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +0 -46
- package/dist/_dts/site-commands/src/stableJson.d.ts +0 -5
- package/dist/_dts/site-commands/src/staticExecutionGaps.d.ts +0 -10
- package/dist/_dts/site-commands/src/venueCommandMapping.d.ts +0 -21
- package/dist/_dts/theme-core/src/data.d.ts +0 -12
- package/dist/_dts/theme-core/src/site-styles/headerStyleParts.d.ts +0 -4
- package/dist/cli/index.mjs +0 -162988
- package/dist/cli/init-docs/content/agents-section.md +0 -67
- package/dist/cli/init-docs/content/cli-reference.md +0 -1238
- package/dist/cli/init-docs/content/content-management.md +0 -792
- package/dist/cli/init-docs/content/context-brand.md +0 -125
- package/dist/cli/init-docs/content/context-brief.md +0 -77
- package/dist/cli/init-docs/content/context-knowledge.md +0 -111
- package/dist/cli/init-docs/content/getting-started.md +0 -171
- package/dist/cli/init-docs/content/site-workflows-readme.md +0 -96
- package/dist/cli/init-docs/content/workflow-add-block.md +0 -299
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +0 -83
- package/dist/cli/init-docs/content/workflow-block-extensions.md +0 -370
- package/dist/cli/init-docs/content/workflow-cmsify-page.md +0 -357
- package/dist/cli/init-docs/content/workflow-content-types.md +0 -330
- package/dist/cli/init-docs/content/workflow-create-page.md +0 -212
- package/dist/cli/init-docs/content/workflow-custom-block.md +0 -470
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +0 -130
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +0 -158
- package/dist/cli/init-docs/content/workflow-preview-mode.md +0 -252
- package/dist/cli/init-docs/content/workflow-publish.md +0 -285
- package/dist/cli/init-docs/content/workflow-remote-setup.md +0 -51
- package/dist/cli/init-docs/content/workflow-templates.md +0 -381
- /package/dist/_dts/{sdk/src/cli/utils/mime.d.ts → media-core/src/mimeType.d.ts} +0 -0
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
# Workflow: Create a Page
|
|
2
|
-
|
|
3
|
-
This workflow guides you through creating a new page in the CMS.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- SDK CLI installed (`@riverbankcms/sdk`)
|
|
8
|
-
- Environment variables configured in `.env.local`
|
|
9
|
-
- Latest content pulled: `riverbankcms pull`
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
### Before You Add Custom Blocks
|
|
14
|
-
|
|
15
|
-
For simple content pages such as privacy policies, terms pages, FAQs, about copy, and editorial articles, start with built-in blocks:
|
|
16
|
-
|
|
17
|
-
- `block.body-text` for long-form rich text
|
|
18
|
-
- `block.hero` only when the page genuinely needs a visual/intro hero
|
|
19
|
-
- `block.cta-full` or existing CTA blocks for action strips
|
|
20
|
-
|
|
21
|
-
Check `block-types.md` before creating a custom block. A plain content page should usually be one `block.body-text` block with an `h1` and intro paragraph in the rich text body, not a site-specific custom block.
|
|
22
|
-
|
|
23
|
-
### 1. Create the Page
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
riverbankcms page upsert <identifier> \
|
|
27
|
-
--title "Page Title" \
|
|
28
|
-
--path /url-path \
|
|
29
|
-
--seo-title "SEO Title" \
|
|
30
|
-
--seo-description "Meta description for search engines"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Example:**
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
riverbankcms page upsert contact \
|
|
37
|
-
--title "Contact Us" \
|
|
38
|
-
--path /contact \
|
|
39
|
-
--seo-title "Contact Us | Company Name" \
|
|
40
|
-
--seo-description "Get in touch with our team. We'd love to hear from you."
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 2. Add Blocks to the Page
|
|
44
|
-
|
|
45
|
-
Add a hero block:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
riverbankcms block upsert contact hero-section \
|
|
49
|
-
--kind block.hero \
|
|
50
|
-
--data '{"heading": "Contact Us", "subheading": "We would love to hear from you"}'
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Add a body text block:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
riverbankcms block upsert contact intro-text \
|
|
57
|
-
--kind block.body-text \
|
|
58
|
-
--data '{"body": {"type": "doc", "content": [{"type": "heading", "attrs": {"level": 1}, "content": [{"type": "text", "text": "Contact Us"}]}, {"type": "paragraph", "content": [{"type": "text", "text": "Reach out using the form below or email us directly."}]}]}}'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Add more blocks as needed. See `block-types.md` for available block types.
|
|
62
|
-
|
|
63
|
-
### 3. Preview Blocks (Optional)
|
|
64
|
-
|
|
65
|
-
Preview individual blocks before publishing:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
riverbankcms preview block.hero \
|
|
69
|
-
--data '{"heading": "Contact Us", "subheading": "We would love to hear from you"}' \
|
|
70
|
-
--open
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### 4. Verify the Page
|
|
74
|
-
|
|
75
|
-
Check the page was created:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
riverbankcms page get contact
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
List blocks on the page:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
riverbankcms block list contact
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### 5. Publish the Page
|
|
88
|
-
|
|
89
|
-
When ready to make the page live:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
riverbankcms page publish contact
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Additional Operations
|
|
96
|
-
|
|
97
|
-
### Reordering Blocks
|
|
98
|
-
|
|
99
|
-
Change the order of blocks on the page:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
riverbankcms block reorder contact hero-section intro-text form-section
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Blocks will appear in the order specified.
|
|
106
|
-
|
|
107
|
-
### Editing Block Content
|
|
108
|
-
|
|
109
|
-
Update an existing block by upserting with new data:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
riverbankcms block upsert contact hero-section \
|
|
113
|
-
--kind block.hero \
|
|
114
|
-
--data '{"heading": "New Heading", "subheading": "Updated subheading"}'
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Deleting Blocks
|
|
118
|
-
|
|
119
|
-
Remove a block from the page:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
riverbankcms delete block contact hero-section --yes
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Using JSON Files for Complex Content
|
|
126
|
-
|
|
127
|
-
For blocks with complex nested content, use a JSON file:
|
|
128
|
-
|
|
129
|
-
**hero-content.json:**
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"heading": "Contact Our Team",
|
|
134
|
-
"subheading": "We're here to help",
|
|
135
|
-
"backgroundImage": {
|
|
136
|
-
"src": "/images/contact-bg.jpg",
|
|
137
|
-
"alt": "Office background"
|
|
138
|
-
},
|
|
139
|
-
"cta": {
|
|
140
|
-
"text": "Send Message",
|
|
141
|
-
"url": "#contact-form"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
riverbankcms block upsert contact hero-section \
|
|
148
|
-
--kind block.hero \
|
|
149
|
-
--file ./hero-content.json
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## Complete Example
|
|
153
|
-
|
|
154
|
-
Create a full about page with multiple blocks:
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
# 1. Create the page
|
|
158
|
-
riverbankcms page upsert about \
|
|
159
|
-
--title "About Us" \
|
|
160
|
-
--path /about \
|
|
161
|
-
--seo-title "About Us | Company Name" \
|
|
162
|
-
--seo-description "Learn about our company, mission, and team."
|
|
163
|
-
|
|
164
|
-
# 2. Add hero block
|
|
165
|
-
riverbankcms block upsert about hero \
|
|
166
|
-
--kind block.hero \
|
|
167
|
-
--data '{"heading": "About Us", "subheading": "Our story and mission"}'
|
|
168
|
-
|
|
169
|
-
# 3. Add introduction text
|
|
170
|
-
riverbankcms block upsert about intro \
|
|
171
|
-
--kind block.body-text \
|
|
172
|
-
--data '{"body": {"type": "doc", "content": [{"type": "paragraph", "content": [{"type": "text", "text": "Founded in 2020, we have been..."}]}]}}'
|
|
173
|
-
|
|
174
|
-
# 4. Add team section (if using a team block)
|
|
175
|
-
riverbankcms block upsert about team \
|
|
176
|
-
--kind block.body-text \
|
|
177
|
-
--data '{"body": {"type": "doc", "content": [{"type": "heading", "attrs": {"level": 2}, "content": [{"type": "text", "text": "Our Team"}]}, {"type": "paragraph", "content": [{"type": "text", "text": "Meet the people behind the company."}]}]}}'
|
|
178
|
-
|
|
179
|
-
# 5. Verify
|
|
180
|
-
riverbankcms page get about
|
|
181
|
-
riverbankcms block list about
|
|
182
|
-
|
|
183
|
-
# 6. Publish when ready
|
|
184
|
-
riverbankcms page publish about
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Troubleshooting
|
|
188
|
-
|
|
189
|
-
### Page already exists
|
|
190
|
-
|
|
191
|
-
If the page identifier already exists, `upsert` will update it. This is intentional - use unique identifiers for new pages.
|
|
192
|
-
|
|
193
|
-
### Block not appearing
|
|
194
|
-
|
|
195
|
-
- Verify the block was created: `riverbankcms block get <page> <block-id>`
|
|
196
|
-
- Check block kind is valid: see `block-types.md`
|
|
197
|
-
- Ensure JSON data is properly formatted
|
|
198
|
-
|
|
199
|
-
### Page not showing on site
|
|
200
|
-
|
|
201
|
-
- Check if page is published: `riverbankcms page get <identifier>`
|
|
202
|
-
- Look for `status: "published"` in the output
|
|
203
|
-
- Publish if needed: `riverbankcms page publish <identifier>`
|
|
204
|
-
|
|
205
|
-
## Related Workflows
|
|
206
|
-
|
|
207
|
-
- **Add a Block** - Add blocks to existing pages: see `add-block.md`
|
|
208
|
-
- **Block Extensions** - Add layout variants to system blocks: see `block-extensions.md`
|
|
209
|
-
- **Custom Blocks** - Create site-specific blocks: see `custom-block.md`
|
|
210
|
-
- **Content Types** - Create structured content with pages: see `content-types.md`
|
|
211
|
-
- **CMS-ify a Page** - Convert hard-coded pages to CMS-driven: see `cmsify-page.md`
|
|
212
|
-
- **Publish Workflow** - Publishing content safely: see `publish-workflow.md`
|
|
@@ -1,470 +0,0 @@
|
|
|
1
|
-
# Workflow: Create a Custom Block
|
|
2
|
-
|
|
3
|
-
Create a site-specific block with custom fields and rendering when system blocks don't meet your needs.
|
|
4
|
-
|
|
5
|
-
## When to Use Custom Blocks
|
|
6
|
-
|
|
7
|
-
Before creating a custom block, check `block-types.md` and the site `schema.md`. Many content needs are already covered by system blocks:
|
|
8
|
-
|
|
9
|
-
- `block.body-text` for policy pages, terms pages, simple articles, and editorial copy
|
|
10
|
-
- `block.hero` for page intros and visual mastheads
|
|
11
|
-
- `block.cta-full` / CTA blocks for call-to-action sections
|
|
12
|
-
- `block.image-gallery`, `block.media-text`, and similar media/content patterns
|
|
13
|
-
|
|
14
|
-
Do not create a custom block just to get “a rich text area with different spacing.” Use a built-in block and add scoped site CSS or block field extensions when that is enough.
|
|
15
|
-
|
|
16
|
-
**Use custom blocks when:**
|
|
17
|
-
- You need a completely unique block structure
|
|
18
|
-
- The functionality doesn't map to any system block
|
|
19
|
-
- You want site-specific branding or interactions
|
|
20
|
-
|
|
21
|
-
**Use block extensions instead when:**
|
|
22
|
-
- A system block does most of what you need
|
|
23
|
-
- You just need layout variants or extra options
|
|
24
|
-
- See `block-extensions.md` for that workflow
|
|
25
|
-
|
|
26
|
-
## Prerequisites
|
|
27
|
-
|
|
28
|
-
- `riverbank.config.ts` exists
|
|
29
|
-
- Block overrides file set up (e.g., `src/lib/block-overrides.tsx`)
|
|
30
|
-
- Understanding of the content structure you need
|
|
31
|
-
|
|
32
|
-
## Steps
|
|
33
|
-
|
|
34
|
-
### Step 1: Define Block in Config
|
|
35
|
-
|
|
36
|
-
Add your block to the `customBlocks` array in `riverbank.config.ts`:
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { defineConfig } from '@riverbankcms/sdk/config';
|
|
40
|
-
|
|
41
|
-
export default defineConfig({
|
|
42
|
-
siteId: '...',
|
|
43
|
-
|
|
44
|
-
customBlocks: [
|
|
45
|
-
{
|
|
46
|
-
id: 'custom.our-flow',
|
|
47
|
-
title: 'Our Flow',
|
|
48
|
-
description: 'Interactive process steps with hover reveal',
|
|
49
|
-
category: 'content',
|
|
50
|
-
icon: 'Workflow',
|
|
51
|
-
tags: ['process', 'steps', 'flow'],
|
|
52
|
-
previewCustomize: {
|
|
53
|
-
quickFieldPriority: ['title', 'introText'],
|
|
54
|
-
},
|
|
55
|
-
fields: [
|
|
56
|
-
{
|
|
57
|
-
id: 'title',
|
|
58
|
-
type: 'text',
|
|
59
|
-
label: 'Title',
|
|
60
|
-
required: true,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: 'introText',
|
|
64
|
-
type: 'text',
|
|
65
|
-
label: 'Intro Text',
|
|
66
|
-
multiline: true,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: 'steps',
|
|
70
|
-
type: 'repeater',
|
|
71
|
-
label: 'Steps',
|
|
72
|
-
itemLabel: 'Step',
|
|
73
|
-
minItems: 1,
|
|
74
|
-
maxItems: 6,
|
|
75
|
-
schema: {
|
|
76
|
-
fields: [
|
|
77
|
-
{ id: 'title', type: 'text', label: 'Step Title', required: true },
|
|
78
|
-
{ id: 'description', type: 'richText', label: 'Description', format: 'html' },
|
|
79
|
-
{ id: 'icon', type: 'media', label: 'Icon', mediaKinds: ['image'] },
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
});
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
`previewCustomize` is optional. When present, `quickFieldPriority` must list one or more unique field IDs to consider for compact Preview Customize controls; unlisted fields remain in the full panel.
|
|
90
|
-
|
|
91
|
-
### Step 2: Choose Field Types
|
|
92
|
-
|
|
93
|
-
Common field types for custom blocks:
|
|
94
|
-
|
|
95
|
-
| Type | Description | Key Properties |
|
|
96
|
-
|------|-------------|----------------|
|
|
97
|
-
| `text` | Single or multiline text | `multiline`, `maxLength` |
|
|
98
|
-
| `richText` | Rich text editor | `format: 'html'` or `'markdown'` |
|
|
99
|
-
| `select` | Dropdown selection | `options`, `multiple`, `defaultValue` |
|
|
100
|
-
| `boolean` | Toggle/checkbox | `defaultValue` |
|
|
101
|
-
| `media` | Image/video upload | `mediaKinds: ['image']` or `['video']` |
|
|
102
|
-
| `link` | Internal/external link | - |
|
|
103
|
-
| `number` | Numeric input | `min`, `max`, `step` |
|
|
104
|
-
| `datetime` | Date/time picker | - |
|
|
105
|
-
| `repeater` | List of nested fields | `schema`, `minItems`, `maxItems` |
|
|
106
|
-
| `group` | Grouped fields | `schema` |
|
|
107
|
-
|
|
108
|
-
### Step 2.5: Model Required Fields Carefully
|
|
109
|
-
|
|
110
|
-
The same content authoring rules apply to custom blocks and system blocks:
|
|
111
|
-
|
|
112
|
-
- Leave `required` unset or `false` for fields that can be omitted from pushed JSON.
|
|
113
|
-
- Use `defaultValue` for optional controls that should have a stable editor/rendering default.
|
|
114
|
-
- Set `required: true` only when every pushed block must provide that field.
|
|
115
|
-
- For repeaters and groups, required child fields apply when the parent item/object is present. If a repeater item has `{ id: 'title', required: true }`, then every item in that repeater must include `title`.
|
|
116
|
-
- In React overrides, type optional fields as optional and handle missing values with defaults or conditional rendering.
|
|
117
|
-
|
|
118
|
-
### Step 3: Create React Override Component
|
|
119
|
-
|
|
120
|
-
Create a component to render your block:
|
|
121
|
-
|
|
122
|
-
```typescript
|
|
123
|
-
// src/components/OurFlowBlock.tsx
|
|
124
|
-
import type { BlockOverrideProps } from '@riverbankcms/sdk/rendering';
|
|
125
|
-
import type { TipTapNode } from '@riverbankcms/sdk/rendering';
|
|
126
|
-
import { RichText } from '@riverbankcms/sdk/rendering';
|
|
127
|
-
|
|
128
|
-
interface Step {
|
|
129
|
-
title: string;
|
|
130
|
-
description?: TipTapNode;
|
|
131
|
-
icon?: { url: string; alt?: string };
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
interface OurFlowContent {
|
|
135
|
-
title?: string;
|
|
136
|
-
introText?: string;
|
|
137
|
-
steps?: Step[];
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export function OurFlowBlock({ content }: BlockOverrideProps<OurFlowContent>) {
|
|
141
|
-
const { title, introText, steps = [] } = content;
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<section className="py-16 bg-white">
|
|
145
|
-
<div className="container mx-auto px-4">
|
|
146
|
-
{title && <h2 className="text-3xl font-bold mb-4">{title}</h2>}
|
|
147
|
-
{introText && <p className="text-lg text-gray-600 mb-8">{introText}</p>}
|
|
148
|
-
|
|
149
|
-
<div className="grid gap-6 md:grid-cols-3">
|
|
150
|
-
{steps.map((step, index) => (
|
|
151
|
-
<div key={index} className="p-6 bg-gray-50 rounded-lg">
|
|
152
|
-
{step.icon?.url && (
|
|
153
|
-
<img src={step.icon.url} alt={step.icon.alt || ''} className="w-12 h-12 mb-4" />
|
|
154
|
-
)}
|
|
155
|
-
<h3 className="text-xl font-semibold mb-2">{step.title}</h3>
|
|
156
|
-
{step.description && <RichText content={step.description} />}
|
|
157
|
-
</div>
|
|
158
|
-
))}
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
</section>
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Step 4: Register in blockOverrides
|
|
167
|
-
|
|
168
|
-
Add your component to the block overrides:
|
|
169
|
-
|
|
170
|
-
```typescript
|
|
171
|
-
// src/lib/block-overrides.tsx
|
|
172
|
-
import type { BlockOverrides } from '@riverbankcms/sdk/rendering';
|
|
173
|
-
import { OurFlowBlock } from '@/components/OurFlowBlock';
|
|
174
|
-
|
|
175
|
-
export const blockOverrides: BlockOverrides = {
|
|
176
|
-
'custom.our-flow': OurFlowBlock,
|
|
177
|
-
};
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Step 5: Push Config
|
|
181
|
-
|
|
182
|
-
Push the configuration to make the block available in the CMS:
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
riverbankcms push-config
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Step 6: Test with Preview
|
|
189
|
-
|
|
190
|
-
Preview your block with sample data:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
riverbankcms preview custom.our-flow \
|
|
194
|
-
--data '{"title": "Our Process", "steps": [{"title": "Step 1"}, {"title": "Step 2"}]}' \
|
|
195
|
-
--open
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Step 7: Create Content
|
|
199
|
-
|
|
200
|
-
Add the block to a page:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
riverbankcms block upsert services process-flow \
|
|
204
|
-
--kind custom.our-flow \
|
|
205
|
-
--data '{"title": "How We Work", "steps": [{"title": "Discovery"}, {"title": "Design"}, {"title": "Deliver"}]}'
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
## Field Types Reference
|
|
209
|
-
|
|
210
|
-
### text
|
|
211
|
-
|
|
212
|
-
```typescript
|
|
213
|
-
{
|
|
214
|
-
id: 'title',
|
|
215
|
-
type: 'text',
|
|
216
|
-
label: 'Title',
|
|
217
|
-
required: true,
|
|
218
|
-
multiline: false, // Single line (default) or textarea
|
|
219
|
-
maxLength: 100, // Optional max characters
|
|
220
|
-
description: 'Helpful hint for editors',
|
|
221
|
-
defaultValue: 'Default',
|
|
222
|
-
}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### richText
|
|
226
|
-
|
|
227
|
-
```typescript
|
|
228
|
-
{
|
|
229
|
-
id: 'content',
|
|
230
|
-
type: 'richText',
|
|
231
|
-
label: 'Content',
|
|
232
|
-
format: 'html', // 'html' or 'markdown'
|
|
233
|
-
required: true,
|
|
234
|
-
}
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### select
|
|
238
|
-
|
|
239
|
-
```typescript
|
|
240
|
-
{
|
|
241
|
-
id: 'variant',
|
|
242
|
-
type: 'select',
|
|
243
|
-
label: 'Variant',
|
|
244
|
-
options: [
|
|
245
|
-
{ value: 'grid', label: 'Grid Layout' },
|
|
246
|
-
{ value: 'list', label: 'List Layout' },
|
|
247
|
-
],
|
|
248
|
-
defaultValue: 'grid',
|
|
249
|
-
multiple: false, // Single or multi-select
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### media
|
|
254
|
-
|
|
255
|
-
```typescript
|
|
256
|
-
{
|
|
257
|
-
id: 'image',
|
|
258
|
-
type: 'media',
|
|
259
|
-
label: 'Featured Image',
|
|
260
|
-
mediaKinds: ['image'], // ['image'], ['video'], or ['image', 'video']
|
|
261
|
-
required: false,
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### repeater
|
|
266
|
-
|
|
267
|
-
```typescript
|
|
268
|
-
{
|
|
269
|
-
id: 'items',
|
|
270
|
-
type: 'repeater',
|
|
271
|
-
label: 'Items',
|
|
272
|
-
itemLabel: 'Item',
|
|
273
|
-
minItems: 1,
|
|
274
|
-
maxItems: 10,
|
|
275
|
-
schema: {
|
|
276
|
-
fields: [
|
|
277
|
-
{ id: 'title', type: 'text', label: 'Title', required: true },
|
|
278
|
-
{ id: 'description', type: 'text', label: 'Description', multiline: true },
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
}
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### Conditional Fields
|
|
285
|
-
|
|
286
|
-
Show/hide fields based on other values:
|
|
287
|
-
|
|
288
|
-
```typescript
|
|
289
|
-
{
|
|
290
|
-
id: 'buttonLink',
|
|
291
|
-
type: 'link',
|
|
292
|
-
label: 'Button Link',
|
|
293
|
-
ui: {
|
|
294
|
-
visibleWhen: {
|
|
295
|
-
field: 'buttonAction',
|
|
296
|
-
equals: 'link',
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
}
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
## Complete Examples
|
|
303
|
-
|
|
304
|
-
### Example 1: Color Tiles (Grid Layout)
|
|
305
|
-
|
|
306
|
-
A grid of colored tiles with configurable columns:
|
|
307
|
-
|
|
308
|
-
```typescript
|
|
309
|
-
{
|
|
310
|
-
id: 'custom.color-tiles',
|
|
311
|
-
title: 'Color Tiles',
|
|
312
|
-
description: 'Grid of solid color tiles with decorative icons',
|
|
313
|
-
category: 'content',
|
|
314
|
-
icon: 'LayoutGrid',
|
|
315
|
-
tags: ['tiles', 'grid', 'cards'],
|
|
316
|
-
fields: [
|
|
317
|
-
{ id: 'heading', type: 'text', label: 'Heading' },
|
|
318
|
-
{ id: 'subheading', type: 'text', label: 'Subheading', multiline: true },
|
|
319
|
-
{
|
|
320
|
-
id: 'columns',
|
|
321
|
-
type: 'select',
|
|
322
|
-
label: 'Columns',
|
|
323
|
-
options: [
|
|
324
|
-
{ value: '2', label: '2 columns' },
|
|
325
|
-
{ value: '3', label: '3 columns' },
|
|
326
|
-
],
|
|
327
|
-
defaultValue: '2',
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
id: 'tiles',
|
|
331
|
-
type: 'repeater',
|
|
332
|
-
label: 'Tiles',
|
|
333
|
-
itemLabel: 'Tile',
|
|
334
|
-
minItems: 2,
|
|
335
|
-
maxItems: 6,
|
|
336
|
-
schema: {
|
|
337
|
-
fields: [
|
|
338
|
-
{ id: 'title', type: 'text', label: 'Title', required: true },
|
|
339
|
-
{ id: 'description', type: 'text', label: 'Description', multiline: true },
|
|
340
|
-
],
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
],
|
|
344
|
-
}
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### Example 2: Pricing Tiers (Complex Marketing Block)
|
|
348
|
-
|
|
349
|
-
Pricing cards with nested features and conditional button actions:
|
|
350
|
-
|
|
351
|
-
```typescript
|
|
352
|
-
{
|
|
353
|
-
id: 'custom.pricing-tiers',
|
|
354
|
-
title: 'Pricing Tiers',
|
|
355
|
-
description: 'Pricing comparison cards with features and CTAs',
|
|
356
|
-
category: 'marketing',
|
|
357
|
-
icon: 'CreditCard',
|
|
358
|
-
tags: ['pricing', 'tiers', 'comparison'],
|
|
359
|
-
fields: [
|
|
360
|
-
{ id: 'heading', type: 'text', label: 'Heading' },
|
|
361
|
-
{ id: 'subheading', type: 'text', label: 'Subheading', multiline: true },
|
|
362
|
-
{
|
|
363
|
-
id: 'showButtons',
|
|
364
|
-
type: 'boolean',
|
|
365
|
-
label: 'Show CTA buttons',
|
|
366
|
-
defaultValue: true,
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
id: 'tiers',
|
|
370
|
-
type: 'repeater',
|
|
371
|
-
label: 'Pricing Tiers',
|
|
372
|
-
itemLabel: 'Tier',
|
|
373
|
-
minItems: 2,
|
|
374
|
-
maxItems: 3,
|
|
375
|
-
schema: {
|
|
376
|
-
fields: [
|
|
377
|
-
{ id: 'title', type: 'text', label: 'Title', required: true },
|
|
378
|
-
{ id: 'price', type: 'text', label: 'Price', required: true },
|
|
379
|
-
{ id: 'description', type: 'text', label: 'Description', multiline: true },
|
|
380
|
-
{
|
|
381
|
-
id: 'color',
|
|
382
|
-
type: 'select',
|
|
383
|
-
label: 'Accent Color',
|
|
384
|
-
options: [
|
|
385
|
-
{ value: 'green', label: 'Green' },
|
|
386
|
-
{ value: 'tan', label: 'Tan' },
|
|
387
|
-
{ value: 'teal', label: 'Teal' },
|
|
388
|
-
],
|
|
389
|
-
defaultValue: 'green',
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
id: 'features',
|
|
393
|
-
type: 'repeater',
|
|
394
|
-
label: 'Features',
|
|
395
|
-
itemLabel: 'Feature',
|
|
396
|
-
minItems: 1,
|
|
397
|
-
maxItems: 10,
|
|
398
|
-
schema: {
|
|
399
|
-
fields: [
|
|
400
|
-
{ id: 'text', type: 'text', label: 'Feature text', required: true },
|
|
401
|
-
{ id: 'included', type: 'boolean', label: 'Included', defaultValue: true },
|
|
402
|
-
],
|
|
403
|
-
},
|
|
404
|
-
},
|
|
405
|
-
{ id: 'buttonLabel', type: 'text', label: 'Button Label', defaultValue: 'Get a quote' },
|
|
406
|
-
{
|
|
407
|
-
id: 'buttonAction',
|
|
408
|
-
type: 'select',
|
|
409
|
-
label: 'Button Action',
|
|
410
|
-
options: [
|
|
411
|
-
{ value: 'quote', label: 'Open Quote Form' },
|
|
412
|
-
{ value: 'link', label: 'Link to page' },
|
|
413
|
-
],
|
|
414
|
-
defaultValue: 'quote',
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
id: 'buttonLink',
|
|
418
|
-
type: 'link',
|
|
419
|
-
label: 'Button Link',
|
|
420
|
-
ui: {
|
|
421
|
-
visibleWhen: {
|
|
422
|
-
field: 'buttonAction',
|
|
423
|
-
equals: 'link',
|
|
424
|
-
},
|
|
425
|
-
},
|
|
426
|
-
},
|
|
427
|
-
],
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
],
|
|
431
|
-
}
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
## Block Configuration Options
|
|
435
|
-
|
|
436
|
-
| Property | Description |
|
|
437
|
-
|----------|-------------|
|
|
438
|
-
| `id` | Unique identifier, must start with `custom.` |
|
|
439
|
-
| `title` | Display name in CMS |
|
|
440
|
-
| `description` | Helpful description for editors |
|
|
441
|
-
| `category` | `'content'`, `'marketing'`, `'media'`, etc. |
|
|
442
|
-
| `icon` | Lucide icon name (e.g., `'Workflow'`, `'CreditCard'`) |
|
|
443
|
-
| `tags` | Searchable tags for block picker |
|
|
444
|
-
| `fields` | Array of field definitions |
|
|
445
|
-
|
|
446
|
-
## Troubleshooting
|
|
447
|
-
|
|
448
|
-
### Block not appearing in CMS
|
|
449
|
-
|
|
450
|
-
- Verify the ID starts with `custom.`
|
|
451
|
-
- Run `riverbankcms push-config` to sync
|
|
452
|
-
- Check for syntax errors in config
|
|
453
|
-
|
|
454
|
-
### Component not rendering
|
|
455
|
-
|
|
456
|
-
- Verify override is registered with exact block ID
|
|
457
|
-
- Check the key in `blockOverrides` matches (e.g., `'custom.our-flow'`)
|
|
458
|
-
- Ensure component is exported correctly
|
|
459
|
-
|
|
460
|
-
### Repeater items not working
|
|
461
|
-
|
|
462
|
-
- Verify `schema.fields` is properly defined
|
|
463
|
-
- Check `minItems` and `maxItems` constraints
|
|
464
|
-
- Ensure repeater field has unique `id`
|
|
465
|
-
|
|
466
|
-
### Type errors in component
|
|
467
|
-
|
|
468
|
-
- Create an interface matching your field structure
|
|
469
|
-
- Use `BlockOverrideProps<YourContentType>`
|
|
470
|
-
- Handle optional fields with defaults or conditionals
|