Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.forEach(posts, ({ node }) => {
const publicTags = tagsHelper(node, { visibility: `public`, fn: tag => tag })
tags.push(publicTags)
})
const ArticleMetaGhost = ({ data, settings, canonical }) => {
const ghostPost = data
settings = settings.allGhostSettings.edges[0].node
const author = getAuthorProperties(ghostPost.primary_author)
const publicTags = _.map(tagsHelper(ghostPost, { visibility: `public`, fn: tag => tag }), `name`)
const primaryTag = publicTags[0] || ``
const shareImage = ghostPost.feature_image ? ghostPost.feature_image : _.get(settings, `cover_image`, null)
const publisherLogo = (settings.logo || config.siteIcon) ? url.resolve(config.siteUrl, (settings.logo || config.siteIcon)) : null
const jsonLd = {
"@context": `https://schema.org/`,
"@type": `Article`,
author: {
"@type": `Person`,
name: author.name,
image: author.image ? author.image : undefined,
sameAs: author.sameAsArray ? author.sameAsArray : undefined,
},
keywords: publicTags.length ? publicTags.join(`, `) : undefined,
headline: ghostPost.meta_title || ghostPost.title,
url: canonical,
const ArticleMetaGhost = ({ data, canonical, fetchAuthorData, title, overwriteDefaultImage, image }) => {
const { ghostPost } = data
const { siteMetadata } = data.site
const author = getAuthorProperties(ghostPost.primary_author, fetchAuthorData)
const publicTags = _.map(tagsHelper(ghostPost, { visibility: `public`, fn: tag => tag }), `name`)
const primaryTag = publicTags[0] || { name: `General`, slug: `general` }
const seoImage = (overwriteDefaultImage && ghostPost.feature_image) ? ghostPost.feature_image : image
return (
<>
<title>{ghostPost.meta_title || title || ghostPost.title}</title>
<span>{props.suffix}</span>
}
opts.fn = function process(tag) {
let tagLink = props.permalink
tagLink = tagLink.replace(/:slug/, tag.slug) || `/${tag.slug}/`
return props.autolink ?
<span>
{tag.name}
</span> :
<span>{tag.name}</span>
}
return (
tagsHelper(props.post, opts)
)
}