Skip to content

Instantly share code, notes, and snippets.

@danilowoz
Last active April 28, 2019 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danilowoz/98bfff4fecd4fc11f318ad918d5bcd44 to your computer and use it in GitHub Desktop.
Save danilowoz/98bfff4fecd4fc11f318ad918d5bcd44 to your computer and use it in GitHub Desktop.
Creating a blog post list page
const postsPerPage = 9
const postsWithoutFeatured = posts.filter(({ node }) => {
return !node.frontmatter.featured
})
const numPages = Math.ceil(postsWithoutFeatured.length / postsPerPage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment