Modifying a theme to add a list of posts


#1

Hi!

I’m trying to modify the theme simple-hugo-theme to add the posts’ list at the index page, I mean, when opening the website.

I tried to add the content of the list.html file to the baseof.html file or to the index.html file, and just for a moment I got it working, but the pagination didn’t work.

Could anyone help me to understand how to modify the theme and add the posts’ list at the index?

Thank you :slight_smile:

Edit:

I uploaded the modified theme at git.sr.ht/~captainepoch/simple-hugo-theme. As I mentioned in this post, pagination is not working.


Pagination fails after listing posts
#2

You are probably looking for https://gohugo.io/templates/homepage/.


#3

I did take a look at that documentation, but it didn’t solve my question :frowning:

Edit:
I deleted the index.html file and I got the posts’ list, but pagination is broken (it creates the index at the bottom and hugo says it got Paginator pages | 3, but going to the page 2 makes a 404 error).

@maiki thank you for your answer :slight_smile: