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 source code is linked at a repository in the main post, just clone it and setup the theme in the config file. Also, the config file of my site is copy and paste with the exampleSite/config.toml at my repository.
I linked a post where I had another problem I fixed, and because of that, I don’t have pagination.
I don’t have the computer in front of me right now, but I’ll upload it as soon as I can. Meanwhile, if you have a Hugo site (local, not online, of course), you may try my modified theme
So I executed git clone https://git.sr.ht/~captainepoch/simple-hugo-theme as per your request and tested the exampleSite locally.
Everything works fine on my end. i.e. http://localhost:1313/page/2/ and http://localhost:1313/post/page/2/
This theme requires a /post/ section for its pagination. See line 6 of _default/layouts/list.html: {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
If you use a different section then you may have problems.
But I cannot guess further. If you still have problems as I said above you need to share the source code of your project.
I don’t understand what you mean by “share your source code”. Literally I just typed hugo new site blog, put some posts at content/post/, copy the config.tom from exampleSite to my blog’s root, and ran hugo. The blog compiles, but getting to /page/2 get me a 404 error…
The $paginator is added by me. I couldn’t filter by posts and pages are listed too, so it’s more like a filter.