Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-plugin-netlify-cms): add custom favicon to cms section #14883

Merged
merged 2 commits into from Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -55,6 +55,7 @@ exports.onCreateWebpackConfig = (
publicPath = `admin`,
enableIdentityWidget = true,
htmlTitle = `Content Manager`,
htmlFavicon = ``,
manualInit = false,
}
) => {
Expand Down Expand Up @@ -135,6 +136,7 @@ exports.onCreateWebpackConfig = (
*/
new HtmlWebpackPlugin({
title: htmlTitle,
favicon: htmlFavicon,
chunks: [`cms`],
excludeAssets: [/cms.css/],
}),
Expand Down