hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit af99a59021cc1231d5afa79f4ab17d34f39260fc
parent 260b55ea56ea8998431aca2b80d2b1e47c6a31c3
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Fri,  7 Apr 2017 10:43:48 +0200

output: Add some sane defaults for output format

Fixes #3290

Diffstat:
Moutput/outputFormat.go | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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)
 			}
 		}