summaryrefslogtreecommitdiffhomepage
path: root/output/outputFormat.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-04-07 10:43:48 +0200
committerBjørn Erik Pedersen <[email protected]>2017-04-07 10:43:48 +0200
commitaf99a59021cc1231d5afa79f4ab17d34f39260fc (patch)
tree4f9949a87257b14bdc59bbb0b55acf8ed6b6149a /output/outputFormat.go
parent260b55ea56ea8998431aca2b80d2b1e47c6a31c3 (diff)
downloadhugo-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.go8
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)
}
}