Remove internal/content package and use engine directly

- Eliminate content.Enhancer wrapper around engine.ContentEngine
- Update cmd/enhance.go to call engine.ProcessFile/ProcessDirectory directly
- Update sites/manager.go to use engine.NewContentEngineWithAuth directly
- Remove unused EnhancementConfig and discovery configuration logic
- Simplify enhance command to use input path as site ID
- Remove CLI config dependency from config package
This commit is contained in:
2025-10-23 22:32:42 +02:00
parent 4874849f80
commit dc801fb26b
6 changed files with 16 additions and 258 deletions

View File

@@ -3,7 +3,6 @@ package config
type Config struct {
Database DatabaseConfig `yaml:"database" mapstructure:"database"`
API APIConfig `yaml:"api" mapstructure:"api"`
CLI CLIConfig `yaml:"cli" mapstructure:"cli"`
Server ServerConfig `yaml:"server" mapstructure:"server"`
Auth AuthConfig `yaml:"auth" mapstructure:"auth"`
Library LibraryConfig `yaml:"library" mapstructure:"library"`
@@ -18,10 +17,6 @@ type APIConfig struct {
Key string `yaml:"key" mapstructure:"key"`
}
type CLIConfig struct {
SiteID string `yaml:"site_id" mapstructure:"site_id"`
}
type ServerConfig struct {
Port int `yaml:"port" mapstructure:"port"`
Host string `yaml:"host" mapstructure:"host"`
@@ -29,18 +24,10 @@ type ServerConfig struct {
}
type AuthConfig struct {
DevMode bool `yaml:"dev_mode" mapstructure:"dev_mode"`
Provider string `yaml:"provider" mapstructure:"provider"`
JWTSecret string `yaml:"jwt_secret" mapstructure:"jwt_secret"`
OAuthConfigs map[string]OAuthConfig `yaml:"oauth_configs" mapstructure:"oauth_configs"`
OIDC *OIDCConfig `yaml:"oidc" mapstructure:"oidc"`
}
type OAuthConfig struct {
ClientID string `yaml:"client_id" mapstructure:"client_id"`
ClientSecret string `yaml:"client_secret" mapstructure:"client_secret"`
RedirectURL string `yaml:"redirect_url" mapstructure:"redirect_url"`
Scopes []string `yaml:"scopes" mapstructure:"scopes"`
DevMode bool `yaml:"dev_mode" mapstructure:"dev_mode"`
Provider string `yaml:"provider" mapstructure:"provider"`
JWTSecret string `yaml:"jwt_secret" mapstructure:"jwt_secret"`
OIDC *OIDCConfig `yaml:"oidc" mapstructure:"oidc"`
}
type OIDCConfig struct {