Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 52bd9e1

Browse files
committed
Add favicon and html metadata guide
1 parent 1841b26 commit 52bd9e1

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Add Favicon and Metadata
3+
route: /docs/add-favicon-and-metadata
4+
parent: Documentation
5+
menu: Customizing
6+
---
7+
8+
To add a favicon and metadata to your generated gatsby site, follow this quick guide
9+
10+
Add [`react-helmet`](https://github.com/nfl/react-helmet) along with [`gatsby-plugin-react-helmet`](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-react-helmet)
11+
12+
[How do I add react-helmet to my docz app ?](https://www.gatsbyjs.org/docs/add-page-metadata/)
13+
14+
Once you've added react-helmet you can shadow the `src/wrapper.js` theme component to add metadata
15+
16+
so you would create a file : `src/gatsby-theme-docz/wrapper.js` (path is important) and inside it :
17+
18+
```js
19+
import * as React from 'react'
20+
import { Helmet } from 'react-helmet'
21+
22+
const Wrapper = ({ children }) => <React.Fragment>
23+
<Helmet>
24+
<meta charSet="utf-8" />
25+
<title>My Title</title>
26+
<link rel="icon"
27+
type="image/png"
28+
href="http://example.com/myicon.png"
29+
>
30+
</Helmet>
31+
{children}
32+
</React.Fragment>
33+
export default Wrapper
34+
35+
```
36+
37+
And that should do it 👍.

0 commit comments

Comments
 (0)