Commit graph

2 commits

Author SHA1 Message Date
Ed Page
d280a35329 feat(liquid): Generalize is_post / posts
`page.collection` contains the collection slug which is `posts` for,
well, the built-in posts collection.

`collections.posts.pages` is a sorted list of all of the pages that are
part of the posts collection.

Fixes #323

BREAKING CHANGES:

`page.is_post` is replaced by `page.collection`.  Generally, it'll look like
`{% if page.is_post %}`
and can be replaced by
`{% if page.collection == "posts" %}`

`posts` is replaced by `collections.posts.pages`.  Generally, it'll look
like
`{% for post in posts %}`
and can be replaced by
`{% for post in collections.posts.pages %}`

`cobalt migrate` should do this for you.
2018-01-03 21:01:34 -07:00
Uwe Arzt
291229bffb Posts in subdirs (#185) 2017-02-09 23:50:09 +01:00