From ca521e234fb008d3d4740fb6bbbc40360b280394 Mon Sep 17 00:00:00 2001 From: Aileen Nowak Date: Wed, 25 Jan 2017 17:02:02 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B7=20=20Rename=20'favicon'=20to=20'ic?= =?UTF-8?q?on'=20(#7888)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs TryGhost/Ghost#7688 Just renames `favicon` to `icon` as our usage for it will not be for favicon purposes only. --- core/server/api/settings.js | 6 +++--- core/server/config/overrides.json | 2 +- core/server/data/schema/default-settings.json | 2 +- core/test/unit/config/index_spec.js | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/server/api/settings.js b/core/server/api/settings.js index c637074c94..7736bab07e 100644 --- a/core/server/api/settings.js +++ b/core/server/api/settings.js @@ -67,9 +67,9 @@ updateConfigCache = function () { config.set('theme:timezone', (settingsCache.activeTimezone && settingsCache.activeTimezone.value) || config.get('theme').timezone); config.set('theme:url', globalUtils.url.urlFor('home', true)); config.set('theme:amp', (settingsCache.amp && settingsCache.amp.value === 'true')); - config.set('theme:favicon', (settingsCache.favicon && settingsCache.favicon.value) ? - {type: 'upload', url: (settingsCache.favicon && settingsCache.favicon.value)} : - {type: 'default', url: config.get('theme:favicon')}); + config.set('theme:icon', (settingsCache.icon && settingsCache.icon.value) ? + {type: 'upload', url: (settingsCache.icon && settingsCache.icon.value)} : + {type: 'default', url: config.get('theme:icon')}); _.each(labsValue, function (value, key) { config.set('labs:' + key, value); diff --git a/core/server/config/overrides.json b/core/server/config/overrides.json index a2b2655c5a..5872ad262a 100644 --- a/core/server/config/overrides.json +++ b/core/server/config/overrides.json @@ -61,7 +61,7 @@ }, "theme": { "timezone": "Etc/UTC", - "favicon": { + "icon": { "type": "default", "url": "core/shared/favicon.ico" } diff --git a/core/server/data/schema/default-settings.json b/core/server/data/schema/default-settings.json index 1482648efa..a588012120 100644 --- a/core/server/data/schema/default-settings.json +++ b/core/server/data/schema/default-settings.json @@ -29,7 +29,7 @@ "cover": { "defaultValue": "" }, - "favicon": { + "icon": { "defaultValue": "" }, "defaultLang": { diff --git a/core/test/unit/config/index_spec.js b/core/test/unit/config/index_spec.js index 4fff5f0481..e0529c3f9a 100644 --- a/core/test/unit/config/index_spec.js +++ b/core/test/unit/config/index_spec.js @@ -37,7 +37,7 @@ describe('Config', function () { logo: 'casper', cover: 'casper', timezone: 'Etc/UTC', - favicon: { + icon: { type: 'default', url: 'core/shared/favicon.ico' } @@ -49,7 +49,7 @@ describe('Config', function () { var themeConfig = config.get('theme'); // This will fail if there are any extra keys - themeConfig.should.have.keys('title', 'description', 'logo', 'cover', 'timezone', 'favicon'); + themeConfig.should.have.keys('title', 'description', 'logo', 'cover', 'timezone', 'icon'); }); it('should have the correct values for each key', function () { @@ -61,7 +61,7 @@ describe('Config', function () { themeConfig.should.have.property('logo', 'casper'); themeConfig.should.have.property('cover', 'casper'); themeConfig.should.have.property('timezone', 'Etc/UTC'); - themeConfig.should.have.property('favicon', { + themeConfig.should.have.property('icon', { type: 'default', url: 'core/shared/favicon.ico' }); @@ -94,25 +94,25 @@ describe('Config', function () { }); describe('Favicon default', function () { - it('should use uploaded favicon', function () { + it('should use uploaded blog icon', function () { var themeConfig = config.get('theme'); // Check values are as we expect - themeConfig.should.have.property('favicon', { + themeConfig.should.have.property('icon', { type: 'default', url: 'core/shared/favicon.ico' }); configUtils.set({ theme: { - favicon: { + icon: { type: 'upload', url: 'content/images/favicon.ico' } } }); - config.get('theme').should.have.property('favicon', { + config.get('theme').should.have.property('icon', { type: 'upload', url: 'content/images/favicon.ico' }); @@ -123,7 +123,7 @@ describe('Config', function () { // Check values are as we expect themeConfig.should.have.property('theme'); - themeConfig.theme.should.have.property('favicon', { + themeConfig.theme.should.have.property('icon', { type: 'default', url: 'core/shared/favicon.ico' });