So after many many many years of building sites from scratch (and doing a lot of the lifting myself) I’ve dipped my toes into two projects that have been around for a few years that I’ve been avoiding: Bootstrap and Jekyll.
The design was a very customised job that required me to dig into the LESS so I’ve got the Bootstrap source files, source assets and a build directory within that directory. Then there’s the Jekyll side. That has its own structure, I’m symlinking in the Bootstrap build directory, and the final content (the stuff I want to actually serve) buried in _site
directory.
Here’s how it looks:
/.git/*
/.gitignore
/bootstrap/
/bootstrap/... a load of source files ...
/bootstrap/bootstrap/ # the build output
/jek/
/jek/... all the jekyll files ...
/jek/bootstrap/ # symlink on ../bootstrap/bootstrap/
/jek/_site # the stuff I actually want to upload - but don't really want in git
In my history, I’ve either been dealing with a Django project layout (which makes a fair amount of sense) or a static layout. What I have here is two separate build systems and it’s driving me nuts.
Is there a better way of structuring all this junk, or failing that, is there a way I can make bootstrap output directly into the jek directory? How do you handle co-dependent static sites like this?
3
-
Separate build file from source.
/jek/_site # the stuff I actually want to upload - but don't really want in git
you can put it off from your main branch, jekyll has Continuous Integration support. How to do it you can read the documentation.
it will not be easy, it’s like setup new project. And i assume you are not yet familiar with it
-
Bring the bootstrap inside jekyll directory.
/jek/bootstrap/ # actual boostrap source /jek/bootstrap/dist/ # the build output
read default configuration, it has
- destination , in case prev options do not suite with you
- include , include boostrap directory
Force inclusion of directories and/or files in the conversion.
- keep_files , to keep
.less
if necessary.
The issue on jekyll to support less is in active and now closed, So no official support yet. But you have alternative Rake or Gulp, shell script. When you use Continuous Integration like travis to push your generated file from jekyll, you can also compile less via before_script. With that i hope you have cleaner code-layout and single root folder, without _site directory.