diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-04-07 10:43:48 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-04-07 10:43:48 +0200 |
commit | af99a59021cc1231d5afa79f4ab17d34f39260fc (patch) | |
tree | 4f9949a87257b14bdc59bbb0b55acf8ed6b6149a /output/outputFormat.go | |
parent | 260b55ea56ea8998431aca2b80d2b1e47c6a31c3 (diff) | |
download | hugo-af99a59021cc1231d5afa79f4ab17d34f39260fc.tar.gz hugo-af99a59021cc1231d5afa79f4ab17d34f39260fc.zip |
output: Add some sane defaults for output format
Fixes #3290
Diffstat (limited to 'output/outputFormat.go')
-rw-r--r-- | output/outputFormat.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index 4a95c1c70..ed3426411 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -241,6 +241,14 @@ func DecodeFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Form return f, err } + // We need values for these + if newOutFormat.BaseName == "" { + newOutFormat.BaseName = "index" + } + if newOutFormat.Rel == "" { + newOutFormat.Rel = "alternate" + } + f = append(f, newOutFormat) } } |