A super-simple photo album static site generator
Find a file
2025-05-06 15:53:50 -07:00
py move python stuff out of the way 2025-04-26 19:49:29 -07:00
resources album page rendering 2025-05-06 15:48:18 -07:00
src clean up todos 2025-05-06 15:53:50 -07:00
tests album page rendering 2025-05-06 15:48:18 -07:00
.gitignore init command 2025-04-27 09:45:49 -07:00
.python-version Init commit 2024-08-03 07:37:28 -07:00
Cargo.lock album page rendering 2025-05-06 15:48:18 -07:00
Cargo.toml album page rendering 2025-05-06 15:48:18 -07:00
LICENSE Add license 2024-08-04 18:29:39 -07:00
Makefile album page rendering 2025-05-06 15:48:18 -07:00
README.md Add installation instructions to README 2024-08-11 17:32:02 -07:00

photojawn

This is a super-simple photo album static site generator. You feed it a directory of photos (which can contain directories of photos, etc. etc.) and it'll generate a basic HTML photo album for you. You can then host the directory with a webserver of your choice or upload it to an S3 bucket.

It's everything I need and nothing I don't.

Getting Started

Installation

Photojawn requires at least Python 3.12. If you don't know what version you have, you can check by running python -V.

  1. Head on over to the releases page
  2. If you have Python >=3.12, you can install using the wheel (.whl file) a. To install, run pip install photojawn-<version>-py3-none-any.whl
  3. If you don't have Python >=3.12, you can download one of the standalone binaries depending on your OS and architecture, e.g. photojawn-linux-x86_64.

Initialization

Then inside your photo directory, run:

photojawn init

This will create a config file, some jinja2 HTML templates, and a CSS file. Edit them to your heart's content to make your photo album website purdy.

Generating the site

To generate the HTML files and various image sizes, inside your photo directory, run:

photojawn generate

Special features

  • HTML templates are written using jinja2
  • If you have a description.txt or description.md file in a directory with images, its contents will be used as the album description. .md files will be rendered as Markdown.
  • If an image file (e.g. IMG_1234.jpg) has a corresponding .txt or .md file (e.g. IMG_1234.md) then it'll be used as the image's caption. .md files will be rendered as Markdown.
  • If you have an image in a directory called cover.jpg (or a symlink to another image named that), then it'll be used as the cover image for the album. If one doesn't exist, the first image in the directory will be used as the cover image.

y tho

Why create a new photo album doohickey? Why not use one of the untold number of cloud services or even self-hosted solutions? It boils down to a few things:

  1. I want control of my data. I don't want some company using my pictures to train their AI models, for example.
  2. A lot of the self-hosted solutions (Immich, PhotoPrism, etc.) don't support nested albums
  3. I love simplicity. I'm following the Unix philosophy here: "do one thing, do it well" and make use of composable tools to get the job done.

I took heavy inspiration by the photo albums found on https://bayarearides.com (example).