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

gatsby-source-datocms

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-datocms - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

index.js

@@ -1,1 +0,4 @@

// no-op
import React from 'react';
import Helmet from 'react-helmet';
export const HelmetDatoCms = ({ record }) => React.createElement(Helmet, null, record.seoMetaTags.map((item, i) => React.createElement(item.tagName, Object.assign({ key: i }, item.attributes), item.content)));

8

package.json
{
"name": "gatsby-source-datocms",
"version": "1.0.3",
"version": "1.0.4",
"description": "Gatsby source plugin for building websites using DatoCMS as data source",

@@ -27,3 +27,7 @@ "main": "index.js",

"author": "DatoCMS <support@datocms.com>",
"license": "ISC"
"license": "ISC",
"peerDependencies": {
"react": "16.2.0",
"react-helmet": "5.2.0"
}
}

@@ -65,3 +65,3 @@ # gatsby-source-datocms

{
allDatoCmsBlogPost(sort: { fields: publicationDate, order: DESC }, limit: 5) {
allDatoCmsBlogPost(sort: { fields: [publicationDate], order: DESC }, limit: 5) {
edges {

@@ -182,2 +182,37 @@ node {

This package exposes a `HelmetDatoCms` component to make it easier use these information with Helmet:
```js
import React from 'react'
import Link from 'gatsby-link'
import { HelmetDatoCms } from 'gatsby-source-datocms'
const About = ({ data }) => (
<article className="sheet">
<HelmetDatoCms record={data.datoCmsAboutPage} />
<h1>{data.datoCmsAboutPage.title}</h1>
<p>{data.datoCmsAboutPage.subtitle}</p>
</article>
)
export default About;
export const query = graphql`
query AboutQuery {
datoCmsAboutPage {
seoMetaTags {
tagName
attributes {
property
content
name
}
content
}
title
subtitle
}
}
```
### Tree-like collections

@@ -184,0 +219,0 @@

@@ -27,2 +27,1 @@ const { SiteClient } = require('datocms-client');

}

@@ -1,1 +0,16 @@

// no-op
import React from 'react'
import Helmet from 'react-helmet'
export const HelmetDatoCms = ({ record }) => (
React.createElement(
Helmet,
null,
record.seoMetaTags.map((item, i) =>
React.createElement(
item.tagName,
Object.assign({ key: i }, item.attributes),
item.content
)
)
)
)

Sorry, the diff of this file is not supported yet

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