- Introduced a new AI function `generate_page_content` to create structured content for website pages using JSON blocks. - Updated `AIEngine` to handle the new function and return appropriate messages for content generation. - Enhanced `PageGenerationService` to utilize the new AI function for generating page content based on blueprints. - Modified `prompts.py` to include detailed content generation requirements for the new function. - Updated site rendering logic to accommodate structured content blocks in various layouts.
3.4 KiB
3.4 KiB
Site Deployment Guide
How Site Deployment Works
Overview
When you deploy a site blueprint, the system:
- Builds a site definition (merging Content from Writer into PageBlueprint blocks)
- Writes it to the filesystem at
/data/app/sites-data/clients/{site_id}/v{version}/ - The Sites Renderer reads from this filesystem to serve the public site
Deployment Process
Step 1: Prepare Your Site
- Generate Structure: Create site blueprint with pages (has placeholder blocks)
- Generate Content: Pages → Tasks → Content (Writer generates real content)
- Publish Content: In Content Manager, set Content status to
'publish'for each page - Publish Pages: In Page Manager, set Page status to
'published'(for navigation)
Step 2: Deploy the Blueprint
API Endpoint: POST /api/v1/publisher/deploy/{blueprint_id}/
What Happens:
SitesRendererAdapter.deploy()is called- For each page, it finds the associated Writer Task
- If Content exists and is published, it uses
Content.json_blocksinstead of blueprint placeholders - Builds complete site definition with all pages
- Writes to filesystem:
/data/app/sites-data/clients/{site_id}/v{version}/site.json - Creates deployment record
Step 3: Access Your Site
Public URL: https://sites.igny8.com/{siteSlug}
How It Works:
- Sites Renderer loads site definition from filesystem (or API fallback)
- Shows navigation menu with all published pages
- Home route (
/siteSlug) shows only home page content - Page routes (
/siteSlug/pageSlug) show specific page content
Navigation Menu
The navigation menu automatically includes:
- Home link (always shown)
- All pages with status
'published'or'ready'(excluding home) - Pages are sorted by their
orderfield
Page Routing
- Homepage:
https://sites.igny8.com/{siteSlug}→ Shows home page only - Individual Pages:
https://sites.igny8.com/{siteSlug}/{pageSlug}→ Shows that specific page- Example:
https://sites.igny8.com/auto-g8/products - Example:
https://sites.igny8.com/auto-g8/blog
- Example:
Content Merging
When deploying:
- If Content is published: Uses
Content.json_blocks(actual written content) - If Content not published: Uses
PageBlueprint.blocks_json(placeholder blocks) - Content takes precedence: Published Content always replaces blueprint placeholders
Important Notes
-
Two Statuses:
PageBlueprint.status = 'published'→ Controls page visibility in navigationContent.status = 'publish'→ Controls which content is used (real vs placeholder)
-
Redeploy Required: After publishing Content, you must redeploy the site for changes to appear
-
All Pages Deployed: The deployment includes ALL pages from the blueprint, but only published pages show in navigation
-
Navigation Auto-Generated: If no explicit navigation is set in blueprint, it auto-generates from published pages
Troubleshooting
Problem: Navigation only shows "Home"
- Solution: Make sure other pages have status
'published'or'ready'in Page Manager
Problem: Pages show placeholder content instead of real content
- Solution:
- Check Content status is
'publish'in Content Manager - Redeploy the site blueprint
- Check Content status is
Problem: Pages not accessible via URL
- Solution: Make sure pages have status
'published'or'ready'and the site is deployed