2
votes

Using Jekyll is there a way to save one file to a different directory than what is set in _config.yml as destination?

I'm using Jekyll and github-pages to generate geojson but need that geojson to be saved in a different folder that the rest of the content stored by Jekyll. I need this because I .gitignore the _site folder as recommended but need the .geojson I template out on github to render a map.

1
I meant destination, not <directory>DSaeger
Would Javascript redirect help? (github.com/jekyll/jekyll/pull/315#issuecomment-1018326)VonC
You want to generate your site locally and publish your files to github ? So you don't need github to generate your files ?David Jacquel
I dont think javascript redirect would work in this case I need the geojson file which is templated out and clobbered into a .gitignored _site folder to be pushed to github so that github will render it into a map.DSaeger
Would it suffice to exclude everything in _site except .geojson?Erik Gillespie

1 Answers

0
votes

Jekyll process all content of your site into the _site folder. You can change the name of this folder, but I don't think this is what your question was.

If you want to relocate your file within the _site folder you can use permalink in your file's front matter.

If you just need the GFM then you may want to use another tool rather than Jekyll. Example here