Search code examples
static-sitejbakestatic-generatorterazola

Which Static Site Generator can generate pages by just iterating through an assets directory of images (without any content format (e.g. MD) files)?


I'm thinking of publishing a photography blog.

Normally, a Static Site Generator generates the site pages based on .MD files and the linked images placed in an assets directory.

I'm looking for a Static Site Generator which can generated all the site pages without the need for any .MD files.

For example,

I set up the following assets directory of images:

Travel
   Tokyo
     TokyoTower.jpg
     SkyTree.jpg
     ... and other photos
   Paris
     EiffelTower.jpg
     ... and other photos
   NewYork
     StatusOfLiberty.jpg
     ... and other photos

and the Static Site Generator will generate:

mysite.com/travel.html - the index page
mysite.com/travel/tokyo.html - a page with gallery of images
mysite.com/travel/paris.html - a page with gallery of images
mysite.com/travel/newyork.html - a page with gallery of images

(Of course, the Static Site Generator will use the pre-designed HTML and CSS to create the pages.)

New photographs will be added simply by copying to the intended directory. Further, new directory can be created, say another "SanFrancisco" directory.

Does anyone know which Static Site Generator can iterate all the photos in the assets directories to generate the pages?

I'm familiar with Java JBake and Rust Zola/Tera. Does these libraries work for my needs?


Solution

  • As you already mentioned, I am not aware of any SSG which is triggered by images, but I guess there are some Gallery tools out there.

    As a workaround, you could use jBake with groovy templates. Place one index file in your root directory and use Groovy within your template to iterate over the images.