Source Structure
Revela supports two approaches for organizing your photos, and you can combine them in the same project:
Overview
๐ Traditional Galleries
Photos belong to one gallery. Images stored directly in the gallery folder.
๐ Filter Galleries
Photos appear in multiple galleries. All images in a shared _images/ folder.
๐ Hybrid Approach
Mix both approaches. Some galleries with local images, others with filters.
Traditional Galleries
Each gallery contains its own images directly in the folder.
source/
โโโ _index.revela # Homepage
โโโ events/
โ โโโ _index.revela # Gallery page
โ โโโ event-001.jpg
โ โโโ event-002.jpg
โโโ portraits/
โ โโโ _index.revela
โ โโโ portrait-001.jpg
โโโ landscapes/
โโโ _index.revela
โโโ mountain.jpg
Characteristics
- โ Simple and intuitive
- โ Each photo belongs to exactly one gallery
- โ Easy to manage manually
- โ Photos cannot appear in multiple galleries
Filter Galleries
All images are stored in a shared _images/ folder. Galleries use filter expressions to select which images to display.
source/
โโโ _index.revela # Homepage
โโโ _images/ # Shared image pool
โ โโโ canon-event-001.jpg
โ โโโ sony-landscape-002.jpg
โ โโโ sony-portrait-003.jpg
โโโ canon/
โ โโโ _index.revela # filter = "exif.make == 'Canon'"
โโโ sony/
โ โโโ _index.revela # filter = "exif.make == 'Sony'"
โโโ portraits/
โโโ _index.revela # filter = "contains(filename, 'portrait')"
The _images/ Folder
The underscore prefix is significant:
_images/is not rendered as a gallery itself- Images are accessible via filter expressions and content images (
) - Subdirectories are supported:
_images/screenshots/,_images/portfolio/
Example Front Matter
+++
title = "Canon Photos"
description = "All photos taken with Canon cameras"
filter = "exif.make == 'Canon'"
+++
Hybrid Approach
Combine both approaches in the same project:
source/
โโโ _images/ # Shared pool for filter galleries
โ โโโ 2024-trip-001.jpg
โ โโโ 2025-event-001.jpg
โ
โโโ by-year/ # Filter galleries
โ โโโ 2024/
โ โ โโโ _index.revela # filter = "year(dateTaken) == 2024"
โ โโโ 2025/
โ โโโ _index.revela # filter = "year(dateTaken) == 2025"
โ
โโโ clients/ # Traditional galleries (exclusive)
โโโ wedding-smith/
โโโ _index.revela
โโโ ceremony-001.jpg # Only in this gallery
Choosing the Right Approach
๐ท Simple Portfolio
Use Traditional - each photo belongs to one gallery.
๐ท๏ธ Multiple Categories
Use Filter - photos can appear in many galleries based on metadata.
๐ Client Work
Use Traditional - exclusive galleries for private content.
๐ By Camera / By Year
Use Filter - dynamic views based on EXIF data.
๐ Mixed Content
Use Hybrid - combine both approaches as needed.
Common Patterns
Homepage with Recent Photos
+++
title = "Welcome"
filter = "all | sort dateTaken desc | limit 6"
+++
Category Landing Page (No Images)
+++
title = "Browse by Camera"
template = "page"
+++
Select a camera brand below.
Nested Filter Galleries
Filter galleries can be nested under plain page containers for deep, browsable hierarchies:
source/
โโโ _images/
โโโ gear/
โ โโโ _index.revela # template = "page" (no images)
โ โโโ cameras/
โ โ โโโ _index.revela # template = "page"
โ โ โโโ canon/
โ โ โ โโโ _index.revela # filter = "exif.make == 'Canon'"
โ โ โโโ sony/
โ โ โโโ _index.revela # filter = "exif.make == 'Sony'"
โ โโโ lenses/
โ โโโ _index.revela # template = "page"
โ โโโ wide/
โ โ โโโ _index.revela # filter = "exif.focalLength <= 35"
โ โโโ tele/
โ โโโ _index.revela # filter = "exif.focalLength >= 85"
Migration Tips
From Traditional to Filter
- Create an
_images/folder - Move images from galleries into
_images/ - Add
filter = "..."to each gallery's_index.revela - Make sure images have the EXIF data or naming convention your filters rely on
Adding Filter Galleries to an Existing Site
- Create an
_images/folder - Copy (or move) the images you want cross-referenced
- Create new filter gallery folders with an
_index.revela - Leave your traditional galleries unchanged
See Also
- Filter Galleries: complete filter syntax reference
- Sorting: image and gallery sorting
- Creating Pages: page types and templates