mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
@@ -505,6 +505,14 @@ date: 2017-01-15
|
||||
title: No Date
|
||||
---
|
||||
|
||||
`)
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5854
|
||||
b.WithSimpleConfigFile().WithContent("with-index-date/_index.md", `---
|
||||
title: Date
|
||||
date: 2018-01-15
|
||||
---
|
||||
|
||||
`)
|
||||
|
||||
b.CreateSites().Build(BuildCfg{})
|
||||
@@ -515,6 +523,7 @@ title: No Date
|
||||
assert.Equal(2017, s.getPage("/").Date().Year())
|
||||
assert.Equal(2017, s.getPage("/no-index").Date().Year())
|
||||
assert.True(s.getPage("/with-index-no-date").Date().IsZero())
|
||||
assert.Equal(2018, s.getPage("/with-index-date").Date().Year())
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user