From 9f247aa48e145f4ae92590eb818a7dea2c9dba6b Mon Sep 17 00:00:00 2001 From: Kameron Kenny <1267885+kkenny@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:36:41 -0400 Subject: [PATCH] update readme with other options for the gallery generator --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 33e9ab2..4dcd2ff 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,39 @@ -# Jekyll Photo Gallery +# Gallery Generator +This is a [Jekyll plugin](http://jekyllrb.com/docs/plugins/) that generates galleries from directories full of images. It uses [RMagick](http://rmagick.rubyforge.org/) to create thumbnails. + +This plugin is quite minimalist. It generates galleries with no pagination, no sub-galleries, and no descriptions. [See my gallery](http://geoff.greer.fm/photos/) for an example of what it looks like. + +[![Gem Version](https://img.shields.io/gem/v/jekyll-gallery-generator.svg)](https://rubygems.org/gems/jekyll-gallery-generator) + +[![Build Status](https://travis-ci.org/ggreer/jekyll-gallery-generator.svg?branch=master)](https://travis-ci.org/ggreer/jekyll-gallery-generator) + +[![Floobits Status](https://floobits.com/ggreer/jekyll-gallery-generator.svg)](https://floobits.com/ggreer/jekyll-gallery-generator/redirect) + + +## 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`: + +```yaml +plugins: + - jekyll-gallery-generator +``` + +3. Copy your image directories into `jekyll-site/photos/`. Here's what my directory structure looks like: + +```bash +$ ls jekyll-site/photos +best/ chile_trip/ japan_trip/ +$ ls jekyll-site/photos/chile_trip +IMG_1039.JPG IMG_1046.JPG IMG_1057.JPG +``` + +4. 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. + +# Jekyll Photo Gallery I want to share my jekyll photo gallery, simple, functional, mobile friendly and most essential, pretty! The gallery is based on the design from [Henrrique Gusso](https://gus.so/) and utilizes the [jekyll gallery generator plugin](https://github.com/ggreer/jekyll-gallery-generator) to do most of the heavy lifting (with some minor changes). ![Example Image](https://i.imgur.com/vpmSx7S.png "Optional title") @@ -32,24 +66,39 @@ gem install rmagick exifr This plugin reads several config options from `_config.yml`. The following options are supported (default settings are shown): -```yaml +```yaml # The following options are for individual galleries. gallery: - dir: photos # root folder with all the pictures - title: "Photos" + dir: photos # root folder with all the pictures + title: "Photos" sort_field: "date" # sort pictures by date title_prefix: "" # title prefix symlink: false # false: copy images into _site. true: create symbolic links (saves disk space) - thumbnail_size: # + thumbnail_size: # y: 450 # retina: 1.5 # galleries: 2017_Berlin: # folder name name: "Berlin" # gallery name date: "2017/08/01" # gallery date - best_image: 0062.jpg # best photo for gallery blur image and gallery index + best_image: 0062.jpg # best photo for gallery blur image and gallery index + 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/ + ## Thanks to * The people behind jekyll project * [Geoff Greer](https://github.com/ggreer) for the script