feat: implement server-hosted static site enhancement with real-time content updates
- Add SiteManager for registering and managing static sites with file-based enhancement - Implement EnhanceInPlace method for in-place file modification using database content - Integrate automatic file enhancement triggers in UpdateContent API handler - Add comprehensive site configuration support in insertr.yaml with auto-enhancement - Extend serve command to automatically register and manage configured sites - Add backup system for original files before enhancement - Support multi-site hosting with individual auto-enhancement settings - Update documentation for server-hosted enhancement workflow This enables real-time content deployment where database content changes immediately update static files without requiring rebuilds or redeployment. The database remains the single source of truth while maintaining static file performance benefits.
This commit is contained in:
24
insertr.yaml
24
insertr.yaml
@@ -11,6 +11,18 @@ database:
|
||||
# Server configuration (multi-site ready)
|
||||
server:
|
||||
port: 8080 # HTTP API server port
|
||||
sites: # Registered sites for file-based enhancement
|
||||
- site_id: "demo"
|
||||
path: "./demo-site"
|
||||
domain: "localhost:3000"
|
||||
auto_enhance: true
|
||||
backup_originals: true
|
||||
# Example additional site configuration:
|
||||
# - site_id: "mysite"
|
||||
# path: "/var/www/mysite"
|
||||
# domain: "mysite.example.com"
|
||||
# auto_enhance: true
|
||||
# backup_originals: true
|
||||
|
||||
# CLI enhancement configuration
|
||||
cli:
|
||||
@@ -20,4 +32,14 @@ cli:
|
||||
# API client configuration (for CLI remote mode)
|
||||
api:
|
||||
url: "" # Content API URL (empty = use local database)
|
||||
key: "" # API authentication key
|
||||
key: "" # API authentication key
|
||||
|
||||
# Authentication configuration
|
||||
auth:
|
||||
provider: "mock" # "mock", "jwt", "authentik"
|
||||
jwt_secret: "" # JWT signing secret (auto-generated in dev mode)
|
||||
# Authentik OIDC configuration (for production)
|
||||
oidc:
|
||||
endpoint: "" # https://auth.example.com/application/o/insertr/
|
||||
client_id: "" # insertr-client
|
||||
client_secret: "" # OAuth2 client secret
|
||||
Reference in New Issue
Block a user