After modifying the theme and fix the problem I had I get another related with pagination.
As I sad, when listing the posts at the homepage, everything seems fine and posts can be accessed going through the link. But, when going to page 2, it returns a 404 error.
The theme I’m talking about is at git.sr.ht/~captainepoch/simple-hugo-theme.
I may put something wrong, but I don’t know what.