I have used a starter (https://www.gatsbyjs.org/starters/panr/gatsby-starter-hello-friend/), but, I was trying to implement Mdx in that (it currently uses Remark). While I could port everything else by following various documentations, one thing I wasn't able to fix was this pagination. Currently, I have 5 demo posts, so, I have set itemsPerPage to 2. This should result in 3 pages, which is happening, but, all the 3 pages are showing all the 5 posts.
I'm not a programmer, but, I'm guessing my problem is with index.js, however, I don't know what exactly. Only one thing I can say for sure is this happened only when I moved to Mdx from Remark, but, I need Mdx to be able to use JSX components in some Markdown pages.
Since, I'm also using aLayout component in the index.js, here's the code for that (it's unlikely that this is causing the issue, but, here it goes):
Hello.
I have used a starter (https://www.gatsbyjs.org/starters/panr/gatsby-starter-hello-friend/), but, I was trying to implement Mdx in that (it currently uses Remark). While I could port everything else by following various documentations, one thing I wasn't able to fix was this pagination. Currently, I have 5 demo posts, so, I have set
itemsPerPage
to 2. This should result in 3 pages, which is happening, but, all the 3 pages are showing all the 5 posts.This is my
gatsby-node.js
:and this is my
.src/templates/index.js
I'm not a programmer, but, I'm guessing my problem is with
index.js
, however, I don't know what exactly. Only one thing I can say for sure is this happened only when I moved to Mdx from Remark, but, I need Mdx to be able to use JSX components in some Markdown pages.Since, I'm also using a
Layout
component in theindex.js
, here's the code for that (it's unlikely that this is causing the issue, but, here it goes):