gatsby-plugin-wpgraphql-seo
Advanced tools
Comparing version 1.1.4 to 1.1.6
@@ -32,3 +32,3 @@ 'use strict'; | ||
var SEO = function SEO(_ref) { | ||
var _seo$schema, _global$schema, _seo$opengraphImage, _social$facebook, _social$facebook$defa, _seo$opengraphImage2, _social$facebook2, _social$facebook2$def, _seo$twitterImage, _seo$twitterImage2; | ||
var _seo$schema, _global$schema, _seo$schema2, _seo$opengraphImage, _social$facebook, _social$facebook$defa, _seo$opengraphImage2, _social$facebook2, _social$facebook2$def, _seo$twitterImage, _seo$twitterImage2; | ||
@@ -99,2 +99,7 @@ var _ref$post = _ref.post, | ||
var robotsFollow = (seo == null ? void 0 : seo.metaRobotsNofollow) === 'nofollow' ? 'nofollow' : 'follow'; | ||
var getReadingTime = function getReadingTime(time) { | ||
return time === 1 ? '1 minute' : time + " minutes"; | ||
}; | ||
return React__default.createElement(reactHelmet.Helmet, { | ||
@@ -122,3 +127,3 @@ htmlAttributes: { | ||
property: "og:locale", | ||
content: "en_GB" | ||
content: (seo == null ? void 0 : (_seo$schema2 = seo.schema) == null ? void 0 : _seo$schema2.inLanguage) ? seo.schema.inLanguage.replace('-', '_') : null | ||
}, { | ||
@@ -151,2 +156,8 @@ property: "og:type", | ||
content: seo == null ? void 0 : (_seo$twitterImage2 = seo.twitterImage) == null ? void 0 : _seo$twitterImage2.altText | ||
}, { | ||
name: 'twitter:label1', | ||
content: (seo == null ? void 0 : seo.readingTime) ? 'Estimated reading time' : null | ||
}, { | ||
name: 'twitter:data1', | ||
content: (seo == null ? void 0 : seo.readingTime) ? getReadingTime(+seo.readingTime) : '' | ||
}].filter(function (m) { | ||
@@ -153,0 +164,0 @@ return !!m.content; |
@@ -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,o=require("react-helmet");function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var i=t.createContext({}),a=function(e){var a,r,u,c,p,d,m,s,v,g,f,y=e.post,w=e.meta,h=void 0===w?[]:w,x=e.title,b=e.postSchema,T=(void 0===y?{}:y).seo;b?f=b:T&&(null==T||null==(a=T.schema)?void 0:a.raw)&&(f=JSON.parse(T.schema.raw));var V=t.useContext(i).global,I=null==V||null==(r=V.schema)?void 0:r.inLanguage,O=null==V?void 0:V.schema,S=null==V?void 0:V.webmaster,j=null==V?void 0:V.social,N=[];(null==S?void 0:S.baiduVerify)&&N.push({name:"baidu-site-verification",content:S.baiduVerify}),(null==S?void 0:S.googleVerify)&&N.push({name:"google-site-verification",content:S.googleVerify}),(null==S?void 0:S.msVerify)&&N.push({name:"msvalidate.01",content:S.msVerify}),(null==S?void 0:S.yandexVerify)&&N.push({name:"yandex-verification",content:S.yandexVerify}),(null==j?void 0:j.pinterest)&&j.pinterest.metaTag&&N.push({name:"p:domain_verify",content:j.pinterest.metaTag});var _=x||T.title,C=(null==T?void 0:T.metaDesc)?T.metaDesc:"";return n.createElement(o.Helmet,{htmlAttributes:{lang:I},title:_,meta:[{name:"robots",content:"max-snippet:-1, max-image-preview:large, max-video-preview:-1, "+("noindex"===(null==T?void 0:T.metaRobotsNoindex)?"noindex":"index")+", "+("nofollow"===(null==T?void 0:T.metaRobotsNofollow)?"nofollow":"follow")},{name:"description",content:C},{property:"og:site_name",content:null==O?void 0:O.companyName},{property:"og:title",content:(null==T?void 0:T.opengraphTitle)||_},{property:"og:description",content:null==T?void 0:T.opengraphDescription},{property:"og:locale",content:"en_GB"},{property:"og:type",content:"website"},{property:"og:image",content:(null==T||null==(u=T.opengraphImage)?void 0:u.sourceUrl)||(null==j||null==(c=j.facebook)||null==(p=c.defaultImage)?void 0:p.mediaItemUrl)},{property:"og:image:alt",content:(null==T||null==(d=T.opengraphImage)?void 0:d.altText)||(null==j||null==(m=j.facebook)||null==(s=m.defaultImage)?void 0:s.altText)},{name:"twitter:card",content:null==j?void 0:j.twitter.cardType},{name:"twitter:creator",content:null==j?void 0:j.twitter.username},{name:"twitter:title",content:(null==T?void 0:T.twitterTitle)||_},{name:"twitter:description",content:(null==T?void 0:T.twitterDescription)||C},{name:"twitter:image",content:null==T||null==(v=T.twitterImage)?void 0:v.sourceUrl},{name:"twitter:image:alt",content:null==T||null==(g=T.twitterImage)?void 0:g.altText}].filter((function(e){return!!e.content})).concat(h,N),encodeSpecialCharacters:!1},f&&n.createElement("script",{type:"application/ld+json"},JSON.stringify(l({},f),null,2)))};exports.SEOContext=i,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,o=require("react-helmet");function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var i=t.createContext({}),a=function(e){var a,r,u,c,m,d,p,s,v,g,f,y,w=e.post,h=e.meta,x=void 0===h?[]:h,b=e.title,T=e.postSchema,V=(void 0===w?{}:w).seo;T?y=T:V&&(null==V||null==(a=V.schema)?void 0:a.raw)&&(y=JSON.parse(V.schema.raw));var I=t.useContext(i).global,O=null==I||null==(r=I.schema)?void 0:r.inLanguage,S=null==I?void 0:I.schema,j=null==I?void 0:I.webmaster,N=null==I?void 0:I.social,_=[];(null==j?void 0:j.baiduVerify)&&_.push({name:"baidu-site-verification",content:j.baiduVerify}),(null==j?void 0:j.googleVerify)&&_.push({name:"google-site-verification",content:j.googleVerify}),(null==j?void 0:j.msVerify)&&_.push({name:"msvalidate.01",content:j.msVerify}),(null==j?void 0:j.yandexVerify)&&_.push({name:"yandex-verification",content:j.yandexVerify}),(null==N?void 0:N.pinterest)&&N.pinterest.metaTag&&_.push({name:"p:domain_verify",content:N.pinterest.metaTag});var C,D=b||V.title,E=(null==V?void 0:V.metaDesc)?V.metaDesc:"";return n.createElement(o.Helmet,{htmlAttributes:{lang:O},title:D,meta:[{name:"robots",content:"max-snippet:-1, max-image-preview:large, max-video-preview:-1, "+("noindex"===(null==V?void 0:V.metaRobotsNoindex)?"noindex":"index")+", "+("nofollow"===(null==V?void 0:V.metaRobotsNofollow)?"nofollow":"follow")},{name:"description",content:E},{property:"og:site_name",content:null==S?void 0:S.companyName},{property:"og:title",content:(null==V?void 0:V.opengraphTitle)||D},{property:"og:description",content:null==V?void 0:V.opengraphDescription},{property:"og:locale",content:(null==V||null==(u=V.schema)?void 0:u.inLanguage)?V.schema.inLanguage.replace("-","_"):null},{property:"og:type",content:"website"},{property:"og:image",content:(null==V||null==(c=V.opengraphImage)?void 0:c.sourceUrl)||(null==N||null==(m=N.facebook)||null==(d=m.defaultImage)?void 0:d.mediaItemUrl)},{property:"og:image:alt",content:(null==V||null==(p=V.opengraphImage)?void 0:p.altText)||(null==N||null==(s=N.facebook)||null==(v=s.defaultImage)?void 0:v.altText)},{name:"twitter:card",content:null==N?void 0:N.twitter.cardType},{name:"twitter:creator",content:null==N?void 0:N.twitter.username},{name:"twitter:title",content:(null==V?void 0:V.twitterTitle)||D},{name:"twitter:description",content:(null==V?void 0:V.twitterDescription)||E},{name:"twitter:image",content:null==V||null==(g=V.twitterImage)?void 0:g.sourceUrl},{name:"twitter:image:alt",content:null==V||null==(f=V.twitterImage)?void 0:f.altText},{name:"twitter:label1",content:(null==V?void 0:V.readingTime)?"Estimated reading time":null},{name:"twitter:data1",content:(null==V?void 0:V.readingTime)?(C=+V.readingTime,1===C?"1 minute":C+" minutes"):""}].filter((function(e){return!!e.content})).concat(x,_),encodeSpecialCharacters:!1},y&&n.createElement("script",{type:"application/ld+json"},JSON.stringify(l({},y),null,2)))};exports.SEOContext=i,exports.Seo=a,exports.default=a; | ||
//# sourceMappingURL=gatsby-plugin-wpgraphql-seo.cjs.production.min.js.map |
@@ -25,3 +25,3 @@ import React, { createContext, useContext } from 'react'; | ||
var SEO = function SEO(_ref) { | ||
var _seo$schema, _global$schema, _seo$opengraphImage, _social$facebook, _social$facebook$defa, _seo$opengraphImage2, _social$facebook2, _social$facebook2$def, _seo$twitterImage, _seo$twitterImage2; | ||
var _seo$schema, _global$schema, _seo$schema2, _seo$opengraphImage, _social$facebook, _social$facebook$defa, _seo$opengraphImage2, _social$facebook2, _social$facebook2$def, _seo$twitterImage, _seo$twitterImage2; | ||
@@ -92,2 +92,7 @@ var _ref$post = _ref.post, | ||
var robotsFollow = (seo == null ? void 0 : seo.metaRobotsNofollow) === 'nofollow' ? 'nofollow' : 'follow'; | ||
var getReadingTime = function getReadingTime(time) { | ||
return time === 1 ? '1 minute' : time + " minutes"; | ||
}; | ||
return React.createElement(Helmet, { | ||
@@ -115,3 +120,3 @@ htmlAttributes: { | ||
property: "og:locale", | ||
content: "en_GB" | ||
content: (seo == null ? void 0 : (_seo$schema2 = seo.schema) == null ? void 0 : _seo$schema2.inLanguage) ? seo.schema.inLanguage.replace('-', '_') : null | ||
}, { | ||
@@ -144,2 +149,8 @@ property: "og:type", | ||
content: seo == null ? void 0 : (_seo$twitterImage2 = seo.twitterImage) == null ? void 0 : _seo$twitterImage2.altText | ||
}, { | ||
name: 'twitter:label1', | ||
content: (seo == null ? void 0 : seo.readingTime) ? 'Estimated reading time' : null | ||
}, { | ||
name: 'twitter:data1', | ||
content: (seo == null ? void 0 : seo.readingTime) ? getReadingTime(+seo.readingTime) : '' | ||
}].filter(function (m) { | ||
@@ -146,0 +157,0 @@ return !!m.content; |
{ | ||
"version": "1.1.4", | ||
"version": "1.1.6", | ||
"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
64542
423