-
Notifications
You must be signed in to change notification settings - Fork 10
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
use collections as much as possible #4
Comments
My intention was to use both data and collections. Sorry if this wasn't clear. |
I definitely think we want things to be as simple as possible. If we can have instructions for adding a person which is:
That is much simpler than:
The link I provided in the previous post shows how to do that. Let me know if you want some help with it. It took me a while to figure out how to make it work, so I'm happy to transfer that knowledge. |
Hmm okay. So here's what I understand so far: Right now we have people.markdown as
We should change this to:
So that _people contains every single person (this is similar in setup to what we have with _projects), and there are 4 loops over site.people (one ea for faculty, phd, staff, and alumni). Right? |
Yeh, sounds good. Ideally Jekyll could use categorical information taken from the collection yaml front matter (or somewhere else) to make the iteration by category nicer. And perhaps it does, but I'm not sure how to make that happen. I searched a little for a solution, but I ran out of time finding something. In the camready link I sent you, I make it a little nicer when writing templates using something like this where i create a variable with the filter already applied so the loops don't have the if statement.
Overall I'd like the goal to be to minimize the effort and complexity needed to add or modify content. And if that means that the templates and other infrastructure type stuff is a bit more complex, then that is OK because that changes less often and by fewer people. |
@csbao i noticed that there is a people collection that contains a file per person, and a data file that contains metadata about each person, including a blurb. is your intention to use data, collections, or a combination of both?
If you are running into problems with organizing the data and accessing it in the templates, I have a working example of something very similar to what we want with people but without using the jekyll data feature:
https://github.com/camready/camready.github.io/tree/master/_calls
The text was updated successfully, but these errors were encountered: