mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 11:55:01 +03:00
👋🏼 Don't use ghosticon.jpg from admin assets (#8285)
refs #8221 Use our default `favicon.ico` instead of `ghosticon.jpg` which is served from the admins' assets. Adds additionally fake image dimensions for our json-ld data to satisfy Google.
This commit is contained in:
parent
83f084608f
commit
f0f3c2f2a7
@ -66,7 +66,13 @@ function getMetaData(data, root) {
|
||||
if (settingsCache.get('logo')) {
|
||||
metaData.blog.logo.url = utils.url.urlFor('image', {image: settingsCache.get('logo')}, true);
|
||||
} else {
|
||||
metaData.blog.logo.url = utils.url.urlJoin(utils.url.urlFor('admin'), 'img/ghosticon.jpg');
|
||||
metaData.blog.logo.url = utils.url.urlFor({relativeUrl: 'favicon.ico'}, true);
|
||||
// Setting image dimensions to force the default logo to be an `ImageObject` and make
|
||||
// Google happy with it. See https://github.com/TryGhost/Ghost/issues/7558
|
||||
metaData.blog.logo.dimensions = {
|
||||
width: 60,
|
||||
height: 60
|
||||
};
|
||||
}
|
||||
|
||||
// TODO: cleanup these if statements
|
||||
|
@ -73,7 +73,7 @@ function ping(post) {
|
||||
slackData = {
|
||||
text: message,
|
||||
unfurl_links: true,
|
||||
icon_url: utils.url.urlJoin(utils.url.urlFor('admin', true), 'img/ghosticon.jpg'),
|
||||
icon_url: utils.url.urlFor({relativeUrl: 'favicon.ico'}, true),
|
||||
username: 'Ghost'
|
||||
};
|
||||
|
||||
|
@ -200,7 +200,7 @@ describe('Slack', function () {
|
||||
settingsAPIStub.calledOnce.should.be.true();
|
||||
requestOptions.should.have.property('href').and.be.equal('https://hooks.slack.com/services/a-b-c-d');
|
||||
requestData.should.have.property('text').and.be.equal('http://myblog.com/');
|
||||
requestData.should.have.property('icon_url').and.be.equal('http://myblog.com/ghost/img/ghosticon.jpg');
|
||||
requestData.should.have.property('icon_url').and.be.equal('http://myblog.com/favicon.ico');
|
||||
requestData.should.have.property('username').and.be.equal('Ghost');
|
||||
done();
|
||||
};
|
||||
@ -222,7 +222,7 @@ describe('Slack', function () {
|
||||
settingsAPIStub.calledOnce.should.be.true();
|
||||
requestOptions.should.have.property('href').and.be.equal('https://hooks.slack.com/services/a-b-c-d');
|
||||
requestData.should.have.property('text').and.be.equal('Hi!');
|
||||
requestData.should.have.property('icon_url').and.be.equal('https://myblog.com/ghost/img/ghosticon.jpg');
|
||||
requestData.should.have.property('icon_url').and.be.equal('https://myblog.com/favicon.ico');
|
||||
requestData.should.have.property('username').and.be.equal('Ghost');
|
||||
done();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user