summaryrefslogtreecommitdiffstats
path: root/source/dirs.go
diff options
context:
space:
mode:
Diffstat (limited to 'source/dirs.go')
-rw-r--r--source/dirs.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/dirs.go b/source/dirs.go
index 1e6850da7..49a849453 100644
--- a/source/dirs.go
+++ b/source/dirs.go
@@ -38,7 +38,7 @@ type Dirs struct {
staticDirs []string
AbsStaticDirs []string
- publishDir string
+ Language *helpers.Language
}
// NewDirs creates a new dirs with the given configuration and filesystem.
@@ -48,7 +48,12 @@ func NewDirs(fs *hugofs.Fs, cfg config.Provider, logger *jww.Notepad) (*Dirs, er
return nil, err
}
- d := &Dirs{pathSpec: ps, logger: logger}
+ var l *helpers.Language
+ if language, ok := cfg.(*helpers.Language); ok {
+ l = language
+ }
+
+ d := &Dirs{Language: l, pathSpec: ps, logger: logger}
return d, d.init(cfg)
@@ -96,8 +101,6 @@ func (d *Dirs) init(cfg config.Provider) error {
d.AbsStaticDirs[i] = d.pathSpec.AbsPathify(di) + helpers.FilePathSeparator
}
- d.publishDir = d.pathSpec.AbsPathify(cfg.GetString("publishDir")) + helpers.FilePathSeparator
-
return nil
}