New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-source-contentful-locales

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-contentful-locales - npm Package Compare versions

Comparing version

to
1.0.0

.github/workflows/node.js.yml

9

package.json
{
"name": "gatsby-source-contentful-locales",
"version": "0.0.3",
"version": "1.0.0",
"main": "index.js",

@@ -13,3 +13,4 @@ "description": "Get the list of locales from a given space",

"scripts": {
"commit": "npx git-cz"
"commit": "npx git-cz",
"semantic-release": "semantic-release"
},

@@ -24,3 +25,5 @@ "husky": {

"@commitlint/config-conventional": "^8.3.4",
"husky": "^4.2.5"
"husky": "^4.2.5",
"semantic-release": "^17.1.1",
"semantic-release-slack-bot": "^1.6.2"
},

@@ -27,0 +30,0 @@ "dependencies": {

# gatsby-source-contentful-locales
Source plugin for pulling locales from contentful spaces.
It creates a list with all the locales available and exposes information like default locale and fallback locale.
### Install
```bash
# npm
npm install --save gatsby-source-contentful-locales
# yarn
yarn add gatsby-source-contentful-locales
```
### Usage
```js
// In your gatsby-config.js
// Learn about environment variables on Gatsby: https://gatsby.dev/env-vars
module.exports = {
plugins: [
{
resolve: `gatsby-source-contentful-locales`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
},
},
],
}
```
### Configuration options
**spaceId** [string][required]
Contentful spaceId
**accessToken** [string][required]
Contentful delivery api key
### How to query
```graphql
{
allContentfulLocale {
totalCount
edges {
node {
id
code
name
default
fallbackCode
}
}
}
}
```