I need to include raw text from a bunch of files inside a Jekyll collection. I don't want to process them in any way, I just need to dump the raw text using a collection. It feels like the following should work:
---
layout: default
---
{% for item in site.fragments %}
{{ item.content }}
{% endfor %}
I have declared the collection in the _config.yml
file, like so:
collections:
- fragments
Surprisingly, the output of item.content
is not the raw text inside the file, but rather the processed HTML that results from running Jekyll on top of the file.
Clearly I must be misunderstanding something fundamental, since stitching together text files should be trivial for a text processor like Jekyll.