Reputation: 6808
I have a Jekyll-based and Github-pages-hosted site. I also 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.
Here's example directory structure:
/assets/
/_data/
/MyGitSubmodule/yaml/
/MyGitSubmodule/images/
I’m used to putting YAML files in _data
and images in /assets/
. Is there a way to configure Jekyll also parse YAML files in another directory? Or copy static files from somewhere in _data
during the build step? Or set up symlinks? That work with GitHub Pages?
I've tried:
data_dir
setting to be the same as my /assets/
directory but I don't want to make my data files publicly accessible.mklink /D
but I get an error on servingC:/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)`. Also ]this page seems to imply that they work on GitHub pages](https://github.com/chetabahana/symlink) but other docs for Jekyll seem to say that they are disabled in “safe mode” and GitHub pages.Upvotes: 0
Views: 314
Reputation: 6808
Eh in the end I solved this by putting my data_dir
inside /assets/
and by by using the exclude
setting in config.yml
to stop it from serving some of the yml files
Upvotes: 1