I want to keep page-specific datafiles next to the source files which are going to use them, for clarity. So I want to end up with something like this:
_pages
my-page
index.md
_data.yaml
…becoming:
_site
my-page
index.html
Then I’ll have a custom tag in the markdown file actually use the yaml file to generate text.
Just remember that the whole philosophy of Jekyll is to have conventions to avoid configuration. So most of the time, you don’t have configuration options for that kind of things.
FWIW you can change the default data folder but it’s a global setting, there’s no per page settings.
The trouble with ‘convention over configuration’ is that it completely falls down when faced with, e.g., the kind of external requirements I have here. I really can’t rearrange the source files.
I think I can work around this by creating a _data.yaml file, so that it’s ignored by the generator, and then manually loading it in Ruby code. It’s really ugly, but it at least lets me make progress.
I honestly can’t even remember what this was about. Looking at my repo I only see one data file and it’s a global one, so does belong in the _data directory.