0
votes

Setup:

  • I have a Jekyll collection of 800 items
  • I've set output: false as I don't need individual pages for each one, and want to save time on builds
  • I do, however, want to be able to output: true on select items

Question

Is there a way to do this? I tried overriding the output variable in the selected item's front matter, but that didn't seem to make difference.

I do know about published: true/false, but I need for all files to be published:true for their data to remain available elsewhere in my site. This question pertains to their output as pages.

1

1 Answers

0
votes

You can use two collections, one with output: true (col1) and the other with no output (col2).

Now if you want to loop over both collections in single pass, you can concatenate them :

{% assign all = site.col1 | concat: site.col2 %}

And if you have the same datas in both collections, you can sort item like this :

{% assign all = site.col1 | concat: site.col2 | sort: 'title' %}