Just a quick question for some pointers/help. I’m trying to build a photography portfolio site / blog with an HTML template I bought a few weeks ago. I’m trying to go through the HTML and ‘templatize’ it to fit with Hugo. I would appreciate if you could help me a bit with this by giving me a few tips, as I got stuck.
For the photography portfolio bit, what I’m trying to do is to have on the main page a list of galleries to which I want to link. Each of these galleries are displayed by showing a small photo, a text and the number of photos in the gallery, and possibly some other text. When you click on it, I’d like it to go to a gallery URL like
/gallery/london which will show the relevant photos.
I created a proof of concept by leveraging the data directory, so that I go through the
$.Site.Data.galleries variable, showing all the data that I have defined in a set YAML files. However I got stuck here. I think I’m not using the right tool with the
data directory the right way to do this? Or should I treat each of these galleries like the rest of the content for a hugo site, inside the
content directory. In that case, could I extend and add more metadata to each content/gallery page that then I can use from the front page?
Otherwise, I don’t really understand what the data directory is used for. What are usual use cases for it?
If this is covered in the documentation and I’ve been thick enough to overlook it (or in this discuss forum), please let me know. Or otherwise, I would really appreciate some pointers about this.
Thank you very much