-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: include a gallery on a page using Liquid Includes #33
Comments
This feature is quite useful but is, currently, hard to merge and changes the gallery generator behaviour too much, I suppose. Furthermore, I have unsuccessfully been trying to make your changes work with recent gallery-generator releases since last year. However, it is already possible to include a specific gallery using a kind-of hacky workaround for which I would like to propose a drop of the auto-capitalisation of the gallery names. The latter makes it harder to determine the correct gallery name. My workaround is based on the answer originally posted by @sanyen in issue #41 (comment). The requested gallery ( Notwithstanding this, hidden galleries cannot be found/included this way! A better approach might still be to store the galleries in a dictionary or something similar which can be accessed by the liquid includes directly. To handle special characters (as well as whitespaces if not replaced by the gallery generator), the url_encode.rb plugin may be used. Maybe, it is possible to create a wrapper for the snippet to include a gallery using a single Liquid macro only.
|
See my fork of this repo for a working example of this: https://github.com/nathanbirrell/jekyll-gallery-generator
Essentially it enables you to include a specific gallery on any page using a tag, for example:
{% gallery my-gallery %}
.(My repo also includes a few other bits of refactoring that can be used or ignored.)
The text was updated successfully, but these errors were encountered: