rhazdon / hugo-theme-hello-friend-ng

Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing!
https://github.com/rhazdon/hugo-theme-hello-friend-ng/
Other
1.46k stars 777 forks source link

[Question] Change start page to show posts list #379

Closed michael-schramm closed 2 years ago

michael-schramm commented 2 years ago

Hi, thank you very much for this great theme. I managed to make a few changes for SEO optimization, like unique and custom title and meta description, but I just can not figure out how to create a post list for the front page, just like in the original hello-friend theme. I would like the main page to show the post list just like it is currently been shown under /posts/.

Thanks!

MayMeow commented 2 years ago

check ./themes/hello-friend-ng/layouts/_default/single.html but I think you will need to filter that you want to list only posts. Check documentation here https://gohugo.io/templates/lists/ and here https://gohugo.io/functions/where/

Homepate is located ./themes/hello-friend-ng/layouts/index.html

michael-schramm commented 2 years ago

It worked! Thank you very much! :-) I copied the list.html, renamed it to index.html and made a few changes using the filter.