gatsby-paginate icon indicating copy to clipboard operation
gatsby-paginate copied to clipboard

how can i paginate a tag page?

Open derridHeidegger opened this issue 6 years ago • 0 comments

hi i have a page that shows posts according to a tag. but right now it is without pagination:

for each tag i create a page: tags.forEach(tag => { actions.createPage({ path:/tags/${tag}/, component: singleTagTemplate, context : { tag } }) })

and in the page itself i have a graphql query to bring all posts for that tag: query( $tag : String ){ allMarkdownRemark ( filter : {frontmatter : {tags: {eq: $tag}} } sort: { fields: [frontmatter___date], order: DESC } ){ totalCount edges{ node{ id excerpt frontmatter{ title tags description date author path published } } } } }

how can i include the plugin so it will be paginated?

best regards

derridHeidegger avatar Nov 17 '18 13:11 derridHeidegger