An umbrella project for our web sites at binaryage.com
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_bin/hlink rename .bin to _bin Dec 9, 2016
_lib add support for sass/scss Jan 8, 2017
_node move package.json and node stuff under _node subdirectory Dec 9, 2016
_plugins properly scope FatalException Jan 6, 2017
asepsis-web @ afbc7eb [darwin] updated asepsis.binaryage.com via binaryage/asepsis-web@afbc7eb Jan 15, 2017
blog @ 963c8bd [darwin] updated blog.binaryage.com via binaryage/blog@963c8bd Jan 10, 2017
drydrop @ f8f09e4 [darwin] updated drydrop.binaryage.com via binaryage/drydrop@f8f09e4 Jan 6, 2017
firelogger @ 788a905 [darwin] updated firelogger.binaryage.com via binaryage/firelogger@78… Jan 6, 2017
firequery @ f7123c2 [darwin] updated firequery.binaryage.com via binaryage/firequery@f7123c2 Jan 6, 2017
firerainbow @ 417543e [darwin] updated firerainbow.binaryage.com via binaryage/firerainbow@4… Jan 6, 2017
hints @ 499dd46 [darwin] updated hints.binaryage.com via binaryage/hints@499dd46 Jan 6, 2017
hodlwallet @ 56d3b71 [darwin] updated hodlwallet.binaryage.com via binaryage/hodlwallet@56… Jan 6, 2017
restatic-web @ 13f6ca8 [darwin] updated restatic.binaryage.com via binaryage/restatic-web@13… Jan 6, 2017
support @ a31690c [darwin] updated support.binaryage.com via binaryage/support@a31690c Jan 6, 2017
test-web @ 880815c [darwin] updated test.binaryage.com via binaryage/test-web@880815c Jan 8, 2017
totalfinder-web @ 856a272 [darwin] updated totalfinder.binaryage.com via binaryage/totalfinder-… Jan 6, 2017
totalspaces-web @ 63520af [sdsykes] updated totalspaces.binaryage.com via binaryage/totalspaces… Feb 23, 2017
totalterminal-web @ 749beae [darwin] updated totalterminal.binaryage.com via binaryage/totaltermi… Jan 15, 2017
visor @ 9a461eb [darwin] updated visor.binaryage.com via binaryage/visor@9a461eb Jan 15, 2017
www @ a74b54e [darwin] updated www.binaryage.com via binaryage/www@a74b54e Jan 6, 2017
xrefresh @ b028749 [darwin] updated xrefresh.binaryage.com via binaryage/xrefresh@b028749 Jan 6, 2017
.gitignore add support for sass/scss Jan 8, 2017
.gitmodules added hodlwallet Jan 15, 2015
Gemfile bundler: start using our own jekyll fork Jan 8, 2017
Gemfile.lock update bundler dependencies Jan 15, 2017
license.txt add license file Feb 22, 2016
rakefile add rake task for publishing whole workspace Jan 6, 2017
readme.md add browser-sync support instead of gulp-livereload Dec 9, 2016

readme.md

BinaryAge Site

This is an umbrella project to organize sites under *.binaryage.com.

  • local development server
  • maintenance utilities
  • mass deploying

The idea

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
...

Shared stuff

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
  • js - shared javascript/coffeescript files, we have defined .list file for concatenation
  • ...

Prerequisities

Recommended (optional):

Bootstrap local development

git clone git@github.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
...

Note that submodules are specified as read-only git repo urls. The reason is to support workflow for someone who has just partial rights or just read-only access. To push your changes you have to add write-able remote repo url to repos you are working on. For example for www repo, you should:

cd site/www
git remote add gh git@github.com:binaryage/www.git

Then, to push run git push gh web or git push gh.

Launch development server

  • make sure you have your /etc/hosts properly configured, see rake hosts

To run the full dev server:

in one terminal session run nginx proxy:

rake proxy

in a second terminal session run the jekyll debug server:

rake serve what=www,totalspaces,blog

Note that livereloading and css watching is enabled by default. Using browser-sync.

Deployment

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 web branch.

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 site repo.

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).