Hi all,
Collection basics as I understand them:
- add info to the _config.yml and output:true to make them get processed as pages.
- create corresponding folder in top level directory with the same name as in the config.yml and with a leading underscore.
- Add md or html files to that folder with some front matter and voila.
I successfully created a collection entitled libguides and successfully created a for
loop on my homepage that created links to each page.
Now I’m trying to do the same thing for a collection entitled libcal and am not able to create a for
loop.
The thing i’m stumbling on is this: {% for libcal in site.libcal %}
I don’t know what to put where it says libcal
immediately after for
My loop that actually working is thus: {% for libguide in site.libguides %}
The collection name is libguides. Nowhere anywhere in any of my code have I used the singular version (libguide) except in that for loop and somehow it works.
I got the idea to try ‘libguide’ when I saw documentation that would just put the singular name of the collection in the for loop. I have no idea why this is working.
Two other pages I read for help today had these examples and I have no idea why they’re using what they are for the word immediately after for.
{% for topic in site.interviews %}
{% for album in site.music limit:3 %}
Thanks for any help.