Adding a new photo project is easy! Just follow these 3 simple steps:
Create a new folder inside assets/photos/
with your project name:
assets/photos/your-project-name/
For example:
assets/photos/trip-to-prague/
assets/photos/street-photography/
assets/photos/portraits/
Copy all the images for this project into the new folder. Supported formats: JPG, PNG, etc.
Create a new markdown file in collections/_photo-projects/
with the same name as your folder:
collections/_photo-projects/your-project-name.md
Use this template:
---
title: "Your Project Title"
permalink: /photos/your-project-name/
description: "Brief description of this photo collection"
header:
image: /assets/photos/your-project-name/cover-image.jpg
teaser: /assets/photos/your-project-name/thumbnail-image.jpg
gallery:
- url: /assets/photos/your-project-name/photo1.jpg
image_path: /assets/photos/your-project-name/photo1.jpg
alt: "Photo 1 description"
title: "Caption for photo 1"
- url: /assets/photos/your-project-name/photo2.jpg
image_path: /assets/photos/your-project-name/photo2.jpg
alt: "Photo 2 description"
title: "Caption for photo 2"
# Add more photos as needed
---
Write a description of your photo project here. This text will appear above the gallery.
Edit collections/_pages/photos.md
and add your project to the feature_row
:
feature_row:
# ... existing projects ...
- image_path: /assets/photos/your-project-name/thumbnail-image.jpg
alt: "Your Project Title"
title: "Your Project Title"
excerpt: "Brief description of this photo collection"
url: "/photos/your-project-name/"
btn_label: "View Project"
btn_class: "btn--primary"
In your project page (gallery
section), you can control how photos are displayed:
_layouts/photo-project.html
and modifying the gallery include:
layout="third"
- 3 columnslayout="half"
- 2 columnslayout=""
- single column (scrollable left-to-right on mobile)teaser
image is what appears on the main gallery pageheader: image
is the banner at the top of the project pageeloMG.github.io/
├── assets/photos/
│ ├── your-project-1/
│ │ ├── photo1.jpg
│ │ ├── photo2.jpg
│ │ └── ...
│ └── your-project-2/
│ ├── photo1.jpg
│ └── ...
├── collections/
│ ├── _pages/
│ │ └── photos.md # Main gallery page
│ └── _photo-projects/
│ ├── your-project-1.md # Individual project pages
│ └── your-project-2.md
└── _layouts/
└── photo-project.html # Layout template
Check out these example projects:
collections/_photo-projects/landscapes.md
collections/_photo-projects/black-and-white.md