You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, only pages with a published_date are allowed in collections. Should this change?
there is already a use case for this: the unnamed travel blog that uses brut has a regular posts collection, but it also has a dozen country pages that would benefit from being a collection, because they could be rendered on a countrIES page using a mustache section. (Currently the countries metadata is manually added to the context in processContext.)
published_date is how collection pages are sorted. How should they be sorted otherwise? Alphabetically? What if some pages in a collection have a published_date, and others do not?
🚧 add more here 🚧
The text was updated successfully, but these errors were encountered:
Jekyll collections don't need published_dates and the docs explicitly states that they can be used e.g. to iterate over a collection of staff members. Sorting is by date if present in all items, otherwise it falls back to an alphabetical sorting by slug. Custom sorting is also an option
I like that it's possible to have collections without dates. It makes sense for a lot of content, in this case staff member pages, but could also be country pages on an unnamed travel blog
Eleventy uses frontmatter tags to generate collections (and they can be declared in config for faster builds). Collection pages can be anywhere in the directory. They are sorted by date, and all content is dated (falls back on file created date, with a bunch of caveats). Custom sorting is also an option but Eleventy recommends using date to sort collections (?!). All content is also included in an automatic all collection, which can be used to loop through all pages.
I don't think it's necessary to allow pages to be located anywhere
I don't like the weird all-pages-are-dated thing, I'd prefer using the published_date or a custom sort, and fall back to the slug
I'm not sure exactly what the all collection is used for, might be interesting to look at use cases 👀
Generally I think tags will be something different in brut. They can technically already be used via processContext: loop through pages and group them by anything you want in frontmatter. These are kind of manual collections. brut collections would probably stick closer to the fs and group things that are colocated in a given directory
Basic context and collections support were added in #34. There is clearly some room for iterations.
Some questions to get started:
context.<collection>
. Should it include all pages instead?including all pages would let authors build sitemap.xml files using templates (making Generate sitemaps on build #17 redundant), similar to how web feeds can now be built (see Generate web feeds #25)( 👉 sitemaps not happening, see Generate sitemaps on build #17 (comment))published_date
are allowed in collections. Should this change?The text was updated successfully, but these errors were encountered: