about summary refs log tree commit diff stats
path: root/internal/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index 3c43812..c7b5659 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -99,7 +99,6 @@ func rebuild(builderConfig *builder.IOConfig, config *cfg.Config) error {
 
 func New(runtimeConfig *Config) (*Server, error) {
 	builderConfig := &builder.IOConfig{
-		Source:      "content",
 		Destination: runtimeConfig.Root,
 		Development: runtimeConfig.Development,
 	}
@@ -114,19 +113,19 @@ func New(runtimeConfig *Config) (*Server, error) {
 		if err != nil {
 			return nil, err
 		}
-		err = os.Chdir(vcsConfig.LocalPath)
+		err = os.Chdir(runtimeConfig.Root)
 		if err != nil {
 			return nil, err
 		}
 
-		builderConfig.Source = filepath.Join(vcsConfig.LocalPath, "content")
+		builderConfig.Source = vcsConfig.LocalPath
 
 		publicDir := filepath.Join(runtimeConfig.Root, "public")
 		builderConfig.Destination = publicDir
 		runtimeConfig.Root = publicDir
 	}
 
-	config, err := cfg.GetConfig()
+	config, err := cfg.GetConfig(builderConfig.Source)
 	if err != nil {
 		return nil, errors.WithMessage(err, "error parsing configuration file")
 	}