contentstack-kickstart

โดย contentstack

Contentstack Delivery SDK, ตัวแปรสภาพแวดล้อม, Live Preview, และโมเดลหน้าที่ถูกซีดในคิกสตาร์ตนี้

npx skills add https://github.com/contentstack/kickstart-next-ssg --skill contentstack-kickstart

Contentstack kickstart – kickstart-next-ssg

When to use

  • Changing how the app fetches or displays CMS content
  • Debugging Live Preview or Visual Builder integration
  • Extending TypeScript types for new fields or content types

Instructions

Entry points

Stack configuration

  • Built with @contentstack/delivery-sdk contentstack.stack({ ... }) using NEXT_PUBLIC_CONTENTSTACK_API_KEY, NEXT_PUBLIC_CONTENTSTACK_DELIVERY_TOKEN, NEXT_PUBLIC_CONTENTSTACK_ENVIRONMENT, and region-related settings.
  • Optional overrides for hosts/CDN (internal or custom): NEXT_PUBLIC_CONTENTSTACK_CONTENT_DELIVERY, NEXT_PUBLIC_CONTENTSTACK_PREVIEW_HOST, NEXT_PUBLIC_CONTENTSTACK_CONTENT_APPLICATION, NEXT_PUBLIC_CONTENTSTACK_PREVIEW (boolean string), NEXT_PUBLIC_CONTENTSTACK_PREVIEW_TOKEN.
  • Region resolution uses helpers from @timbenniks/contentstack-endpoints aligned with NEXT_PUBLIC_CONTENTSTACK_REGION.

Fetching content

  • getPage(url) queries content type page, field url, equality match via QueryOperation.EQUALS, then returns the first entry.
  • When NEXT_PUBLIC_CONTENTSTACK_PREVIEW === 'true', contentstack.Utils.addEditableTags is applied to the entry for in-editor overlays.

Live Preview (client)

  • pages/index.tsx: initLivePreview() runs in useEffect; ContentstackLivePreview.onEntryChange refetches the home page so the UI updates in preview.
  • initLivePreview in lib/contentstack.ts uses @contentstack/live-preview-utils with mode: "builder", stack details from env, optional application host from env/endpoints, and edit button enabled (with outsideLivePreviewPortal excluded).

Seeded stack and tokens

  • CLI seed and token setup are documented in root README.md (delivery token with preview scope, Live Preview environment).

Images and URLs

  • Remote image hostnames for next/image are configured in next.config.mjs; optional NEXT_PUBLIC_CONTENTSTACK_IMAGE_HOSTNAME narrows or replaces defaults.

Skills เพิ่มเติมจาก contentstack

cms-assets
contentstack
ให้คำแนะนำนักพัฒนาเกี่ยวกับการจัดระเบียบ การส่งมอบ และการแปลง assets ใน Contentstack ครอบคลุมโครงสร้างโฟลเดอร์ การแปลงผ่าน Image Delivery API การเผยแพร่…
cms-branches-aliases
contentstack
แนะนำนักพัฒนาเกี่ยวกับการใช้ branches ของ Contentstack สำหรับการพัฒนาคอนเทนต์แบบแยกส่วน และ aliases สำหรับการ部署คอนเทนต์โดยไม่มีการหยุดให้บริการ ครอบคลุมกลยุทธ์การจัดการ branches และ…
cms-data-modeling-best-practices
contentstack
แนะนำนักพัฒนาในการออกแบบโมเดลเนื้อหาใน Contentstack โดยใช้โครงสร้างที่เรียบง่ายที่สุดและสามารถนำกลับมาใช้ใหม่ได้ สกิลนี้อธิบายว่าควรใช้ content types, references, global… เมื่อใด
cms-live-preview-visual-builder-support-assistant
contentstack
วินิจฉัยและแนะนำการติดตั้ง Contentstack Live Preview และ Visual Builder ตรวจสอบบริบทตัวอย่าง ระบุสัญญาที่ขาด และแนะนำ…
cms-releases
contentstack
แนะนำนักพัฒนาเกี่ยวกับการใช้ Contentstack Releases สำหรับการปรับใช้เนื้อหาแบบประสานงานและเป็นอะตอมมิก ครอบคลุมการสร้างรีลีส การจัดการไอเทม การปรับใช้แบบเป็นขั้นตอน…
cms-roles-permissions
contentstack
ให้คำแนะนำนักพัฒนาเกี่ยวกับการออกแบบบทบาท สิทธิ์ ทีม และการเข้าถึงโทเค็นใน Contentstack อธิบายบทบาทในตัว บทบาทที่กำหนดเอง การรวมสิทธิ์…
cms-taxonomy
contentstack
ให้คำแนะนำนักพัฒนาเกี่ยวกับการใช้ Contentstack Taxonomy สำหรับการจำแนกเนื้อหาที่มีโครงสร้างและเป็นลำดับชั้น รวมถึงการกรองฝั่งดีลิเวอรี ครอบคลุม taxonomy เทียบกับ tags,…
cms-tokens-authentication
contentstack
แนะนำนักพัฒนาในการเลือกวิธีการรับรองความถูกต้องและประเภทโทเค็นของ Contentstack ที่เหมาะสมสำหรับกรณีการใช้งาน frontend, backend, automation และแอปพลิเคชันของบุคคลที่สาม…