# @talves/gatsby-plugin-data-core

> Data core handling for our themes.

Latest version **0.1.2** (published 2019-12-18) · 0 weekly downloads

## Install

```sh
npm install @talves/gatsby-plugin-data-core
pnpm add @talves/gatsby-plugin-data-core
yarn add @talves/gatsby-plugin-data-core
bun add @talves/gatsby-plugin-data-core
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-12-18 |
| First published | 2019-12-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tony Alves |
| Maintainers | talves |
| Keywords | gatsby, gatsby-plugin, gatsby-theme |

## Links

- npm: https://www.npmjs.com/package/@talves/gatsby-plugin-data-core
- npm.io page: https://npm.io/package/@talves/gatsby-plugin-data-core

## Dependencies (2)

- [gatsby-source-filesystem](https://npm.io/package/gatsby-source-filesystem.md) ^2.1.4
- [gatsby-source-netlify-cms](https://npm.io/package/gatsby-source-netlify-cms.md) ^0.10.5

## Recent versions

- 0.1.2 (latest) — 2019-12-18
- 0.1.1 — 2019-12-10
- 0.1.0 — 2019-12-10

## README

## @talves/gatsby-plugin-data-core

Data core handling for our themes.

### Using the plugin

Here are the steps to setup your data for your theme:

  - Create a default config in your theme to return a `{ collections: []}` object  
    Typically place that in `src/cms/default-config.js` with an exports of the collections object  
  - Add the plugin to the `gatsby-config.js` plugins 
    Pass the config to the plugin   
    Also pass the base path `basePath` for the theme  
```js
const config = require('./src/cms/default-config.js');

module.exports = {
  plugins: [
    // Setup the netlify cms source (data)
    {
      resolve: `@talves/gatsby-plugin-data-core`,
      options: {
        config,
        basePath: `${__dirname}`,
      },
    },
  ],
};
```

That's it! Your config will be processed by `gatsby-source-netlify-cms` to add the correct schema for the config file with types and also resolvers for relative fields.

See `@talves/gatsby-theme-plugin-data` to process all your theme plugin data into one config for your site and `gatsby-plugin-netlify-cms`

© ADARTA Inc. 2019  (**No License**)  

This open source software has **No License** and owner reserves all rights. Owner reserves the right to change the license at any time or grant or deny a private license when requested. Unauthorized use, modification, or sharing of the software is unlawful for any purpose without prior written permission.

---
_Source: https://npm.io/package/@talves/gatsby-plugin-data-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
