Multiple Repositories
The module supports working with multiple Prismic repositories, allowing different stores or themes to use different content repositories.
Configuration
Enabling Multi-repo Support
- Go to Stores > Configuration > Elgentos > Prismic.IO
- Navigate to Multi Repository section
- Set "Enable Multiple Repositories" to "Yes"
- Configure the "Repository Field" setting
Repository Field
The repository field determines which Prismic field contains the repository information:
Implementation
Store-specific Repositories
Each store view can connect to a different Prismic repository:
- Switch to specific store view in admin
- Configure Prismic API endpoint for that store
- Set appropriate API token
Cache Considerations
When using multiple repositories:
-
Cache Flush Settings
-
Cache Tags
- Each repository gets unique cache tags
- Content types are prefixed with repository ID
- Cache is cleared per repository
Best Practices
- Repository Organization
- Use consistent content types across repos
- Document repository purposes
-
Consider content sharing needs
-
Performance
- Monitor API usage per repository
- Configure appropriate cache settings
-
Consider CDN implementation
-
Maintenance
- Keep repositories synchronized
- Document repository relationships
- Plan for content migrations
Troubleshooting
- Repository Connection
- Verify API endpoints
- Check access tokens
-
Confirm store assignments
-
Cache Issues
- Review cache configuration
- Check cache tags
-
Monitor cache storage
-
Content Sync
- Validate webhook setup
- Check repository field values
- Review store-specific settings