Copying file or serving from _data

I have a Git Submodule that contains both yaml files and images. I would like to use it within my GitHub pages Jekyll project but I’m not sure how.

I’m used to putting YAML files in _data and images in assets. Is there a way to configure Jekyll to parse yaml in another directory? or copy static files from somewhere in _data?

I believe you can change the data directory with the data_dir option in _config.yml. See Configuration Defaults for details.

Another option might be to use symbolic links, but I’m not sure how well that works with Github Pages.

I saw that one too, but if I change my data dir, I figured it would just work the same as the default _data directory in that static files won’t be served from there.

For symbolic links, this page seems to imply that they work on GitHub pages but other docs for Jekyll seem to say that they are disabled in “safe mode” and GitHub pages.

I tried creating a symlink on windows and running the server but got an error:

mklink /D assets\unreal\specifiers UE-Specifier-Docs\images
...
bundle exec jekyll serve --trace
...
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jekyll-4.2.2/lib/jekyll/utils.rb:141:in `initialize': Is a directory @ rb_sysopen - C:/Ben/personalsite2/assets/unreal/specifiers (Errno::EISDIR)