Giter Site home page Giter Site logo

tomk32 / cheesy-gallery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davids/cheesy-gallery

0.0 1.0 0.0 3.73 MB

A jekyll plugin for building galleries

Home Page: https://rubygems.org/gems/cheesy-gallery

License: Other

Shell 0.99% Ruby 99.01%

cheesy-gallery's Introduction

Cheesy::Gallery

This is a jekyll photo gallery to manage large amounts of galleries and pictures. You can see the results at https://www.cheesy.at/fotos/.

Installation

Follow Jekyll's documentation on how to install plugins using "cheesy-gallery" as name for the gem and plugin.

Usage

After successful installation, enable gallery processing for a subdirectory of your site. For this example, the folder is called _my_gallery:

collections:
  my_gallery:
    cheesy-gallery: true

From now on, every Jekyll build will take all JPGs in all folders under _my_gallery and create a gallery for each folder, linking them according to their structure in the file system.

To add a thumbnail to a gallery, put it inside the gallery folder and call it thumbnail.jpg.

Frontmatter, like titles, etc., are read from the index.md file in the gallery.

Galleries and their contents are sorted by filename.

To layout galleries, check out the example layout and adapt it to your site's style.

If you want an inline display of your photos, I recommend glightbox by biati-digital. Add their CSS and JavaScript to your assets, and link them in the <head> of your site:

<link rel="stylesheet" href="{{ "/assets/glb/glightbox.min.css" | relative_url }}">
<script src="{{ "/assets/glb/glightbox.min.js" | relative_url }}"></script>

Then, in the gallery layout, add data-gallery="gallery" attribute to the <a> tag linking to each image, and put

<script type="text/javascript">
  const lightbox = GLightbox({selector: '*[data-gallery]'});
</script>

at the bottom of the layout.

Caching

This plugin uses aggressive caching to keep render times short. If you need to re-render images for any reason, remove the .jekyll-cache folder or change the _config.yml file. See the Cache API tutorial for some background.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment. There is also a test site in spec/fixtures/test_site that you can use to try out changes.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/DavidS/cheesy-gallery. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. See code of conduct for a local copy.

cheesy-gallery's People

Contributors

davids avatar dependabot-preview[bot] avatar dependabot[bot] avatar pdxmph avatar

Watchers

 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.