A photo a day template/theme

How difficult will it be to create a paginated index template to look and behave like https://photos.ben.page? I know the single.html template would be easy, but can’t wrap my head around that index.html one.

git clone --single-branch -b hugo-forum-topic-47870 https://github.com/jmooring/hugo-testing hugo-forum-topic-47870
cd hugo-forum-topic-47870
hugo server

Files of interest:

  • assets/css/main.css (lines 67-83)
  • hugo.toml (lines 5-16)
  • layouts/photos/calendar.html
  • layouts/photos/section.html
  • layouts/photos/page.html

Required content structure:

content/
β”œβ”€β”€ photos/
β”‚   β”œβ”€β”€ 2025/ <-- this is NOT a section; it must not contain an _index.md file
β”‚   β”‚   β”œβ”€β”€ 09/  <-- this is a section; it must contain an _index.md file
β”‚   β”‚   β”‚   β”œβ”€β”€ 02/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ a.jpg
β”‚   β”‚   β”‚   β”‚   └── index.md
β”‚   β”‚   β”‚   β”œβ”€β”€ 06/ 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ b.jpg <-- you can have as many images as you'd like
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ c.jpg
β”‚   β”‚   β”‚   β”‚   └── index.md
β”‚   β”‚   β”‚   └── _index.md
β”‚   β”‚   └── 11/
β”‚   β”‚       β”œβ”€β”€ 01/
β”‚   β”‚       β”‚   β”œβ”€β”€ e.jpg
β”‚   β”‚       β”‚   └── index.md
β”‚   β”‚       β”œβ”€β”€ 03/
β”‚   β”‚       β”‚   β”œβ”€β”€ f.jpg
β”‚   β”‚       β”‚   └── index.md
β”‚   β”‚       └── _index.md
β”‚   └── _index.md
└── _index.md
4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.