diff options
author | Bjørn Erik Pedersen <[email protected]> | 2016-08-08 10:12:39 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-09-06 18:32:18 +0300 |
commit | d953e39e63deac608e7f1442a6c0d5b2fe56180e (patch) | |
tree | 5633427e50fa6ad0a377893245c00505f12509d1 /hugolib/multilingual.go | |
parent | 9798a9567028b364f10027002eb0026767356828 (diff) | |
download | hugo-d953e39e63deac608e7f1442a6c0d5b2fe56180e.tar.gz hugo-d953e39e63deac608e7f1442a6c0d5b2fe56180e.zip |
Add parent as owner to Site
And pull up common member vars like Tmpl and Multilinguage.
Or: the final multilingual TODO-fixes.
See #2309
Diffstat (limited to 'hugolib/multilingual.go')
-rw-r--r-- | hugolib/multilingual.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hugolib/multilingual.go b/hugolib/multilingual.go index a9a2f256c..c59b3b649 100644 --- a/hugolib/multilingual.go +++ b/hugolib/multilingual.go @@ -72,7 +72,10 @@ func (ml *Multilingual) enabled() bool { } func (s *Site) multilingualEnabled() bool { - return s.Multilingual != nil && s.Multilingual.enabled() + if s.owner == nil { + return false + } + return s.owner.multilingual != nil && s.owner.multilingual.enabled() } func toSortedLanguages(l map[string]interface{}) (helpers.Languages, error) { |