docs: add comprehensive CMS documentation
Add complete documentation for the Content Management System: Feature Documentation (docs/features/): - content-management-system.md - Complete CMS overview * Two-tier architecture explanation * Database schema and relationships * API reference for all endpoints * Usage workflows for admin/vendor/customer * Best practices and examples - cms-implementation-guide.md - Step-by-step implementation * Activation checklist * Code integration instructions * Testing procedures * Troubleshooting guide Quick Start Guide (docs/getting-started/): - cms-quick-start.md - Quick reference * Setup commands * Access URLs * Managing content (API, admin panel, vendor dashboard) * Two-tier system explained with examples * Common tasks and troubleshooting Updated Seeder Docs: - Add CMS to enhanced seeder coverage list - Add dedicated CMS section with table of pages - Document integration with db-setup workflow - Update best practices MkDocs Configuration: - Add "Features" section with CMS documentation - Add CMS Quick Start to "Getting Started" - Add CDN Fallback Strategy to "Frontend Development" - Complete navigation structure All documentation builds cleanly with no warnings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ I've created a comprehensive database seeder for your Wizamart platform that sig
|
||||
- ✓ Import jobs
|
||||
- ✓ Admin settings (platform configuration)
|
||||
- ✓ Platform alerts (system monitoring)
|
||||
- ✓ **CMS Content Pages** (platform defaults: about, contact, FAQ, shipping, returns, privacy, terms)
|
||||
|
||||
## Files Created
|
||||
|
||||
@@ -352,12 +353,64 @@ source venv/bin/activate # Linux/Mac
|
||||
venv\Scripts\activate # Windows
|
||||
```
|
||||
|
||||
## CMS Content Pages
|
||||
|
||||
The platform includes a comprehensive CMS (Content Management System) for managing static content pages.
|
||||
|
||||
### Creating Default CMS Pages
|
||||
|
||||
To create platform-level default content pages (About, Contact, FAQ, Shipping, Returns, Privacy, Terms):
|
||||
|
||||
```bash
|
||||
make create-cms-defaults
|
||||
# or
|
||||
python scripts/create_default_content_pages.py
|
||||
```
|
||||
|
||||
This creates 7 platform default pages that all vendors inherit:
|
||||
|
||||
| Slug | Title | Show in Footer | Show in Header |
|
||||
|------|-------|----------------|----------------|
|
||||
| about | About Us | ✓ | ✓ |
|
||||
| contact | Contact Us | ✓ | ✓ |
|
||||
| faq | Frequently Asked Questions | ✓ | ✗ |
|
||||
| shipping | Shipping Policy | ✓ | ✗ |
|
||||
| returns | Return & Refund Policy | ✓ | ✗ |
|
||||
| privacy | Privacy Policy | ✓ | ✗ |
|
||||
| terms | Terms of Service | ✓ | ✗ |
|
||||
|
||||
**Features:**
|
||||
- **Platform Defaults**: Created with `vendor_id=NULL`, available to all vendors
|
||||
- **Vendor Overrides**: Vendors can create custom versions with the same slug
|
||||
- **Automatic Fallback**: System checks vendor override first, falls back to platform default
|
||||
- **Navigation**: Pages marked with `show_in_footer` appear in shop footer automatically
|
||||
- **Idempotent**: Script skips pages that already exist
|
||||
|
||||
**Access URLs:**
|
||||
- `/about` - About Us page
|
||||
- `/contact` - Contact page
|
||||
- `/faq` - FAQ page
|
||||
- `/shipping` - Shipping Policy
|
||||
- `/returns` - Return Policy
|
||||
- `/privacy` - Privacy Policy
|
||||
- `/terms` - Terms of Service
|
||||
|
||||
### Integration with db-setup
|
||||
|
||||
The `make db-setup` command automatically includes CMS defaults:
|
||||
|
||||
```bash
|
||||
make db-setup
|
||||
# Runs: migrate-up → init-prod → create-cms-defaults → seed-demo
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Development**: Use `make seed` for full test data
|
||||
2. **Quick Testing**: Use `make seed-minimal` for fast setup
|
||||
3. **Fresh Start**: Use `make seed-reset` when testing migrations
|
||||
4. **Production**: Never run the seeder in production!
|
||||
4. **CMS Pages**: Run `make create-cms-defaults` after migrations
|
||||
5. **Production**: Never run the seeder in production!
|
||||
|
||||
## Security Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user