From 851bf89bf6d32d98894224e49ecb278e08e8a638 Mon Sep 17 00:00:00 2001 From: Chris Patty Date: Tue, 18 Jun 2019 13:55:31 -0600 Subject: [PATCH 1/2] Addes the ability to define a favicon in the netlify-cms app --- packages/gatsby-plugin-netlify-cms/README.md | 8 ++++++++ packages/gatsby-plugin-netlify-cms/src/gatsby-node.js | 2 ++ 2 files changed, 10 insertions(+) diff --git a/packages/gatsby-plugin-netlify-cms/README.md b/packages/gatsby-plugin-netlify-cms/README.md index cd869e9e19b7e..0adf853eee194 100644 --- a/packages/gatsby-plugin-netlify-cms/README.md +++ b/packages/gatsby-plugin-netlify-cms/README.md @@ -171,6 +171,13 @@ Customize the path to Netlify CMS on your Gatsby site. Customize the value of the `title` tag in your CMS HTML (shows in the browser bar). +### `htmlFavicon` + +(_optional_, type: `string`, default: `""`) + +Customize the value of the `favicon` tag in your CMS HTML (shows in the browser +bar). + ## Example Here is the plugin with example values for all options (note that no option is @@ -185,6 +192,7 @@ plugins: [ enableIdentityWidget: true, publicPath: `admin`, htmlTitle: `Content Manager`, + htmlFavicon: `path/to/favicon`, }, }, ] diff --git a/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js b/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js index bd805360bb81c..6d3c49385020b 100644 --- a/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js +++ b/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js @@ -55,6 +55,7 @@ exports.onCreateWebpackConfig = ( publicPath = `admin`, enableIdentityWidget = true, htmlTitle = `Content Manager`, + htmlFavicon = ``, manualInit = false, } ) => { @@ -135,6 +136,7 @@ exports.onCreateWebpackConfig = ( */ new HtmlWebpackPlugin({ title: htmlTitle, + favicon: htmlFavicon, chunks: [`cms`], excludeAssets: [/cms.css/], }), From 255a81fc53c3041a538fb2d759463b9985a9b10b Mon Sep 17 00:00:00 2001 From: Chris Patty Date: Tue, 18 Jun 2019 14:05:01 -0600 Subject: [PATCH 2/2] Ran prettier to fix formatting issue --- packages/gatsby-plugin-netlify-cms/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-plugin-netlify-cms/README.md b/packages/gatsby-plugin-netlify-cms/README.md index 0adf853eee194..84f2fd8303277 100644 --- a/packages/gatsby-plugin-netlify-cms/README.md +++ b/packages/gatsby-plugin-netlify-cms/README.md @@ -175,7 +175,7 @@ bar). (_optional_, type: `string`, default: `""`) -Customize the value of the `favicon` tag in your CMS HTML (shows in the browser +Customize the value of the `favicon` tag in your CMS HTML (shows in the browser bar). ## Example