Overview
This example demonstrates building a content dashboard that:- Displays all content entries from Contentful
- Allows creating, editing, and publishing content
- Shows content status (draft, published)
- Provides content analytics and insights
Prerequisites
- Contentful integration configured in HelloLeo
- Contentful space with content types set up
- CMA token with read/write permissions
Step-by-Step Guide
1. Set Up the Integration
First, ensure your Contentful integration is configured:- Go to Project Settings → Project Integrations
- Select Contentful and enter your CMA token
- Test the connection
2. Create the Dashboard Overview
Start by creating a dashboard that shows content statistics:3. Display Content List
Create a page to list all content entries:4. Create Content Entry Form
Build a form to create new content:5. Edit Content Entry
Create an edit page for existing content:6. Publish/Unpublish Content
Add publishing functionality:7. Content Preview
Add preview functionality:Example Prompts
Initial Setup
Enhancements
Key Contentful Concepts
- Entries - Individual content items
- Content Types - Schema definitions for entries
- Assets - Media files (images, videos, etc.)
- Spaces - Contentful workspaces
- Environments - Content versions (master, staging, etc.)
Best Practices
- Content Types: Always specify which content type you’re working with
- Draft vs Published: Use Contentful’s draft/published states appropriately
- Validation: Validate required fields before saving
- Error Handling: Handle Contentful API errors gracefully
- Performance: Use pagination for large content lists
Next Steps
- Add content scheduling for future publication
- Implement content versioning and rollback
- Add content approval workflow
- Create content templates for quick creation
- Integrate with image optimization services
