I'm splitting my blog into a protected part and two public parts one of which is an image gallery. I found a not very easy to use but very nice looking gallery theme which turns out not to be a theme but a Hugo module which needs to be handled differently.
Go here, download the appropriate archive and then run
$ sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
or do what I did to make it permanent and add the last line to the bottom of .bashrc and execute source ~/.bashrc.
$ hugo mod init github.com/bep/gallerydeluxe
$ hugo new site gallery.olieslager.net
Running hugo serve led to the following errors
WARN 2023/06/27 21:39:50 found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/06/27 21:47:16 found no layout file for "html" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
The solution was on this page
which explains that empty layout files are needed in layouts/_default/taxonomy.html and layouts/_default/single.html the second one is not page.html as may be expected because the default template for pages is a single page.
After this the steps may not be logical due to me having tried to download the module as a theme so first change into a convenient directory and clone the module.
$ git clone https://github.com/bep/gallerydeluxe .
Then copy the directories and files in the assets and layouts subdirectories to the same locations on the new site. On the new site, copy all the gallery images into content/images and create a file index.md with content
---
title: The Gallery
headless: true
---
Once done the file structure should look like this with most of the image file names skipped for clarity.
.
├── archetypes
│ └── default.md
├── assets
│ ├── css
│ │ ├── gallerydeluxe
│ │ │ └── styles.css
│ │ └── styles.css
│ ├── js
│ │ └── gallerydeluxe
│ │ ├── cdn
│ │ │ └── index.js
│ │ └── src
│ │ ├── helpers.js
│ │ ├── index.js
│ │ └── pig.js
│ └── jsconfig.json
├── config.toml
├── content
│ └── images
│ ├── 20020602-034511.jpg
│ ├── 20050926-174927.jpg
│ ...
│ ├── 20220809-115330.jpg
│ ├── 20220809-174033.jpg
│ └── index.md
├── data
├── go.mod
├── go.sum
├── hugo.toml
├── hugo.work
├── layouts
│ ├── _default
│ │ ├── single.html
│ │ └── taxonomy.html
│ ├── index.html
│ └── partials
│ ├── gallerydeluxe
│ │ ├── create-thumbs.html
│ │ ├── head.html
│ │ └── init.html
│ ├── head.html
│ └── logo.html
├── LICENSE
├── netlify.toml
├── README.md
├── resources
│ └── _gen
│ ├── assets
│ └── images
│ └── images
│ ├── 20020602-034511_hud97459685d5bbddfaca7f842b5127b4d_277511_0x100_resize_q75_box.jpg
│ ├── 20020602-034511_hud97459685d5bbddfaca7f842b5127b4d_277511_0x20_resize_q75_box.jpg
│ ...
│ ├── 20220809-174033_hu58cf38ad43e98893521d5ebe278e57dc_285429_0x250_resize_q75_box.jpg
│ └── 20220809-174033_hu58cf38ad43e98893521d5ebe278e57dc_285429_0x500_resize_q75_box.jpg
├── static
│ └── favicon.svg
└── themes