Closed DigiJo closed 5 years ago
We can take advantage of Hugo's Content Types to achieve this. If I want to add a new gallery called "portraits" at the ultimate URL "https://example.com/portraits/", I can simply create a new content folder that looks like this:
content/
└── portraits/
└── images/
| ├── file_1.jpg
| ├── file_2.jpg
| └── file_3.jpg
└── _index.md
The front matter of _index.md
would look like:
---
title: "Portraits"
type: "gallery"
url: "/portraits"
---
That's it!
I've added to the README to hopefully make this more clear. Thanks for the question @DigiJo!
Hi I followed these instructions, including file structure and editing _index.md but new galleries are only displaying images in the "gallery" folder. Am I missing something? Thanks
@erikparr Doesyour site repo live on GitHub? If so, would you link it please so I can take a look?
Also, please make sure you have the latest version of the theme.
Is it possible to have multiple galleries? For example, a wedding gallery and a portrait gallery.
I can think of maybe two ways which might answer this.
Name the files according to their grouping and save in image folder. Use get.resource or resources.match.
Duplicate the current gallery on the theme and rename folder, links and components.
Any ideas of which is best?
Thanks for your time and for producing the theme. It's amazing.