gatsby-paginate
gatsby-paginate copied to clipboard
how can i paginate a tag page?
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