Accessing Jekyll Collection details from a post
So I want to access details of the collection from within a page (or post) in that collection.
Going straight for site[page.collection]
gives the list of docs in the collection the page is part of (page.collection
just gives the collection label, i.e. how the collection is named in _config.yaml ).
You need to scan the list of all collections for the one whose label matches yours, then you can access its details.
...
<<PREV NEXT>>
...
...
Accessing Jekyll Collection details from a post
(from Jekyll Notes)
by Chris Gathercole
http://stories.upthebuzzard.com, RSS
published: 19 February 2017
...
This work is licensed under a
Creative Commons, ATTRIBUTION-NONCOMMERCIAL-SHAREALIKE 4.0 INTERNATIONAL License (CC BY-NC-SA 4.0).
...
mashup (... er, what?)
...
Credits
Accessing Jekyll Collection details from a post
(from Jekyll Notes)
by Chris Gathercole
http://stories.upthebuzzard.com, RSS
published: 19 February 2017
...
This work is licensed under a
Creative Commons, ATTRIBUTION-NONCOMMERCIAL-SHAREALIKE 4.0 INTERNATIONAL License (CC BY-NC-SA 4.0).
...
mashup (... er, what?)
...
Credits
Background image from Wikipedia