A feature request from a previous video asked how to limit the posts shown on the homepage. It's a great question so I made this video to cover it. You might think that slicing the end of the returned data in JavaScript is easiest way, but it's actually easier, and better in terms of a clear query, to limit the results from the query itself.
This also covers creating a new manual page, reusing Helmet to set our metadata, and abstracting a styled component for reuse.
00:00 - The requested feature
00:54 - What we'll accomplish
01:41 - Using the 'limit' filter in graphiql
03:15 - Creating an all-posts page
07:08 - Using helmet for different metadata
10:06 - Abstracting PostCard for reuse
14:24 - Advice for all posts pages
15:17 - Wrap-up
Previous video in the series:
• Gatsby site from scratch #16: CSS Variable...
Follow Jimmy Cleveland's doings:
blog: https://blog.jimmydc.com/
twitter: / jimmydcleveland
#gatsbyjs #graphql