contentstack-kickstart
Installation
SKILL.md
Contentstack kickstart – kickstart-next
When to use
- You are changing how the app talks to Contentstack (delivery, preview, regions, hosts).
- You are extending or fixing assumptions about the
pagecontent type or Live Preview field bindings.
Instructions
Entry points
- All stack configuration and fetching live in lib/contentstack.ts.
stack: created withcontentstack.stack()from@contentstack/delivery-sdk, using API key, delivery token, environment, region, optional customhost, andlive_previewoptions (preview token, preview host, enable flag).initLivePreview(): callsContentstackLivePreview.init()from@contentstack/live-preview-utilswithssr: false,mode: "builder", stack SDK/config, stack details, client URL params, and edit button settings.getPage(url): queries thepagecontent type, filtersurlwithQueryOperation.EQUALS, and returns the first entry typed asPagefrom lib/types.ts. WhenisPreviewis true, adds editable tags viacontentstack.Utils.addEditableTags().
Preview vs production routing
- app/page.tsx: if
isPreview(NEXT_PUBLIC_CONTENTSTACK_PREVIEW === "true"), render the client components/Preview.tsx withpath="/"; otherwise fetch withgetPage("/")on the server and render components/Page.tsx (imported asPage).