Coder Social home page Coder Social logo

javajens / jekyll-gallery-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ggreer/jekyll-gallery-generator

0.0 2.0 0.0 119 KB

A Jekyll plugin that generates photo galleries from directories full of images.

License: Apache License 2.0

Ruby 86.73% HTML 13.27%

jekyll-gallery-generator's Introduction

Gallery Generator

This is a Jekyll plugin that generates galleries from directories full of images. It uses RMagick to create thumbnails.

This plugin is quite minimalist. It generates galleries with no pagination, no sub-galleries, and no descriptions. See my gallery for an example of what it looks like.

Gem Version

Build Status

Floobits Status

Usage

  1. Install the jekyll-gallery-generator gem, either by running gem install jekyll-gallery-generator or by adding gem 'jekyll-gallery-generator' to your Gemfile and running bundle.

  2. Add jekyll-gallery-generator to the gems list in your _config.yml:

gems:
  - jekyll-gallery-generator
  1. Copy your image directories into jekyll-site/photos/. Here's what my directory structure looks like:
$ ls jekyll-site/photos
best/          chile_trip/  japan_trip/
$ ls jekyll-site/photos/chile_trip
IMG_1039.JPG  IMG_1046.JPG  IMG_1057.JPG
  1. Run jekyll build and be patient. It can take a while to generate all the thumbnails on the first run. After that, you should have pretty pictures.

Dependencies

Install dependencies on OS X

brew install imagemagick
gem install rmagick exifr

Configuration

This plugin reads several config options from _config.yml. The following options are supported (default settings are shown):

gallery:
  # path to the gallery
  dir: photos
  # title for gallery index
  title: "Photos"
  # title prefix for gallery page. title=title_prefix+gallery_name
  title_prefix: "Photos: "
  # field to control sorting of galleries for the index page
  # (possible values are: title, date_time, best_image)
  sort_field: "date_time"
  # sizes for thumbnails
  thumbnail_size:
    x: 400
    y: 400
  # custom configuration for individual gallery
  # best_image is image for the index page (defaults to last image)
  galleries:
    chile_trip:
      best_image: IMG_1068.JPG
    japan_trip:
      best_image: IMG_0690.JPG
    best:
      best_image: snaileo_gonzales.jpg

Overriding layouts

If you want to customize the templates used by this generator, copy gallery_index.html and gallery_page.html to your Jekyll site's _layouts:

cp lib/gallery_index.html jekyll-site/_layouts/
cp lib/gallery_page.html jekyll-site/_layouts/

jekyll-gallery-generator's People

Contributors

aaron-coding avatar alyssais avatar ggreer avatar jesperrasmussen avatar maxmumford avatar n2o avatar nickkolok avatar richardlitt avatar simon04 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.