Skip to content

Commit

Permalink
feat(gatsby-plugin-netlify-cms): add custom favicon to cms (#14883)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Patty authored and wardpeet committed Jul 12, 2019
1 parent 1dbe332 commit 2cf13ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/gatsby-plugin-netlify-cms/README.md
Expand Up @@ -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
Expand All @@ -185,6 +192,7 @@ plugins: [
enableIdentityWidget: true,
publicPath: `admin`,
htmlTitle: `Content Manager`,
htmlFavicon: `path/to/favicon`,
},
},
]
Expand Down
2 changes: 2 additions & 0 deletions packages/gatsby-plugin-netlify-cms/src/gatsby-node.js
Expand Up @@ -96,6 +96,7 @@ exports.onCreateWebpackConfig = (
publicPath = `admin`,
enableIdentityWidget = true,
htmlTitle = `Content Manager`,
htmlFavicon = ``,
manualInit = false,
}
) => {
Expand Down Expand Up @@ -157,6 +158,7 @@ exports.onCreateWebpackConfig = (
// Auto generate CMS index.html page.
new HtmlWebpackPlugin({
title: htmlTitle,
favicon: htmlFavicon,
chunks: [`cms`],
excludeAssets: [/cms.css/],
}),
Expand Down

0 comments on commit 2cf13ae

Please sign in to comment.