gridsome-source-etsy

Simple Etsy products source for Gridsome

Usage no npm install needed!

<script type="module">
  import gridsomeSourceEtsy from 'https://cdn.skypack.dev/gridsome-source-etsy';
</script>

README

gridsome-source-etsy

Simple Etsy products source for Gridsome.

Install

  • yarn add gridsome-source-etsy
  • npm install gridsome-source-etsy

Usage

module.exports = {
  plugins: [
    {
      use: 'gridsome-source-etsy',
      options: {
        shopId: 'ETSY_SHOP_ID', // required
        token: 'ETSY_API_TOKEN', // required
        typeName: 'Etsy',
        lqip: false // set to 'true' to generate lqip data uri's 
      }
    }
  ],
  templates: {
    EtsyProduct: '/:slug'
  }
}

Example Query

<page-query>
query {
  allEtsyProduct(filter:{ state: { eq:"active" } } ) {
    edges {
      node {
        id
        state
        listingId
        title
        price
        currencyCode
        path
        url
        slug
        images {
          url_fullxfull
          full_height
          full_width
          lqip
        }
        description
      }
    }
  }
}
</page-query>

Helpful links