Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-transformer-yaml-netlify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-transformer-yaml-netlify

Gatsby transformer plugin for yaml that is netlify compatible

  • 1.0.0-alpha.1
  • alpha
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-transformer-yaml-netlify

Parses YAML files. Supports a data layout that is compatible with netlify-cms.

Prerequisites

You must be using a version of node that supports object rest/spread (e.g v8.6.0).

Install

npm install --save gatsby-transformer-yaml-netlify@alpha

How to use

// In your gatsby-config.js
plugins: [
  `gatsby-transformer-yaml-netlify`,
]

Parsing algorithm

If you have a data layout like so:

data/
    takers/
        a-taker.yml  // value: a
        b-taker.yml  // value: b
    leavers/
        a-leaver.yml // value: a
        b-leaver.yml // value: b

Then four nodes will be created:

[
  {
    value: 'a',
    type: 'TakersYaml'
  },
  {
    value: 'b',
    type: 'TakersYaml'
  },
  {
    value: 'a',
    type: 'LeaversYaml'
  },
  {
    value: 'b',
    type: 'LeaversYaml'
  }
]

How to query

You'd be able to query your takers like:

{
  allTakersYaml {
    edges {
      node {
        value
      }
    }
  }
}

And your leavers like:

{
  allLeaversYaml {
    edges {
      node {
        value
      }
    }
  }
}

Keywords

FAQs

Package last updated on 28 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc