Coder Social home page Coder Social logo

kmorgen1 / jekyll-image-set Goto Github PK

View Code? Open in Web Editor NEW

This project forked from callmeed/jekyll-image-set

0.0 1.0 0.0 5 KB

Create an image gallery from a folder with a liquid tag. Great for a Jekyll or Octopress Site

License: MIT License

Ruby 100.00%

jekyll-image-set's Introduction

Jekyll Image Set

Create an Image Gallery from a Folder

Takes a dir (generally a subdirectory of your images folder), gets all the images from it, and creates HTML image and container tags.

Useful for creating an image gallery and the like.

Installation

Place the image_set.rb file in the _plugins directory of your Jekyll site

Usage

default

{% image_set images/gallery1 %}

(this will create a ul container, then li and img tags for each image in images/gallery1)

with some options

{% image_set images/gallery2 --class=img-responsive --container-tag=div --wrap-tag=div %}

(this will set the class for the img tags and use div's for the container and wrap)

What About the GIFs!?

Right now, it will match any .jpg or .png file in the path you specify. If you need to match other file types, edit the full_path var in the render method.

Available Options

--class=some_class sets the class for the img tags, default is 'image'

--wrap_tag=some_tag sets the tag to wrap around each , default is 'li'

--wrap_class=some_class sets the class for wrap_tag, default is 'image-item'

--container_tag=some_tag sets the tag to contain all img's, default is 'ul'

--container_class=some_class sets the class for container_tag, default is 'image-set'

Known Issues

  • Cannot add multiple clasess to img tags or wrap/container tags.
  • No way to set ALT or other attributes for img tags. Need this for SEO probably.
  • Tabs/indentation is crappy.

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.