Hi, I hope this is the right place to ask for a bit of help? (I’ve asked on discord as well). I’m trying to add a custom collection to my website. Have read the docs, but can’t seem to get it to work. I’ve added -
collections:
samples:
output: true
to bridgetown.config.yml, created ‘_samples’ folder in ‘/src’, with a test.md file in there which includes title: “xyz” front matter, then created an index page at ‘/src’ called ‘samples.md’, containing:
<ul>
{% for post in collections.samples.resources %}
<li>
<a href="{{ post.relative_url }}">{{ post.data.title }}</a>
</li>
{% endfor %}
</ul>
(essentially the same for loop that’s in the posts.md file and works fine out-of-the-box). The page displays when I link to it, but my test “xyz” post doesn’t show up. What am I missing?
You must log in or register to comment.
Easy fix: just had to exit bash and re-start bridgetown. Works as expected now.
Glad to hear it! 👍
deleted by creator