Revela

Creating Pages

Revela provides commands to quickly create new pages. You can create:

Overview

Photo collections with optional introductory text and sorting options.

๐Ÿ“ Text Pages

Content pages without image gallery (About, Contact, Imprint).

๐Ÿ“Š Statistics Pages

EXIF analysis showing camera and lens usage statistics.


Available Page Types

Type Description Template
gallery Photo gallery with image grid Default (body/gallery)
text Text-only page without images page
statistics EXIF statistics statistics/overview
calendar Availability calendar calendar/page

statistics and calendar are plugin-provided page types. In the Standalone edition they are always available. In the Full edition they appear once the Statistics or Calendar plugin is installed (revela plugin install Statistics, revela plugin install Calendar).


Create a new gallery for your photos:

# Simple gallery
revela create page gallery vacation --title "Summer Vacation 2024"

# With description and sorting
revela create page gallery best-shots --title "Highlights" \
    --description "My best shots" \
    --sort "rating:desc"

# Hidden gallery (not in navigation)
revela create page gallery drafts --title "Drafts" --hidden

# With a custom URL segment
revela create page gallery 2024-12-christmas --title "Christmas" --slug "xmas"

Options

Option Alias Description Default
--title -t Page title "Gallery"
--description -d Description (for SEO) ""
--sort -s Override sorting (global)
--hidden - Hide from navigation false
--slug - Custom URL segment (folder name)

Sort Options

--sort "dateTaken:asc"        # Oldest first
--sort "dateTaken:desc"       # Newest first
--sort "filename:asc"         # A โ†’ Z
--sort "rating:desc"          # Highest rating first
--sort "exif.focalLength:asc" # Wide angle โ†’ telephoto

Generated File

+++
title = "Summer Vacation 2024"
description = ""
+++
Add an optional introduction here.

This text appears above the image gallery.

Text Around the Photos

To put text after the photos as well, place [[gallery]] on its own line where the grid should appear:

+++
title = "Summer Vacation 2024"
+++
Two weeks on the coast.

[[gallery]]

More stories from the trip are in the other galleries.

[[gallery: <filter>]] shows a different selection at that spot, using the filter syntax, for example [[gallery: all | sort random | limit 6]].

Photos in Your Text

To show one of your photos in the text, put [[photo: โ€ฆ]] on its own line:

The fence on the way to the lake:

[[photo: Years/2018/002190.jpg]]

We walked on for another hour.

The photo fills the width of the text and opens its photo page, like a photo in a gallery. The ร— on the photo page brings visitors back to this page, right at the photo. The photo page is created even when the page uses the lightbox or the photo lives only in _images/.

To send visitors on to the photo's own gallery instead (the ร— then returns to that gallery, for example 2018), add | gallery:

[[photo: Years/2018/002190.jpg | gallery]]

Revela looks for the file in the page's folder, then in _images/, then as a path from the source folder. Spaces in the path are fine as they are. If no photo matches, revela generate shows a warning with the file and line, and the page shows nothing at that spot. The photo's title (or its description) becomes the text for screen readers.

For illustrations and screenshots that need no photo page, use a Markdown image. It becomes the same responsive picture, without a link; put paths with spaces in < >:

![The settings dialog](<_images/screenshots/settings dialog.png>)

Open the Menu from Your Text

Lumina's menu opens without JavaScript, so a sentence can open it too. Write the words as a button that targets the menu; Lumina styles it like a link:

Browse the <button type="button" popovertarget="site-menu">photos of past years</button>.

All current browsers support this (Chrome and Edge 114, Safari 17, Firefox 125). In older browsers the words still look like a link, but nothing happens.


Text Pages

Create pages without image gallery (About, Contact, Imprint):

# About page
revela create page text about --title "About Me" \
    --description "Learn more about me and my photography"

# Contact page
revela create page text contact --title "Contact"

# Imprint (hidden from navigation)
revela create page text imprint --title "Imprint" --hidden

Generated File

+++
title = "About Me"
description = "Learn more about me and my photography"
template = "page"
+++
Write your content here using **Markdown**.

## Example Heading

- List item one
- List item two

Statistics Pages

Create a page with EXIF statistics of your photo collection:

revela create page statistics stats --title "Photo Statistics" \
    --description "Analysis of my camera and lens usage"

Note: Statistics pages need the Statistics plugin and the Lumina.Statistics theme extension. Both are built into the Standalone edition. In the Full edition, install them with revela plugin install Statistics and revela theme install Lumina.Statistics. See Statistics.

Generated File

+++
title = "Photo Statistics"
description = "EXIF statistics from your photo library"
template = "statistics/overview"
+++

Calendar Pages

Show an availability calendar (booked and free days) from an iCal .ics file:

revela create page calendar availability --title "Availability" \
    --source bookings.ics --months 12

--source (required) is the .ics file, relative to the page folder. Without it, create page stops with an error and creates nothing. Put the file there yourself, or let the Calendar Feeds plugin download it.

Front Matter

+++
title = "Availability"
template = "calendar/page"
calendar.source = "bookings.ics"
calendar.months = 12
+++

See Availability Calendar for modes, labels and languages.


Interactive Mode

All page types support an interactive mode. Start without the path argument:

revela create page gallery
revela create page text
revela create page statistics
revela create page calendar

The wizard guides you through all options:

  1. Enter path - Relative path to source/
  2. Title - Enter page title
  3. Description - Optional description
  4. Sorting (gallery only) - Choose from presets or enter a custom field
  5. Hidden - Hide from navigation?
  6. Slug (gallery/text) - Custom URL segment
  7. Preview - Show the generated front matter
  8. Confirm - Create file?

The wizard prompts follow each page type's own fields, so a text page skips the sorting step and a statistics page only asks for title and description. Required fields, such as the calendar's .ics file, are asked again until you enter a value.


Frontmatter Fields

All Page Types

Field Description
title Page title (in navigation and <title>). The home page (source/_index.revela) without a title uses the site title from site.json.
description SEO description
hidden true = not in navigation (but accessible via URL)
slug Overrides URL segment (last segment only)
template Body template (default: gallery or page)
cover Cover image path (relative to gallery or _images/)
Field Description
sort Override image sorting (e.g., dateTaken:asc)
filter Filter expression to select images

Cover Images

Any page can display a cover/hero image:

+++
title = "My Gallery"
cover = "panorama.jpg"
+++

The cover uses the same path resolution as content images:

In templates, the cover is available as {{ gallery.cover_image }}, a full Image object with url, width, height, sizes. Returns null when not set.


Folder Structure

Pages are always created in the source/ directory:

source/
โ”œโ”€โ”€ vacation/
โ”‚   โ””โ”€โ”€ _index.revela      โ† revela create page gallery vacation
โ”œโ”€โ”€ about/
โ”‚   โ””โ”€โ”€ _index.revela      โ† revela create page text about
โ””โ”€โ”€ stats/
    โ””โ”€โ”€ _index.revela      โ† revela create page statistics stats

Nested paths are supported:

revela create page gallery "2024/summer/italy" --title "Italy 2024"
# Creates: source/2024/summer/italy/_index.revela

The order in navigation is determined by folder names:

source/
โ”œโ”€โ”€ 01 Galleries/
โ”‚   โ”œโ”€โ”€ 01 Landscape/
โ”‚   โ””โ”€โ”€ 02 Portrait/
โ”œโ”€โ”€ 02 About/
โ””โ”€โ”€ 03 Contact/

Use number prefixes for desired sorting. Numbers are stripped from the display title.


Troubleshooting

If a page doesn't show up or the build fails, run revela check. It reports invalid front matter (with file and line), gallery folders that would end up at the same URL, and missing calendar files, each with a suggested fix.


See Also