Last active
April 28, 2019 19:19
-
-
Save danilowoz/98bfff4fecd4fc11f318ad918d5bcd44 to your computer and use it in GitHub Desktop.
Creating a blog post list page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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