1
votes

I've setup up some content in Jekyll that's properly generating files in a folder

docs/ index.html /install/index.html /features/index.html

What I want to do is get a list of those documents (similar to "site.posts") that I can use to render the list and their links. I've read varying approaches related to using collections (which are unstable), or injecting large amounts of liquid code/script (which I'm not entirely comfortable with). So hoping there's a simpler way to get Jekyll to generate my "docs" collection so I can use it.

Any pointers? Or am I stuck doing something like this: Generating a list of pages (not posts) in a given category

1

1 Answers

1
votes

Maybe you can try :

site.pages

And if you want only some pages you can add a variable in each page front matter like selection: true. Then do a

{% assign selection = site.page | where: 'selection', true %}

Now you can loop on selection which contains only needed pages.