diff options
Diffstat (limited to 'hugolib/fileInfo.go')
-rw-r--r-- | hugolib/fileInfo.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hugolib/fileInfo.go b/hugolib/fileInfo.go index 582d2be8c..b146aede9 100644 --- a/hugolib/fileInfo.go +++ b/hugolib/fileInfo.go @@ -31,6 +31,9 @@ type fileInfo struct { bundleTp bundleDirType source.ReadableFile overriddenLang string + + // Set if the content language for this file is disabled. + disabled bool } func (fi *fileInfo) Lang() string { @@ -60,6 +63,9 @@ func newFileInfo(sp *source.SourceSpec, baseDir, filename string, fi os.FileInfo ReadableFile: baseFi, } + lang := f.Lang() + f.disabled = lang != "" && sp.DisabledLanguages[lang] + return f } |