Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Files in Collection #407

Closed
jholmes033169 opened this issue May 5, 2017 · 1 comment
Closed

Filter Files in Collection #407

jholmes033169 opened this issue May 5, 2017 · 1 comment

Comments

@jholmes033169
Copy link
Contributor

New behavior should be added to allow files to be filtered, within a collection, by markdown front matter attributes.

There are a number of use cases supporting the need for this feature. Many static file generators assemble all posts in a single folder... often a folder called "posts" or "_posts." However, any sophisticated blog may have multiple categories of posts... regular posts, landing pages, articles with minimal info, or articles requiring specific fields (author, address, category, etc.) that not all posts need.

Another case is simply to make writing articles easier on the poor folks who would otherwise have to look at hundreds of markdown files all grouped together. Filtered collections would allow them to see articles grouped by categories, even though they are in the same _posts directory.

The current behavior requires all articles to have all possible fields, when only a small subset of posts may need them.

@lmcorreia
Copy link
Contributor

This could also prove handy as a crude way of doing some i18n on the entries. Instead of looking up for similar entries in different languages in completely different ways (almost a different method per generator), we could use this to find entries with the same title but different language fields.

Will try to implement a little something in a jiffy.

lmcorreia pushed a commit to marzeelabs/netlify-cms that referenced this issue May 5, 2017
lmcorreia pushed a commit to marzeelabs/netlify-cms that referenced this issue May 12, 2017
lmcorreia pushed a commit to marzeelabs/netlify-cms that referenced this issue May 12, 2017
lmcorreia pushed a commit to marzeelabs/netlify-cms that referenced this issue May 12, 2017
lmcorreia pushed a commit to marzeelabs/netlify-cms that referenced this issue May 12, 2017
erquhart pushed a commit to marzeelabs/netlify-cms that referenced this issue May 12, 2017
lmcorreia pushed a commit to marzeelabs/netlify-cms that referenced this issue May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants