diff options
author | Vas Sudanagunta <vas@commonkarma.org> | 2018-01-25 22:54:15 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-01-26 09:17:27 +0100 |
commit | 91bb774ae4e129f7ed0624754b31479c960ef774 (patch) | |
tree | 9c6d7628e9f5ec7c25842bb8609278da60ab2ec4 /commands/hugo.go | |
parent | 3f0379adb72389954ca2be6a9f2ebfcd65c6c440 (diff) |
Support pages without front matter
* Page without front matter now treated same as a page with empty front matter.
* Test cases added to cover this and repro issue #4320.
* Type safety of front matter code improved.
Fixes #4320
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 758106faf..c9f073483 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -1231,9 +1231,7 @@ func (c *commandeer) isThemeVsHugoVersionMismatch() (mismatch bool, requiredMinV return } - config := tomlMeta.(map[string]interface{}) - - if minVersion, ok := config["min_version"]; ok { + if minVersion, ok := tomlMeta["min_version"]; ok { return helpers.CompareVersion(minVersion) > 0, fmt.Sprint(minVersion) } |