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"
location: "City, Country" # Optional: Location will appear with π icon in lightbox
- url: /assets/photos/your-project-name/photo2.jpg
image_path: /assets/photos/your-project-name/photo2.jpg
alt: "Photo 2 description"
location: "Another location"
# Add more photos as needed
---
Write a description of your photo project here. This text will appear above the gallery.
Note about EXIF metadata: Camera settings (ISO, aperture, shutter speed, focal length, camera model) are automatically extracted from your JPG files and displayed in the lightbox when you click on an image. You donβt need to add them manually!
Edit collections/_pages/photos.md and add your project to the gallery:
gallery:
# ... existing projects ...
- url: /photos/your-project-name/
image_path: /assets/photos/your-project-name/thumbnail-image.jpg
alt: "Your Project Title"
title: "Your Project Title"
The main gallery page uses clickable image thumbnails with overlaid titles.
EXIF Data (Automatic): Camera settings are automatically extracted from your photos:
This information appears in the lightbox when you click on an image. No manual entry needed!
Location (Manual): Add the location field to display where the photo was taken:
gallery:
- url: /assets/photos/northern-lights/photo.jpg
image_path: /assets/photos/northern-lights/photo.jpg
alt: "Aurora Borealis"
location: "TromsΓΈ, Norway" # Will show as "π TromsΓΈ, Norway"
When viewing an image in the lightbox:
The project gallery displays images in a horizontal scrollable layout by default. Images are clickable to open in a lightbox viewer where you can:
teaser image is what appears on the main gallery pageheader: image is the banner at the top of the project pageThe gallery includes basic protection features:
Note: This only deters casual users. For better protection, consider adding watermarks to your images.
eloMG.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.mdcollections/_photo-projects/black-and-white.md