Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Latest commit

 

History

History
60 lines (50 loc) · 926 Bytes

README.md

File metadata and controls

60 lines (50 loc) · 926 Bytes

gatsby-source-ical

Plugin for creating Ical nodes from the remote file.

Install

npm install --save gatsby-source-ical

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    // You can have multiple instances of this plugin
    // to read source nodes from different remote files
    {
      resolve: `gatsby-source-ical`,
      options: {
        name: `events`,
        url: `https://web-standards.ru/calendar.ics`,
      },
    },
  ],
}

How to query

You can query calendar nodes like the following:

{
  allIcal {
    edges {
      node {
        start
        end
        summary
      }
    }
  }
}

To filter by the name you specified in the config, use sourceInstanceName:

{
  allIcal(filter: { sourceInstanceName: { eq: "events" } }) {
    edges {
      node {
        start
        end
        summary
      }
    }
  }
}