Commit graph

7 commits

Author SHA1 Message Date
spf13 07f2ef9c5e Page Group functions now work even when an uppercase field / method is provided. 2014-11-04 00:31:57 -05:00
Tatsushi Demachi 5e28606b84 Add sort and grouping functions for publish date and param of Page
`GroupBy` is modified to allow it to receive a method name argument for
example `Type` as its first argument. It is only allowed to call with
a method which takes no arguments and returns a result or a pair of
a result and an error.

The functions discussed at #443 are also added

- `ByPublishDate`: Order contents by `PublishDate` front matter variable
- `GroupByPublishDate(format, order)`: Group contents by `PublishDate`
  front matter variable formatted in string like `GroupByDate`
- `GroupByParam(key, order)`: Group contents by `Param` front matter
  variable specified by `key` argument
- `GroupByParamDate(key, format, order)`: Group contents by `Param`
  front matter variable specified by `key` argument and formatted in
  string like `GroupByDate`. It's effective against `time.Time` type
  front matter variable
2014-11-01 22:41:04 -04:00
spf13 5dfc1dedb8 Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
spf13 7e19fa40e7 Making direction optional (and setting defaults) for GroupBy Pages functionality. 2014-08-29 23:51:29 -04:00
spf13 b15eb889e8 Adding .Reverse() to PagesGroup 2014-08-29 23:50:25 -04:00
spf13 41b28462e8 Switch .Data to .Pages in the PageGroup functionality for increased consistency. 2014-08-29 23:48:24 -04:00
Tatsushi Demachi 50a8c50726 Add page grouping functions 2014-08-25 09:18:52 -04:00