A minimal and responsive Hugo theme for creating beautiful image galleries using Cloudflare Images.
- Cloudflare Images integration
- Responsive grid layout
- Lazy loading
- Lightbox support
- Infinite scroll
- Mobile-friendly design
- Add the theme as a submodule:
git submodule add https://github.com/kimicla/cloudflare-gallery.git themes/cloudflare-gallery
- Update your site's config.toml:
theme = "cloudflare-gallery"
[params.cloudflareImages]
accountHash = "your-account-hash"
workerURL = "your-worker-url"
defaultLayout = "grid"
itemsPerPage = 30
# Image variants
variants = [
{ name = "thumbnail", width = 300, height = 300, fit = "cover" },
{ name = "preview", width = 800, height = 600, fit = "contain" },
{ name = "full", width = 2048, height = 0, fit = "contain" }
]
Create a new gallery page:
---
title: "Photo Gallery"
layout: "gallery"
---
{{</* cloudflare-gallery
image-prefix="your-prefix"
layout="grid"
category="all"
items-per-page="30"
*/>}}
accountHash
: Your Cloudflare account hashworkerURL
: URL to your Cloudflare worker that serves the images
defaultLayout
: Gallery layout (default: "grid")itemsPerPage
: Number of images per page (default: 30)variants
: Image variant configurations
MIT License