Chapter 8. Adding Data-Driven Features to Gatsby Sites
Over the course of the last several chapters, we’ve explored some of the most important concepts in Gatsby when it comes to working with data, whether that data consists of JSON or assets made available through GraphQL. Now it’s time for us to revisit some real-world applications and use cases that are relevant to those building Gatsby sites for clients and organizations.
In Chapter 3, we focused solely on features that don’t require management of data through Gatsby’s internal data layer, whether because of intelligent defaults or because there is no need for GraphQL. Here, we’ll concentrate on real-life applications and requirements driven by data that obligate the use of GraphQL and other aspects of Gatsby we’ve explored in the intervening chapters. We’ll implement various features that are key for Gatsby sites dealing with data, such as site search, commenting, blog taxonomy, pagination, RSS feeds, and user authentication.
Adding Site Search
Implementing site search can be challenging even for traditional websites, let alone more modern and dynamic sites that need to behave like interactive applications too. Any site search, whether in Gatsby or not, requires three components:
- Search index
- The search index is a corpus of all of the data you wish to make available to a search engine, recorded in a format optimized for search use cases. Without a search index, a site search feature would need to scrape through your site ...
Get Gatsby: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.