This is an umbrella project to organize sites under *.binaryage.com.
- local development server
- maintenance utilities
- mass deploying
The idea is to have one repo with all subdomains as separate repositories, each tracked as an individual git submodule. Individual sites have usually a dependency on shared - again tracked as a git submodule. This should give us tools to reconstruct the whole site to any point in the history while having granular control of commit rights to parts of the site. Nice transparency via GitHub is a bonus.
. ├── www │ ├── shared │ ├── index.md | ... ├── totalfinder-web │ ├── shared │ ├── index.md | ... ├── totalspaces-web │ ├── shared │ ├── index.md | ... ├── blog ...
Files which should be shared by all sites should go into shared repo.
- layouts - jekyll layout files, these won't be present in the generated site
- includes - various includes for layout files, these won't be present in the generated site
- root - these will be generated as usual and then moved to the root level of the site, useful for generating same page for all sites, like 404.html
- img - shared images
- css - shared css files, we use stylus for preprocessing and concatenation
Bootstrap local development
git clone email@example.com:binaryage/site.git cd site rake init
Init task does several things:
- fetches all submodules
- updates push remote urls to be writable
- hard-links all shared submodules into www/shared
Hard-linking is essential for local development. Changes you make under
shared are then effective in all repos.
. ├── www │ ├── shared (real folder) │ ├── index.md | ... ├── totalfinder-web │ ├── shared (hard link to ../www/shared) │ ├── index.md | ... ├── totalspaces-web │ ├── shared (hard link to ../www/shared) │ ├── index.md | ... ├── blog ...
Launch development server
- make sure you have your /etc/hosts properly configured, see
To run the full dev server:
in one terminal session run nginx proxy:
in a second terminal session run the jekyll debug server:
rake serve what=www,totalspaces,blog
optionally you may run livereload watcher via gulp in another teminal session
To run the dev server for all sites:
You don't have to push to this
site repo if you want to update some web. Just make changes in some sub-site repo and push your changes into its
We have setup post-recieve hook which will build sub-site and then will push baked static site files back into its
gh-pages branch. GitHub Pages will do the deployment automatically. It will also move pointer of submodule here in the
Don't forget to push
shared submodule first if you have modified some shared stuff.
Update from remote
If you want to get incrementally to remote state without doing
rake init, you may reset your repo to remote state via
rake reset (will destroy your local changes!!!).
Alternatively you may always use your git-fu to non-destructively pull from remotes (
git submodule is your friend).