gatsby-plugin-wpgraphql-seo
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -42,4 +42,10 @@ 'use strict'; | ||
var fullSchema = postSchema || JSON.parse(seo == null ? void 0 : (_seo$schema = seo.schema) == null ? void 0 : _seo$schema.raw); | ||
var fullSchema; | ||
if (postSchema) { | ||
fullSchema = postSchema; | ||
} else if (seo && (seo == null ? void 0 : (_seo$schema = seo.schema) == null ? void 0 : _seo$schema.raw)) { | ||
fullSchema = JSON.parse(seo.schema.raw); | ||
} | ||
var _useContext = React.useContext(SEOContext), | ||
@@ -46,0 +52,0 @@ global = _useContext.global; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-helmet");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var r=t.createContext({}),a=function(e){var a,l,c=e.post,p=e.meta,s=void 0===p?[]:p,u=e.title,d=(void 0===c?{}:c).seo,m=e.postSchema||JSON.parse(null==d||null==(a=d.schema)?void 0:a.raw),v=t.useContext(r).global,y=null==v||null==(l=v.schema)?void 0:l.inLanguage,f=null==v?void 0:v.schema,g=null==v?void 0:v.webmaster,h=null==v?void 0:v.social,w=[];(null==g?void 0:g.baiduVerify)&&w.push({name:"baidu-site-verification",content:g.baiduVerify}),(null==g?void 0:g.googleVerify)&&w.push({name:"google-site-verification",content:g.googleVerify}),(null==g?void 0:g.msVerify)&&w.push({name:"msvalidate.01",content:g.msVerify}),(null==g?void 0:g.yandexVerify)&&w.push({name:"yandex-verification",content:g.yandexVerify}),(null==h?void 0:h.pinterest)&&h.pinterest.metaTag&&w.push({name:"p:domain_verify",content:h.pinterest.metaTag});var x=u||d.title,b=(null==d?void 0:d.metaDesc)?d.metaDesc:"";return n.createElement(i.Helmet,{htmlAttributes:{lang:y},title:x,meta:[{name:"robots",content:"max-snippet:-1, max-image-preview:large, max-video-preview:-1"},{name:"description",content:b},{property:"og:site_name",content:null==f?void 0:f.companyName},{property:"og:title",content:(null==d?void 0:d.opengraphTitle)||x},{property:"og:description",content:null==d?void 0:d.opengraphDescription},{property:"og:locale",content:"en_GB"},{property:"og:type",content:"website"},{name:"twitter:card",content:null==h?void 0:h.twitter.cardType},{name:"twitter:creator",content:null==h?void 0:h.twitter.username},{name:"twitter:title",content:(null==d?void 0:d.twitterTitle)||x},{name:"twitter:description",content:(null==d?void 0:d.twitterDescription)||b}].filter((function(e){return!!e.content})).concat(s,w),encodeSpecialCharacters:!1},m&&n.createElement("script",{type:"application/ld+json"},JSON.stringify(o({},m),null,2)))};exports.SEOContext=r,exports.Seo=a,exports.default=a; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-helmet");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var r=t.createContext({}),a=function(e){var a,l,c,p=e.post,s=e.meta,u=void 0===s?[]:s,d=e.title,m=e.postSchema,v=(void 0===p?{}:p).seo;m?c=m:v&&(null==v||null==(a=v.schema)?void 0:a.raw)&&(c=JSON.parse(v.schema.raw));var y=t.useContext(r).global,f=null==y||null==(l=y.schema)?void 0:l.inLanguage,g=null==y?void 0:y.schema,h=null==y?void 0:y.webmaster,w=null==y?void 0:y.social,x=[];(null==h?void 0:h.baiduVerify)&&x.push({name:"baidu-site-verification",content:h.baiduVerify}),(null==h?void 0:h.googleVerify)&&x.push({name:"google-site-verification",content:h.googleVerify}),(null==h?void 0:h.msVerify)&&x.push({name:"msvalidate.01",content:h.msVerify}),(null==h?void 0:h.yandexVerify)&&x.push({name:"yandex-verification",content:h.yandexVerify}),(null==w?void 0:w.pinterest)&&w.pinterest.metaTag&&x.push({name:"p:domain_verify",content:w.pinterest.metaTag});var b=d||v.title,V=(null==v?void 0:v.metaDesc)?v.metaDesc:"";return n.createElement(i.Helmet,{htmlAttributes:{lang:f},title:b,meta:[{name:"robots",content:"max-snippet:-1, max-image-preview:large, max-video-preview:-1"},{name:"description",content:V},{property:"og:site_name",content:null==g?void 0:g.companyName},{property:"og:title",content:(null==v?void 0:v.opengraphTitle)||b},{property:"og:description",content:null==v?void 0:v.opengraphDescription},{property:"og:locale",content:"en_GB"},{property:"og:type",content:"website"},{name:"twitter:card",content:null==w?void 0:w.twitter.cardType},{name:"twitter:creator",content:null==w?void 0:w.twitter.username},{name:"twitter:title",content:(null==v?void 0:v.twitterTitle)||b},{name:"twitter:description",content:(null==v?void 0:v.twitterDescription)||V}].filter((function(e){return!!e.content})).concat(u,x),encodeSpecialCharacters:!1},c&&n.createElement("script",{type:"application/ld+json"},JSON.stringify(o({},c),null,2)))};exports.SEOContext=r,exports.Seo=a,exports.default=a; | ||
//# sourceMappingURL=gatsby-plugin-wpgraphql-seo.cjs.production.min.js.map |
@@ -35,4 +35,10 @@ import React, { createContext, useContext } from 'react'; | ||
var fullSchema = postSchema || JSON.parse(seo == null ? void 0 : (_seo$schema = seo.schema) == null ? void 0 : _seo$schema.raw); | ||
var fullSchema; | ||
if (postSchema) { | ||
fullSchema = postSchema; | ||
} else if (seo && (seo == null ? void 0 : (_seo$schema = seo.schema) == null ? void 0 : _seo$schema.raw)) { | ||
fullSchema = JSON.parse(seo.schema.raw); | ||
} | ||
var _useContext = useContext(SEOContext), | ||
@@ -39,0 +45,0 @@ global = _useContext.global; |
{ | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
49667
368