Gatsby source plugin for pulling rows from an Airtable. This plugin will allow multiple tables and bases. Additionally, it will link the columns that you manually specify. This was inspired by gatsby-source-airtable , but due to the many breaking changes introduced, I started a new package pretty much a complete rewrite. With the introduction of Gatsby v2, we felt it was a great time to combine the namespaces. We do recommend moving your dependency over to gatsby-source-airtable for Gatsby v2. Below is an example showing two tables.
Come hang out by the digital campfire.
Gatsby source plugin for sourcing data into your Gatsby application from your Airtable base tables. When running gatsby develop or gatsby build , this plugin will fetch all data for all rows in each of the tables you specify, making them available for query throughout your Gatsby app, and to other Gatsby plugins as well. As seen in the example above, tables is always specified as an array of table objects. These tables may be sourced from different bases. Querying for airtable will always only return one record defaulting to the first record in the table , and querying for allAirtable will return any records that match your query parameters. As in the examples above, you can narrow your query by filtering for table names, and field values. One powerful feature of Airtable is the ability to specify fields which link to records in other tables— the Link to a Record field type. If you wish to query data from a linked record, you must specify the field name in tableLinks matching the name shown in Airtable, not the escaped version.
How to use
Get the latest tutorials on SysAdmin and open source topics. Hub for Good Supporting each other to make an impact. Write for DigitalOcean You get paid, we donate to tech non-profits. While this tutorial has content that we believe is of great benefit to our community, we have not yet tested or edited it to ensure you have an error-free learning experience. It's on our list, and we're working on it! You can help us out by using the "report an issue" button at the bottom of the tutorial. I first discovered Airtable in late , and was immediately blown away. For those not already familiar with it yet, Airtable is a cloud-based collaborative database-spreadsheet hybrid application. It also works great as a data source for Gatsby. In this lesson we are going to create a very basic food truck menu using Airtable, and then display it almost effortlessly in a Gatsby website.
We all love Airtable for various reasons and use cases. Airtable has a killer feature "share view" , where you can share the view of your table and embed it on your website using a simple iframe. To solve this problem, a second version of the platform was built using Gatsby and Airtable without any iframes. Previously built Leapcode using React and nextjs and my personal website using Gatsby. We are not going deeper into the design of the website here. First, install GatsbyJS and start a project. Here is how you can do it. You can also use one of the starter packs to get started.