gohugo-theme-ananke
gohugo-theme-ananke copied to clipboard
Featured image in post tile
In the posts view, each post is shown in a tile, three columns wide. Posts with a featured image show without image. It would be nice if the tile also shows that featured image.
I also want the same.
I can get that to work if I have it in the root of the posts. However, if I have it in its own directory, it does not show any image in the post tiles.
If I move a post into the root, the picture shows up in the post tile preview. I put it back in a sub directory (for its category) it has no picture.
Is there a way to make this work for subdirs?
First, the Ananke theme expects that your “posts” will be in content/post/ (singular) not content/posts/ (plural).
Second, to render featured images when viewing “post” list pages (regardless of depth):
mkdir -p layouts/post
cp themes/ananke/layouts/post/list.html layouts/post/list.html
Then edit layouts/post/list.html. Change this:
{{ .Render "summary" }}
to this:
{{ .Render "summary-with-image" }}
I have confirmed this works. Issue should be close. Answer from https://discourse.gohugo.io/t/looking-for-theme-that-does-posts-previews-with-thumbnails-on-subdirectories/38472
I think the sample or directions should show this. I cannot tell you how long I have been searching for a theme that will do this out of the box.
Ananke does this partially but not specifically in this situation. Don't close my issue because you think it should be. Unless you are the repo owner of course.
You should adjust your original complaint or make a new one.
Thanks guys! We'll review this later this week. Don't worry @metbril we don't close issues unless resolved by code fix or conversation.
Tried this, unfortunately it doesn't work.
It used to be that in config.toml
you could set featured_image
to the path of the image you wanted and get the hero image for the site.
I don't really like this feature. If it's added in the future, I'd like to have the option to keep it as is!
cp themes/ananke/layouts/post/list.html layouts/post/list.html
doesn't work for me either
any other ideas would be appreciated