GatsbyCentral / gatsby-awesome-pagination

An opinionated, more awesome approach to pagination in Gatsby
MIT License
110 stars 27 forks source link

Pagination with Multilanguage Plugin Polylang #12

Closed arturhenryy closed 4 years ago

arturhenryy commented 5 years ago

Hello, i am trying to integrate your pagination plugin with wordpress as source and multilangual content. In order to do so i create the overview site for all my blog posts, which i need the pagination for, programmatically for all the languages i need in the gatsby-node.js like so.

    createPage({
      path: edgePath,
      component: (() => {
        if (
          edge.node.wordpress_id === 77 ||
          edge.node.wordpress_id === 81 ||
          edge.node.wordpress_id === 79
        ) {
          return slash(path.resolve(`./src/templates/blog.jsx`));
        }
        return slash(path.resolve(`./src/templates/basicPage.jsx`));
      })(),
      context: {
        id: edge.node.id,
        lang: edge.node.lang
      }
    });

so right now i have a hard time to wrap my head around how to integrate this plugin into this structure.

chmac commented 5 years ago

I don't think this approach is supported by the plugin at the moment. Open to a PR if you'd like to add it.

Colir commented 4 years ago

@arturhenryy do you find a way to do this ?