fix: disable auto-enhancement in development mode to prevent live-reload loops
- Add dev_mode parameter to SiteManager constructor - Modify IsAutoEnhanceEnabled() to return false when dev_mode is true - Update serve.go to pass dev_mode flag to SiteManager - Add ForceEnhanceEnabled() method for testing production behavior in development - Update documentation to explain development vs production mode behavior This fixes the development workflow where content updates would trigger file modifications that caused unwanted page reloads in live-server. Development mode: Content saved to database only, editor loads dynamically Production mode: Content saved + files enhanced for immediate static deployment
This commit is contained in:
@@ -73,7 +73,7 @@ func runServe(cmd *cobra.Command, args []string) {
|
||||
contentClient := content.NewDatabaseClient(database)
|
||||
|
||||
// Initialize site manager
|
||||
siteManager := content.NewSiteManager(contentClient, "./insertr-backups")
|
||||
siteManager := content.NewSiteManager(contentClient, "./insertr-backups", devMode)
|
||||
|
||||
// Load sites from configuration
|
||||
if siteConfigs := viper.Get("server.sites"); siteConfigs != nil {
|
||||
|
||||
Reference in New Issue
Block a user