Closed hjklpt1 closed 2 months ago
Did you try to just create an _index.md
file? Of course there cannot be sub-albums then, but that might work…
I have a folder in \content\paintings and I have the \content_index.md file. However it does not add the photos under the paintings to the home page like a single page gallery (masonry grid style like in the cats example page).
I tried to edit home.html layout with {{ partial "gallery.html" . }} I don't want to intervene with the original layouts but it is the only solution I could find.
Oh you are right. You might need to add a local version of home.html which looks like single.html. Then you can use content/index.md
and your images go to content/*.jpg
.
Ok, so here is how it's done:
layout/_default/home.html
in your site which contains the following:{{ define "main" }}
{{ partial "title.html" . }}
{{ partial "gallery.html" . }}
{{ partial "related.html" . }}
{{ end }}
content/
(no subfolder)content/index.md
(with no underscore!) like you would in a regular gallery:---
description: Here is your subtitle
title: My Gallery
featured_image: martin-martz-wRuhOOaG-Z4-unsplash.jpg # default: first image in this directory
menus:
main:
name: Home
weight: -1
---
Is it possible to add whole gallery grid images to the homepage? I do not want to create albums. Thanks in advance for your suggestions.