I currently have a collection called “projects”, but whenever I put a file in _projects/ it does not seem to show up in the collection. Iterating through the collection does nothing, and going to the links specified by the permalink setting for the collection just returns 404.
My directory structure looks like this:
_includes
preview.html
_layouts
default.html
_projects
test.md
content
images
polygradient.png
index.md
blog.md
projects.md
config.yml
This is what _projects/test.md looks like:
test project
This is what projects.md (the page that’s supposed to list all projects) looks like:
---
permalink: /projects/
---
This is where my projects are.
<div class="projects">
{% for project in site.projects %}
{% include preview.html %}
{% endfor %}
</div>
<style>
.projects {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-gap: 20px;
}
</style>
And this is my config.yml:
collections:
projects:
output: true
permalink: /projects/:name