Photos of the year.
Built using PureCSS using Jekyll and Sqlite3. Requires a Ruby environment with Bundler installed and appropriate native Sqlite3 bindings / support. Image optimisation is done with jpegoptim
. Up-to-date YAML is stored in this repo, but Rake task to udpate with new entries requires a YiP Rails helper running with location configured in and environment variable, or direct editing of YAML in _db/data
.
Main images are 1020px wide. Thumbnails are 190px x 190px.
Image copying:
YIP_IMAGE_SOURCE_DIR
- copy images and thumbnails from here (thumbnails stored asYIP_IMAGE_SOURCE_DIR/thumbnails
)
Deployment:
HOSTING_USER
- remote server userYEARINPICTURES_HOSTING_DIR
- remote server deploy locationDEPLOY_TARGET
- remote server location
Link to YiP Rails helper:
YIP_RAILS_HELPER_LOCATION
- base URL for helperYIP_YEAR_TOKEN_PROD
- API key to access data
- Clone to your chosen directory
bundle install
bundle exec rake db_create db_add_all_pictures
bundle exec rake serve
- http://localhost:4000/
SCSS files are in _assets
.
To actually build the site from the command line, run:
bundle exec rake
The photo stuff started life on one of the Zurb example pages.
- Run
bundle exec rake month_update
to download latest YAML, copy pics and optimise, update the database and run checks - Update
index.html
with new month - Build and check locally with
bundle exec rake serve
- Commit changes
- Move
index.html
to$year.html
(and commit) - Add new
index.html
file set up with new year - Create new
$year/thumbnails
directory in/images/
- Add new year data block in
_config/jekyll_config.yml
- Add new year in
_config/years.yml
and rebuild database - Add January photos as normal