How to create new collections? What are the collection's fields? #2369
-
Hi, I want to add a section of Teaching, not sure how to do it, in
I think I have to add something like this three rows? Where is the docs of the
But only adding this does not work. What I have to change in this file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We have a part for this in CUSTOMIZE.md, but I agree that we should elaborate it more. When we say you should create a landing page for your collection, similar to _pages/projects.md, that means you should also pay attention to how the projects page is created, and make the changes accordingly. For example, we use {% assign categorized_projects = site.projects | where: "category", category %} {% assign sorted_projects = site.projects | sort: "importance" %} So this is one change that you should make. Also note that when we include some other code inside, like in this line: {% include projects_horizontal.liquid %} in practice the code from _includes/projects_horizontal.liquid is inserted here, that's why inside this file we can use code like {% if project.img %} because the {% for project in sorted_projects %} That said, if you change the name of the variable inside your |
Beta Was this translation helpful? Give feedback.
We have a part for this in CUSTOMIZE.md, but I agree that we should elaborate it more.
When we say you should create a landing page for your collection, similar to _pages/projects.md, that means you should also pay attention to how the projects page is created, and make the changes accordingly.
For example, we use
site.projects
to access the projects files located in _projects/ inside _pages/projects.md to create the thumbnails for them. You can see that in these lines:So this is one change that you should make. Also note that when we include s…