feat: implement auto-injection of insertr.js with site-specific configuration
• Add /insertr.js endpoint to serve JavaScript library from API server • Implement demo gate auto-injection for sites without existing gates • Add dynamic site ID injection using per-demo configuration files • Fix CORS middleware to support localhost origins on any port • Update demo commands to use individual insertr.yaml configs • Resolve content persistence issues by matching site IDs between injection and enhancement • Enable complete edit/save workflow for demo sites with proper namespace isolation
This commit is contained in:
27
test-sites/simple/test-simple/insertr.yaml
Normal file
27
test-sites/simple/test-simple/insertr.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Insertr Configuration for Simple Demo Site
|
||||
# Specific configuration for the simple test site demo
|
||||
|
||||
# Global settings
|
||||
dev_mode: true # Development mode for demos
|
||||
|
||||
# Database configuration
|
||||
database:
|
||||
path: "./insertr.db" # Shared database with main config
|
||||
|
||||
# Demo-specific configuration
|
||||
demo:
|
||||
site_id: "simple" # Unique site ID for simple demo
|
||||
inject_demo_gate: true # Auto-inject demo gate if no gates exist
|
||||
mock_auth: true # Use mock authentication for demos
|
||||
api_endpoint: "http://localhost:8080/api/content"
|
||||
demo_port: 3000 # Port for live-server
|
||||
|
||||
# CLI enhancement configuration
|
||||
cli:
|
||||
site_id: "simple" # Site ID for this demo
|
||||
output: "./simple-demo" # Output directory for enhanced files
|
||||
inject_demo_gate: true # Inject demo gate in development mode
|
||||
|
||||
# Authentication configuration (for demo)
|
||||
auth:
|
||||
provider: "mock" # Mock auth for demos
|
||||
Reference in New Issue
Block a user