Skip to content
Gatsby plugin to use Strava as a data source
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.


npm package

Gatsby plugin to use Strava as a data source

Getting started


You can download gatsby-source-strava from the NPM registry via the npm or yarn commands

yarn add gatsby-source-strava
npm install gatsby-source-strava --save


Add the plugin in your gatsby-config.js file:

const STRAVA_TOKEN = "your-token"
module.exports = {
    plugins: [
            resolve: "gatsby-source-strava",
            options: {
                // Mandatory
                // --------
                token: STRAVA_TOKEN,

                // Optional
                // --------
                debug: true,
                activitiesOptions: {
                    // Options for filtering activities
                    // --------------------------------
                    // Timestamp for filtering activities that have taken place BEFORE a certain time
                    before: "1539500400",
                    // Timestamp for filtering activities that have taken place AFTER a certain time
                    after: "1539500400",
                    // Options for enhance activities
                    // --------------------------------
                    // Add comments to every activity
                    withComments: true,
                    // Add kudos to every activity
                    withKudos: true,
                    // Add laps to every activity
                    withLaps: true,
                    // Add photos to every activity
                    withPhotos: true,
                    // Add related activities to every activity
                    withRelated: true,
                    // Add streams to every activity (see streamTypes)
                    withStreams: true,
                    // Add zones to every activity (need Strava Summit Analysis Pack)
                    withZones: true,
                    // Add analyzed data to every activity
                    // withStreams option must be true
                    // See
                    streamsTypes: [
                    // Option to cache activities
                    // ------
                    cacheDir: `${__dirname}/.strava`,
                athleteOptions: {
                    // Options computed by gatsby-source-strava
                    // ----------------------------------------
                    // Add `heartrateMax` data to `athlete`
                    computeHeartrateMax: true,
                    // Options for enhance athlete data
                    // --------------------------------
                    // Add athlete koms
                    withKoms: true,
                    // Add athlete routes
                    withRoutes: true,
                    // Add athlete stats
                    withStats: true,
                    // Add athlete zones
                    withZones: true,


  • ⇄ Pull/Merge requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.

See CONTRIBUTING guidelines




This project is licensed under the MIT License - see the LICENCE file for details

You can’t perform that action at this time.