I'm using Jekyll to build a Github pages site, and have run into a sort of silly issue.
Github recommends Jekyll for Github pages, so I sort of assumed it would just work; however, it does not.
Jekyll by default builds all files to the _site/
directory, which is really nice and looks fancy and so on, but is not an option for Github pages.
Github seems to offer only three options for hosting:
master
Branchdocs/
Folder of Master Branchgh-pages
BranchSo, pray tell, why can I not build Jekyll to either A. a branch with a custom name or B. a folder named docs/
instead of _site
?
Turns out I didn't read enough docs.
The solution is to add a tag to the _config.yaml file in the root of the project.
This line will switch from using _site to docs/ for build output:
destination: docs/
Alternately, you can pass this as an environmental variable like so:
jekyll build --destination docs/