Skip to content

Instantly share code, notes, and snippets.

@opattison
Last active January 21, 2020 08:11
Show Gist options
  • Save opattison/6191106 to your computer and use it in GitHub Desktop.
Save opattison/6191106 to your computer and use it in GitHub Desktop.
A Jekyll photo gallery sample, using a for loop in liquid and collections in YAML front matter. This is sort of pseudo-code, but is in a working state in this project: https://github.com/opattison/jeancflanagan 2013-08-13
---
layout: gallery
category: photo
title: 'Sample gallery of photos generated only using YAML front matter'
date: 2013-08-13 10:01
image:
- http://farm9.staticflickr.com/8396/8690159972_a1fc390487_b.jpg
- http://farm3.staticflickr.com/2807/9108639409_d84348494d_b.jpg
- http://farm9.staticflickr.com/8341/8156043146_1b252646e1_b.jpg
image-alt:
- 'A flower.'
- 'Another flower.'
- 'A leaf.'
image-caption:
- 'This is a caption.'
- 'This is another caption.'
- 'This is yet another caption.'
---
# Here is where markdown would go if this were a true .md file. In Jekyll, this would technically *have*
# to be a markdown file. This pattern does not require any markdown content, since only front-matter is
# actually processed. One could build a large gallery of photos with only YAML front matter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment