diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js
index 647cf10..b0aedbc 100644
--- a/client/dist/js/bundle.js
+++ b/client/dist/js/bundle.js
@@ -1 +1 @@
-!function(e){function t(n){if(a[n])return a[n].exports;var r=a[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var a={};t.m=e,t.c=a,t.i=function(e){return e},t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){e.exports=React},function(e,t){e.exports=jQuery},function(e,t){e.exports=ReactDom},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var a=0;a'),e("body").append(n)),n.setElement({Type:t,Element:a}),n.open()}}});var g=function(e){function t(e){r(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={Name:e.name,Link:e.link,MetaTitle:e.seodata.MetaTitle,MetaDescription:e.seodata.MetaDescription,FacebookTitle:e.seodata.FacebookTitle,FacebookDescription:e.seodata.FacebookDescription,TwitterTitle:e.seodata.TwitterTitle,TwitterDescription:e.seodata.TwitterDescription,CurrentTab:"seo",FacebookImageURL:e.seodata.FacebookImageURL,FacebookImageID:e.seodata.FacebookImageID,TwitterImageURL:e.seodata.TwitterImageURL,TwitterImageID:e.seodata.TwitterImageID},a}return i(t,e),l(t,[{key:"getFieldName",value:function(e){return this.state.Name+"["+e+"]"}},{key:"openTab",value:function(e){this.setState({CurrentTab:e})}},{key:"setImageForType",value:function(e,t){"FacebookImage"===e?this.setState({FacebookImageID:t.ID,FacebookImageURL:t.url}):this.setState({TwitterImageID:t.ID,TwitterImageURL:t.url})}},{key:"handleInputChange",value:function(e,t){var a={};a[t]=e.target.value,this.setState(a)}},{key:"openImageEditor",value:function(e){b.seo.openImageEditor(e,this)}},{key:"render",value:function(){var e=this;return f.default.createElement("div",{className:"seo-editor"},f.default.createElement("nav",null,f.default.createElement("ul",null,f.default.createElement("li",null,f.default.createElement("a",{className:"seo"===this.state.CurrentTab?"active":"","data-href":"#seo",onClick:function(){e.openTab("seo")}},f.default.createElement("i",{className:"seo-rocket"}))),f.default.createElement("li",null,f.default.createElement("a",{className:"facebook"===this.state.CurrentTab?"active":"","data-href":"#facebook",onClick:function(){e.openTab("facebook")}},f.default.createElement("i",{className:"seo-facebook-square"}))),f.default.createElement("li",null,f.default.createElement("a",{className:"twitter"===this.state.CurrentTab?"active":"","data-href":"#twitter",onClick:function(){e.openTab("twitter")}},f.default.createElement("i",{className:"seo-twitter-square"}))),f.default.createElement("li",null,f.default.createElement("a",{className:"settings"===this.state.CurrentTab?"active":"","data-href":"#settings",onClick:function(){e.openTab("settings")}},f.default.createElement("i",{className:"seo-cog"}))))),f.default.createElement("div",{className:"seo-tab-container"},f.default.createElement("div",{className:"seo-tab "+("seo"===this.state.CurrentTab?"active":""),"data-tab":"seo"},f.default.createElement("h3",{className:"seo-tab__title"},"SEO Data"),f.default.createElement("div",{className:"seo-section"},f.default.createElement("div",{className:"fields"},f.default.createElement(m.default,{label:"Meta Title",value:this.state.MetaTitle,name:this.getFieldName("MetaTitle"),onChange:function(t){e.handleInputChange(t,"MetaTitle")}}),f.default.createElement(h.default,{label:"Meta Description",value:this.state.MetaDescription,name:this.getFieldName("MetaDescription"),onChange:function(t){e.handleInputChange(t,"MetaDescription")}})),f.default.createElement("div",{className:"preview-holder"},f.default.createElement("div",{className:"preview-card"},f.default.createElement("h3",null,this.state.MetaTitle),f.default.createElement("p",{className:"preview-link"},this.state.Link),f.default.createElement("p",{className:"preview-description"},this.state.MetaDescription))))),f.default.createElement("div",{className:"seo-tab "+("facebook"===this.state.CurrentTab?"active":""),"data-tab":"facebook"},f.default.createElement("h3",{className:"seo-tab__title"},"Facebook"),f.default.createElement("div",{className:"seo-section"},f.default.createElement("div",{className:"fields"},f.default.createElement(m.default,{label:"Facebook Title",value:this.state.FacebookTitle,name:this.getFieldName("FacebookTitle"),onChange:function(t){e.handleInputChange(t,"FacebookTitle")}}),f.default.createElement(h.default,{label:"Facebook Description",value:this.state.FacebookDescription,name:this.getFieldName("FacebookDescription"),onChange:function(t){e.handleInputChange(t,"FacebookDescription")}}),f.default.createElement("input",{type:"hidden",value:this.state.FacebookImageID,name:this.getFieldName("FacebookImageID")})),f.default.createElement("div",{className:"preview-holder"},f.default.createElement("div",{className:"preview-card facebook"},f.default.createElement("div",{className:"preview-card--image"},f.default.createElement("a",{className:"js-og-image-selector",onClick:function(){e.openImageEditor("FacebookImage")}},f.default.createElement("i",{className:"seo-pencil-square-o"})),this.state.FacebookImageURL&&f.default.createElement("div",null,f.default.createElement("img",{src:this.state.FacebookImageURL}))),f.default.createElement("h3",null,this.state.FacebookTitle),f.default.createElement("p",{className:"preview-description"},this.state.FacebookDescription),f.default.createElement("p",{className:"preview-link"},this.state.Link))))),f.default.createElement("div",{className:"seo-tab "+("twitter"===this.state.CurrentTab?"active":""),"data-tab":"twitter"},f.default.createElement("div",{className:"seo-section"},f.default.createElement("h3",{className:"seo-tab__title"},"Twitter"),f.default.createElement("div",{className:"fields"},f.default.createElement(m.default,{label:"Twitter Title",value:this.state.TwitterTitle,name:this.getFieldName("TwitterTitle"),onChange:function(t){e.handleInputChange(t,"TwitterTitle")}}),f.default.createElement(h.default,{label:"Twitter Description",value:this.state.TwitterDescription,name:this.getFieldName("TwitterDescription"),onChange:function(t){e.handleInputChange(t,"TwitterDescription")}}),f.default.createElement("input",{type:"hidden",value:this.state.TwitterImageID,name:this.getFieldName("TwitterImageID")})),f.default.createElement("div",{className:"preview-holder"},f.default.createElement("div",{className:"preview-card twitter"},f.default.createElement("div",{className:"preview-contents"},f.default.createElement("div",{className:"preview-card--image"},f.default.createElement("a",{className:"js-og-image-selector",onClick:function(){e.openImageEditor("TwitterImage")}},f.default.createElement("i",{className:"seo-pencil-square-o"})),this.state.TwitterImageURL&&f.default.createElement("div",null,f.default.createElement("img",{src:this.state.TwitterImageURL}))),f.default.createElement("h3",null,this.state.TwitterTitle),f.default.createElement("p",{className:"preview-description"},this.state.TwitterDescription),f.default.createElement("p",{className:"preview-link"},this.state.Link)))))),f.default.createElement("div",{className:"seo-tab "+("settings"===this.state.CurrentTab?"active":""),"data-tab":"settings"},f.default.createElement("h3",{className:"seo-tab__title"},"Settings"),f.default.createElement(m.default,{label:"Canonical URL",value:this.state.CanonicalURL,name:this.getFieldName("CanonicalURL"),onChange:function(t){e.handleInputChange(t,"CanonicalURL")}}),f.default.createElement("p",null,"The canonical URL that this page should point to, leave empty to default to permalink.",f.default.createElement("a",{href:"https://webmasters.googleblog.com/2009/12/handling-legitimate-cross-domain.html",target:"_blank"},"Cross domain canonical")," supported too."))))}}]),t}(f.default.Component);t.default=g},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var r=a(1),o=n(r),i=a(0),l=n(i),s=a(2),c=n(s),u=a(10),f=a(9),d=(0,f.provideInjector)(window.InsertMediaModal.default);o.default.entwine("ss",function(e){e("#insert-seo-media-react__dialog-wrapper").entwine({Element:null,ImageType:null,Data:{},onunmatch:function(){this._clearModal()},_clearModal:function(){c.default.unmountComponentAtNode(this[0])},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},setTypeField:function(e){this.ImageType=e,console.log(this.ImageType)},_renderModal:function(e){var t=this,a=function(){return t.close()},n=function(){return t._handleInsert.apply(t,arguments)},r=window.ss.store,o=window.ss.apolloClient,i={};delete i.url,c.default.render(l.default.createElement(u.ApolloProvider,{store:r,client:o},l.default.createElement(d,{title:!1,type:"insert-media",show:e,onInsert:n,onHide:a,bodyClassName:"modal__dialog",className:"insert-media-react__dialog-wrapper",requireLinkText:!1,fileAttributes:i})),this[0])},_handleInsert:function(e,t){var a=!1;this.setData(Object.assign({},e,t));try{if("image"!==(t?t.category:"image"))throw"Wrong file type";a=this.insertImage()}catch(e){this.statusMessage(e,"bad")}return a&&this.close(),Promise.resolve()},insertImage:function(){var e=this.getElement();if(!e)return!1;var t=this.getData();return e.Element.setImageForType(e.Type,t),!0},statusMessage:function(t,a){var n=e("
").text(t).html();e.noticeAdd({text:n,type:a,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}})})},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var r=a(1),o=n(r),i=a(0),l=n(i),s=a(2),c=n(s),u=a(5),f=n(u);a(6),o.default.entwine("ss",function(e){e(".js-seo-editor:visible").entwine({onunmatch:function(){this._super(),c.default.unmountComponentAtNode(this[0])},onmatch:function(){this._super(),this.refresh()},refresh:function(){var e=this.data("name"),t=this.data("seo"),a=this.data("recordlink");c.default.render(l.default.createElement(f.default,{link:a,name:e,seodata:t}),this[0])}})})},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var a=0;a'),e("body").append(n)),n.setElement({Type:t,Element:a}),n.open()}}});var g=function(e){function t(e){r(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={Name:e.name,Link:e.link,MetaTitle:e.seodata.MetaTitle,MetaDescription:e.seodata.MetaDescription,FacebookTitle:e.seodata.FacebookTitle,FacebookDescription:e.seodata.FacebookDescription,TwitterTitle:e.seodata.TwitterTitle,TwitterDescription:e.seodata.TwitterDescription,CurrentTab:"seo",FacebookImageURL:e.seodata.FacebookImageURL,FacebookImageID:e.seodata.FacebookImageID,TwitterImageURL:e.seodata.TwitterImageURL,TwitterImageID:e.seodata.TwitterImageID,HostName:e.seodata.HostName},a}return i(t,e),l(t,[{key:"getFieldName",value:function(e){return this.state.Name+"["+e+"]"}},{key:"openTab",value:function(e){this.setState({CurrentTab:e})}},{key:"setImageForType",value:function(e,t){"FacebookImage"===e?this.setState({FacebookImageID:t.ID,FacebookImageURL:t.url}):this.setState({TwitterImageID:t.ID,TwitterImageURL:t.url})}},{key:"handleInputChange",value:function(e,t){var a={};a[t]=e.target.value,this.setState(a)}},{key:"openImageEditor",value:function(e){b.seo.openImageEditor(e,this)}},{key:"render",value:function(){var e=this;return f.default.createElement("div",{className:"seo-editor"},f.default.createElement("nav",null,f.default.createElement("ul",null,f.default.createElement("li",null,f.default.createElement("a",{className:"seo"===this.state.CurrentTab?"active":"","data-href":"#seo",onClick:function(){e.openTab("seo")}},f.default.createElement("i",{className:"seo-rocket"}))),f.default.createElement("li",null,f.default.createElement("a",{className:"facebook"===this.state.CurrentTab?"active":"","data-href":"#facebook",onClick:function(){e.openTab("facebook")}},f.default.createElement("i",{className:"seo-facebook-square"}))),f.default.createElement("li",null,f.default.createElement("a",{className:"twitter"===this.state.CurrentTab?"active":"","data-href":"#twitter",onClick:function(){e.openTab("twitter")}},f.default.createElement("i",{className:"seo-twitter-square"}))),f.default.createElement("li",null,f.default.createElement("a",{className:"settings"===this.state.CurrentTab?"active":"","data-href":"#settings",onClick:function(){e.openTab("settings")}},f.default.createElement("i",{className:"seo-cog"}))))),f.default.createElement("div",{className:"seo-tab-container"},f.default.createElement("div",{className:"seo-tab "+("seo"===this.state.CurrentTab?"active":""),"data-tab":"seo"},f.default.createElement("h3",{className:"seo-tab__title"},"SEO Data"),f.default.createElement("div",{className:"seo-section"},f.default.createElement("div",{className:"fields"},f.default.createElement(m.default,{label:"Meta Title",value:this.state.MetaTitle,name:this.getFieldName("MetaTitle"),onChange:function(t){e.handleInputChange(t,"MetaTitle")}}),f.default.createElement(h.default,{label:"Meta Description",value:this.state.MetaDescription,name:this.getFieldName("MetaDescription"),onChange:function(t){e.handleInputChange(t,"MetaDescription")}})),f.default.createElement("div",{className:"preview-holder"},f.default.createElement("div",{className:"preview-card"},f.default.createElement("h3",null,this.state.MetaTitle),f.default.createElement("p",{className:"preview-link"},this.state.Link),f.default.createElement("p",{className:"preview-description"},this.state.MetaDescription))))),f.default.createElement("div",{className:"seo-tab "+("facebook"===this.state.CurrentTab?"active":""),"data-tab":"facebook"},f.default.createElement("h3",{className:"seo-tab__title"},"Facebook"),f.default.createElement("div",{className:"seo-section"},f.default.createElement("div",{className:"fields"},f.default.createElement(m.default,{label:"Facebook Title",value:this.state.FacebookTitle,name:this.getFieldName("FacebookTitle"),onChange:function(t){e.handleInputChange(t,"FacebookTitle")}}),f.default.createElement(h.default,{label:"Facebook Description",value:this.state.FacebookDescription,name:this.getFieldName("FacebookDescription"),onChange:function(t){e.handleInputChange(t,"FacebookDescription")}}),f.default.createElement("input",{type:"hidden",value:this.state.FacebookImageID,name:this.getFieldName("FacebookImageID")})),f.default.createElement("div",{className:"preview-holder"},f.default.createElement("div",{className:"preview-card facebook"},f.default.createElement("div",{className:"preview-card--image"},f.default.createElement("a",{className:"js-og-image-selector",onClick:function(){e.openImageEditor("FacebookImage")}},f.default.createElement("i",{className:"seo-pencil-square-o"})),this.state.FacebookImageURL&&f.default.createElement("div",null,f.default.createElement("img",{src:this.state.FacebookImageURL}))),f.default.createElement("h3",null,this.state.FacebookTitle),f.default.createElement("p",{className:"preview-description"},this.state.FacebookDescription),f.default.createElement("p",{className:"preview-link"},this.state.HostName))))),f.default.createElement("div",{className:"seo-tab "+("twitter"===this.state.CurrentTab?"active":""),"data-tab":"twitter"},f.default.createElement("h3",{className:"seo-tab__title"},"Twitter"),f.default.createElement("div",{className:"seo-section"},f.default.createElement("div",{className:"fields"},f.default.createElement(m.default,{label:"Twitter Title",value:this.state.TwitterTitle,name:this.getFieldName("TwitterTitle"),onChange:function(t){e.handleInputChange(t,"TwitterTitle")}}),f.default.createElement(h.default,{label:"Twitter Description",value:this.state.TwitterDescription,name:this.getFieldName("TwitterDescription"),onChange:function(t){e.handleInputChange(t,"TwitterDescription")}}),f.default.createElement("input",{type:"hidden",value:this.state.TwitterImageID,name:this.getFieldName("TwitterImageID")})),f.default.createElement("div",{className:"preview-holder"},f.default.createElement("div",{className:"preview-card twitter"},f.default.createElement("div",{className:"preview-contents"},f.default.createElement("div",{className:"preview-card--image"},f.default.createElement("a",{className:"js-og-image-selector",onClick:function(){e.openImageEditor("TwitterImage")}},f.default.createElement("i",{className:"seo-pencil-square-o"})),this.state.TwitterImageURL&&f.default.createElement("div",null,f.default.createElement("img",{src:this.state.TwitterImageURL}))),f.default.createElement("h3",null,this.state.TwitterTitle),f.default.createElement("p",{className:"preview-description"},this.state.TwitterDescription),f.default.createElement("p",{className:"preview-link"},this.state.HostName)))))),f.default.createElement("div",{className:"seo-tab "+("settings"===this.state.CurrentTab?"active":""),"data-tab":"settings"},f.default.createElement("h3",{className:"seo-tab__title"},"Settings"),f.default.createElement(m.default,{label:"Canonical URL",value:this.state.CanonicalURL,name:this.getFieldName("CanonicalURL"),onChange:function(t){e.handleInputChange(t,"CanonicalURL")}}),f.default.createElement("p",null,"The canonical URL that this page should point to, leave empty to default to permalink.",f.default.createElement("a",{href:"https://webmasters.googleblog.com/2009/12/handling-legitimate-cross-domain.html",target:"_blank"},"Cross domain canonical")," supported too."))))}}]),t}(f.default.Component);t.default=g},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var r=a(1),o=n(r),i=a(0),l=n(i),s=a(2),c=n(s),u=a(10),f=a(9),d=(0,f.provideInjector)(window.InsertMediaModal.default);o.default.entwine("ss",function(e){e("#insert-seo-media-react__dialog-wrapper").entwine({Element:null,ImageType:null,Data:{},onunmatch:function(){this._clearModal()},_clearModal:function(){c.default.unmountComponentAtNode(this[0])},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},setTypeField:function(e){this.ImageType=e,console.log(this.ImageType)},_renderModal:function(e){var t=this,a=function(){return t.close()},n=function(){return t._handleInsert.apply(t,arguments)},r=window.ss.store,o=window.ss.apolloClient,i={};delete i.url,c.default.render(l.default.createElement(u.ApolloProvider,{store:r,client:o},l.default.createElement(d,{title:!1,type:"insert-media",show:e,onInsert:n,onHide:a,bodyClassName:"modal__dialog",className:"insert-media-react__dialog-wrapper",requireLinkText:!1,fileAttributes:i})),this[0])},_handleInsert:function(e,t){var a=!1;this.setData(Object.assign({},e,t));try{if("image"!==(t?t.category:"image"))throw"Wrong file type";a=this.insertImage()}catch(e){this.statusMessage(e,"bad")}return a&&this.close(),Promise.resolve()},insertImage:function(){var e=this.getElement();if(!e)return!1;var t=this.getData();return e.Element.setImageForType(e.Type,t),!0},statusMessage:function(t,a){var n=e("").text(t).html();e.noticeAdd({text:n,type:a,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}})})},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var r=a(1),o=n(r),i=a(0),l=n(i),s=a(2),c=n(s),u=a(5),f=n(u);a(6),o.default.entwine("ss",function(e){e(".js-seo-editor:visible").entwine({onunmatch:function(){this._super(),c.default.unmountComponentAtNode(this[0])},onmatch:function(){this._super(),this.refresh()},refresh:function(){var e=this.data("name"),t=this.data("seo"),a=this.data("recordlink");c.default.render(l.default.createElement(f.default,{link:a,name:e,seodata:t}),this[0])}})})},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var a=0;a
{this.state.FacebookTitle}
{this.state.FacebookDescription}
- {this.state.Link}
+ {this.state.HostName}
-
+
Twitter
-
Twitter
{this.state.TwitterTitle}
{this.state.TwitterDescription}
- {this.state.Link}
+ {this.state.HostName}
diff --git a/client/src/styles/_editor.scss b/client/src/styles/_editor.scss
index b7fd265..8aa96d2 100644
--- a/client/src/styles/_editor.scss
+++ b/client/src/styles/_editor.scss
@@ -135,8 +135,7 @@
}
.preview-card.twitter {
- max-width: 506px;
- width: 100%;
+ width: 456px;
border-radius: .42857em;
border-width: 1px;
border-style: solid;
@@ -144,26 +143,34 @@
box-sizing: border-box;
color: inherit!important;
overflow: hidden;
+ padding: 0;
+
+ .preview-card--image {
+ padding-top: (230/458)*100%;
+ margin-bottom: 10px;
+ }
.preview-contents {
- padding: 10px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 1.3em;
+ padding: 0;
}
h3 {
font-size: 14px;
color: black;
font-weight: bold;
+ padding: 0 14px;
}
.preview-description {
margin: 0;
+ padding: 0 14px;
}
.preview-link {
margin: 0;
- padding: 0;
+ padding: 0 14px;
color: #8899A6;
border: 0;
}
diff --git a/src/Extensions/SEODataExtension.php b/src/Extensions/SEODataExtension.php
index a77a5d1..29af73f 100644
--- a/src/Extensions/SEODataExtension.php
+++ b/src/Extensions/SEODataExtension.php
@@ -13,6 +13,7 @@
use SilverStripe\Assets\Image;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Control\ContentNegotiator;
+use SilverStripe\Control\Director;
use SilverStripe\Core\Config\Config;
use SilverStripe\Forms\FieldList;
use SilverStripe\i18n\i18n;
@@ -51,6 +52,7 @@ public function updateCMSFields(FieldList $fields)
public function SEOData()
{
return [
+ 'HostName' => Director::host(),
'MetaTitle' => $this->owner->MetaTitle,
'MetaDescription' => $this->owner->MetaDescription,
'FacebookTitle' => $this->owner->FacebookTitle,