summaryrefslogtreecommitdiffhomepage
path: root/source/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'source/file.go')
-rw-r--r--source/file.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/file.go b/source/file.go
index e2322bc4c..cbd83d17b 100644
--- a/source/file.go
+++ b/source/file.go
@@ -24,6 +24,7 @@ import (
"github.com/gohugoio/hugo/helpers"
)
+// SourceSpec abstracts language-specific file creation.
type SourceSpec struct {
Cfg config.Provider
Fs *hugofs.Fs
@@ -32,6 +33,7 @@ type SourceSpec struct {
defaultContentLanguage string
}
+// NewSourceSpec initializes SourceSpec using languages from a given configuration.
func NewSourceSpec(cfg config.Provider, fs *hugofs.Fs) SourceSpec {
defaultLang := cfg.GetString("defaultContentLanguage")
languages := cfg.GetStringMap("languages")