• Stars
    star
    350
  • Rank 121,229 (Top 3 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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 plugins list in your _config.yml:

plugins:
  - 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 rbenv
rbenv install 2.4.0
rbenv global 2.4.0
gem install rmagick exifr

Install dependencies on Ubuntu

apt install libmagick++-dev
gem install rmagick exifr

Configuration

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

gallery:
  dir: photos               # Path to the gallery
  symlink: false            # false: copy images into _site. true: create symbolic links (saves disk space)
  title: "Photos"           # Title for gallery index page
  title_prefix: "Photos: "  # Title prefix for gallery pages. Gallery title = title_prefix + gallery_name
  sort_field: "date_time"   # How to sort galleries on the index page.
                            # Possible values are: title, date_time, best_image
  thumbnail_size:
    x: 400                  # max width of thumbnails (in pixels)
    y: 400                  # max height of thumbnails (in pixels)
  # The following options are for individual galleries.
  galleries:
    chile_trip:
      best_image: IMG_1068.JPG  # The image to show on the gallery index page. Defaults to the last image.
    japan_trip:
      best_image: IMG_0690.JPG
      name: "日本の旅"       # Defaults to directory name, replacing _ with spaces & capitalizing words.
    awesome_stuff:
      best_image: snaileo_gonzales.jpg
      sort_reverse: true    # Reverse sort images in gallery.
    secret_stuff:
      hidden: true          # Don't show this gallery on the index page. People must guess the URL.
    with_info:
      info:
        desc: "Gallery Description" # Info fields can be used in custom templates.

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/

More Repositories

1

the_silver_searcher

A code-searching tool similar to ack, but faster.
C
26,124
star
2

dsniff

Dug Song seems to have abandoned dsniff. I got it to work with the latest OS X & Homebrew libraries.
C
330
star
3

lscolors

LSCOLORS Generator
HTML
302
star
4

fsevents-tools

Like inotify-tools but for OS X's FSEvents
C
264
star
5

dotfiles

Shell
19
star
6

twisted_hang

Hack day project. Figure out if the main thread is hanging, and if so, what's causing it to hang.
Python
17
star
7

linksplosion

Chrome extension to open all links in a selection. Great for when you don't have enough tabs open!
JavaScript
8
star
8

memex_trails

Extension that adds Vannevar Bush's "trails" to Chrome.
JavaScript
7
star
9

cogtrack

A tool to track one's cognitive abilities over time.
JavaScript
7
star
10

CursorHide

OS X utility to hide the mouse cursor if it hasn't been moved recently
Objective-C
7
star
11

stag

Sublime Text Ag
Python
6
star
12

history-stats

A Chrome extension that shows graphs about your history. Basically an excuse for me to play with d3.
JavaScript
4
star
13

wtf

Slack bot hackathon thing. Ignore this
TypeScript
3
star
14

serendipity

More convenient video chat
TypeScript
3
star
15

sublime-copy-github-link

Python
3
star
16

crucible

Readability extension for Chrome. Based on the now-defunct readability-redux.
JavaScript
3
star
17

counterforce

Listen for github webhooks and send an e-mail when anyone runs git push --force master.
JavaScript
3
star
18

tail-page

Chrome extension that lets you stay scrolled to the bottom of a page. Particularly helpful for buildbot output.
JavaScript
3
star
19

mpostr

GeoIP Impostor
C
2
star
20

geoff.greer.fm

HTML
2
star
21

cloudkick_tag_exports

Uses the Cloudkick API to build list of IPs for each tag. Handy for automating jobs across a group of servers.
2
star
22

circleci-insights

Use CircleCI Insights API to show which tests fail the most.
TypeScript
1
star
23

react-interview-example

JavaScript
1
star
24

payoff_matrix

Simple web page for displaying payoff matrices
Python
1
star
25

react-redux-example

Example thing that I gave a presentation about
JavaScript
1
star