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

Add gallery shortcode #398

Closed
gcushen opened this Issue Dec 2, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@gcushen
Owner

gcushen commented Dec 2, 2017

Integrate FancyBox (http://fancybox.net/ ).

@gcushen gcushen added the enhancement label Dec 2, 2017

@gcushen gcushen added this to the v2.1 milestone Dec 3, 2017

@gcushen gcushen changed the title from Add gallery widget/shortcode to Add gallery shortcode Jan 13, 2018

gcushen added a commit that referenced this issue Jan 13, 2018

@gcushen

This comment has been minimized.

Show comment
Hide comment
@gcushen

gcushen Jan 13, 2018

Owner

To use:

  1. Upload gallery images within static/img/ folder if not referencing image URLs
  2. Add images to front matter of a content file in the form:
[[gallery_item]]
album = "1"
image = "https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-default.png"
caption = "Default"

[[gallery_item]]
album = "1"
image = "https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-dark.png"
caption = "Dark"
  1. Initialize gallery somewhere within Markdown content by using {{< gallery album="1" >}}

Example: https://raw.githubusercontent.com/gcushen/hugo-academic/master/exampleSite/content/post/getting-started.md

Owner

gcushen commented Jan 13, 2018

To use:

  1. Upload gallery images within static/img/ folder if not referencing image URLs
  2. Add images to front matter of a content file in the form:
[[gallery_item]]
album = "1"
image = "https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-default.png"
caption = "Default"

[[gallery_item]]
album = "1"
image = "https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-dark.png"
caption = "Dark"
  1. Initialize gallery somewhere within Markdown content by using {{< gallery album="1" >}}

Example: https://raw.githubusercontent.com/gcushen/hugo-academic/master/exampleSite/content/post/getting-started.md

@gcushen gcushen closed this Jan 13, 2018

@NewCai

This comment has been minimized.

Show comment
Hide comment
@NewCai

NewCai Jan 14, 2018

The height of the images is fixed. How to change it?

NewCai commented Jan 14, 2018

The height of the images is fixed. How to change it?

@gcushen

This comment has been minimized.

Show comment
Hide comment
@gcushen

gcushen Jan 14, 2018

Owner

To change the size of the thumbnails, you can follow the documentation to create a custom.css file and then add something like the following to it:

a[data-fancybox] img {
  height: 400px;
}
Owner

gcushen commented Jan 14, 2018

To change the size of the thumbnails, you can follow the documentation to create a custom.css file and then add something like the following to it:

a[data-fancybox] img {
  height: 400px;
}
@NateMietk

This comment has been minimized.

Show comment
Hide comment
@NateMietk

NateMietk Jan 27, 2018

@gcushen I read through the getting-started.md example to deploy galleries, but the {{< gallery album="1" >}} doesn't call anything. The resulting page just shows {{< gallery album="1" >}} where the gallery should be. Am I missing something here?

NateMietk commented Jan 27, 2018

@gcushen I read through the getting-started.md example to deploy galleries, but the {{< gallery album="1" >}} doesn't call anything. The resulting page just shows {{< gallery album="1" >}} where the gallery should be. Am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment