Gatby source wordpress
August 2, 2021 at 2:32amGatby source wordpress
August 2, 2021 at 2:32am (Edited 10 months ago)Hello there
I am trying to add a path prefix for blog-post.js
Explanation:
everything works fine i add
Static pages index, blog ....
i change the path on the gatsby-node.js
i see the preview of my wordpress on my blog page but when i click i got a 404
gatsby-node.jsconst { postsPerPage } = graphqlResult.data.wp.readingSettingsconst postsChunkedIntoArchivePages = chunk(posts, postsPerPage)const totalPages = postsChunkedIntoArchivePages.lengthreturn Promise.all(postsChunkedIntoArchivePages.map(async (\_posts, index) => {const pageNumber = index + 1const getPagePath = page => {if (page > 0 && page <= totalPages) {// Since our homepage is our blog page// we want the first page to be "/" and any additional pages// to be numbered.// "/blog/2" for examplereturn page === 1 ? `/blog/` : `/blog/${page}`}return null}
when i click on a post i got 404 and i see my post at root
Search:
/hello-world//404.html/404/
Any idea Thanks