gatsby-source-ghost
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -32,15 +32,14 @@ const Promise = require('bluebird'); | ||
posts.map((post) => { | ||
if (!post.codeinjection_head && !post.codeinjection_foot) { | ||
const allCodeinjections = [post.codeinjection_head, post.codeinjection_foot].join(''); | ||
if (!allCodeinjections) { | ||
return post; | ||
} | ||
const allCodeinjections = post.codeinjection_head.concat(post.codeinjection_foot); | ||
if (allCodeinjections) { | ||
const headInjection = parseCodeinjection(allCodeinjections); | ||
const headInjection = parseCodeinjection(allCodeinjections); | ||
if (_.isEmpty(post.codeinjection_styles)) { | ||
post.codeinjection_styles = headInjection.styles; | ||
} else { | ||
post.codeinjection_styles += headInjection.styles; | ||
} | ||
if (_.isEmpty(post.codeinjection_styles)) { | ||
post.codeinjection_styles = headInjection.styles; | ||
} else { | ||
post.codeinjection_styles += headInjection.styles; | ||
} | ||
@@ -47,0 +46,0 @@ |
{ | ||
"name": "gatsby-source-ghost", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Gatsby source plugin for building websites using the Ghost API as a data source.", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:TryGhost/gatsby-source-ghost.git", |
@@ -26,3 +26,4 @@ # Gatsby Source Ghost | ||
contentApiKey: `<your content api key>`, | ||
version: `v3` // Ghost API version, optional, defaults to "v3". Pass in "v2" if your Ghost install is not on 3.0 yet. | ||
version: `v3` // Ghost API version, optional, defaults to "v3". | ||
// Pass in "v2" if your Ghost install is not on 3.0 yet!!! | ||
} | ||
@@ -29,0 +30,0 @@ } |
@@ -8,6 +8,10 @@ /** | ||
{ | ||
slug: 'welcome-to-ghost', tags: [ | ||
slug: 'welcome-to-ghost', | ||
/* Adding this line simulates https://github.com/TryGhost/gatsby-source-ghost/issues/17 */ | ||
codeinjection_foot: '<style></style>', | ||
tags: [ | ||
{slug: 'getting-started', id: '1'}, | ||
{slug: 'hash-feature-img', id: '2'} | ||
], authors: [ | ||
], | ||
authors: [ | ||
{name: 'Ghost Writer', id: '1'}, | ||
@@ -14,0 +18,0 @@ {name: 'Ghost Author', id: '2'} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26789
440
145