diff --git a/resources/page/pagegroup.go b/resources/page/pagegroup.go index d4ca8ca41..e07efa7ca 100644 --- a/resources/page/pagegroup.go +++ b/resources/page/pagegroup.go @@ -316,7 +316,7 @@ func (p Pages) GroupByParamDate(key string, format string, order ...string) (Pag var r Pages for _, p := range pages { - param := resource.GetParamToLower(p, key) + param := resource.GetParam(p, key) var t time.Time if param != nil { diff --git a/resources/page/pagegroup_test.go b/resources/page/pagegroup_test.go index 218bd841d..ef0d24471 100644 --- a/resources/page/pagegroup_test.go +++ b/resources/page/pagegroup_test.go @@ -34,7 +34,8 @@ var pageGroupTestSources = []pageGroupTestObject{ {"/section1/testpage2.md", 3, "2012-01-01", "bar"}, {"/section1/testpage3.md", 2, "2012-04-06", "foo"}, {"/section2/testpage4.md", 1, "2012-03-02", "bar"}, - {"/section2/testpage5.md", 1, "2012-04-06", "baz"}, + // date might also be a full datetime: + {"/section2/testpage5.md", 1, "2012-04-06T00:00:00Z", "baz"}, } func preparePageGroupTestPages(t *testing.T) Pages {