hugo-gallery

by icecreammatt

icecreammatt / hugo-gallery

A gallery generator for the Hugo static site generator

131 Stars 12 Forks Last release: over 4 years ago (v1.0) MIT License 24 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Hugo image gallery generator

This tool will create a new posts directory containing a markdown file for each image in source directory allowing for an ordered slide show.

Usage

hugo-gallery    [BaseUrl]

Example

hugo-gallery static/images/vacation-photos hawaii "Hawaii Trip"

Visit

localhost:1313/hawaii
to view the content.

This would read all of the images out of the

static/images/vacation-photos
directory and create a new folder named
hawaii
in
content/hawaii
filled with front matter markdown files. See sample below for details.

Markdown Sample

---
title: Hawaii Trip
date: "2014-11-12"
image_name: images/vacation-photos/IMG_003.jpg
previous_image: images/vacation-photos/IMAGE_002.jpg
next_image: images/vacation-photos/IMAGE_004.jpg
next_post_path: hawaii/IMAGE_004
previous_post_path: hawaii/IMAGE_002
---

Template Usage

Reference

image_name
in the Hugo single post template

Todo:

  • Implement test coverage to solution

License

  • MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.