summaryrefslogtreecommitdiffstats
path: root/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index 3119352..7c38341 100644
--- a/config/config.go
+++ b/config/config.go
@@ -3,6 +3,7 @@ package config
import (
"fmt"
"os"
+ "path/filepath"
"gopkg.in/yaml.v3"
)
@@ -40,5 +41,15 @@ func Read(f string) (*Config, error) {
return nil, fmt.Errorf("parsing config: %w", err)
}
+ if c.Repo.ScanPath, err = filepath.Abs(c.Repo.ScanPath); err != nil {
+ return nil, err
+ }
+ if c.Dirs.Templates, err = filepath.Abs(c.Dirs.Templates); err != nil {
+ return nil, err
+ }
+ if c.Dirs.Static, err = filepath.Abs(c.Dirs.Static); err != nil {
+ return nil, err
+ }
+
return &c, nil
}