1.0.1 ā€¢ Published 3 years ago

gatsby-source-ergast v1.0.1

Weekly downloads
-
License
0BSD
Repository
-
Last release
3 years ago

Simple source plugin to grab the latest Formula 1 season data from the fantastic Ergast API.


šŸŽ Quick start

yarn add gatsby-source-ergast

or

npm i gatsby-source-ergast

Add this to your gatsby-config.js file šŸ‘

plugins: [
  "gatsby-source-ergast",
],

Enjoy šŸŽ‰


šŸ§ What's inside?

/gatsby-source-ergast
ā”œā”€ā”€ .gitignore
ā”œā”€ā”€ gatsby-node.js
ā”œā”€ā”€ index.js
ā”œā”€ā”€ LICENSE
ā”œā”€ā”€ package.json
ā””ā”€ā”€ README.md
  • .gitignore: Stuff not to track.
  • gatsby-node.js: The good stuff šŸ‘€.
  • index.js: A file that will be loaded by default when the plugin is required by another application.
  • LICENSE: This source plugin is licensed under the 0BSD license.
  • package.json: A manifest file, which includes things like metadata.
  • README.md: A text file containing useful reference information.

šŸ™ Contributing

Feel free to submit updates/PRs for this source plugin. It's still very basic and could be expanded to include a lot more control over the data pulled from Ergast.


Notes:

Inline with the request from Ergast to keep calls to a minimum, Gatsby will call the API to reqest data at build-time. The slight downside being that you'll need to manually build the site (or feel free to make a webhook) after a race meeting, to ensure the results/standings and times are all up to date.

If this is something i end up creating, i'll update the plugin readme to reflect this.