Skip to content

Commit 0726327

Browse files
saurabhdawareBrian Vaughn
authored andcommitted
WebApp manifest added to allow users "Add to Homescreen" documentations (reactjs#2377)
* manifest config added and src/images/react_logo.png added for icon * inverted commas fix as per linter * added legacy:true option for ios * legacy:true lint fix * added meta tags for ios and moved logo from src to static
1 parent 0a7beeb commit 0726327

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

gatsby-config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,5 +159,18 @@ module.exports = {
159159
},
160160
'gatsby-plugin-react-helmet',
161161
'gatsby-plugin-catch-links',
162+
{
163+
resolve: `gatsby-plugin-manifest`,
164+
options: {
165+
name: 'React Docs',
166+
short_name: 'React',
167+
start_url: '/',
168+
background_color: '#20232a',
169+
theme_color: '#20232a',
170+
display: 'standalone',
171+
icon: 'static/logo-512x512.png',
172+
legacy: true,
173+
},
174+
},
162175
],
163176
};

src/html.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export default class HTML extends React.Component {
1919
content="width=device-width, initial-scale=1.0"
2020
/>
2121
<link rel="icon" href="/favicon.ico" />
22+
23+
<meta name="apple-mobile-web-app-capable" content="yes" />
24+
<link rel="apple-touch-icon" href="/logo-180x180.png" />
25+
<meta name="apple-mobile-web-app-title" content="React" />
26+
2227
{this.props.headComponents}
2328
</head>
2429
<body {...this.props.bodyAttributes}>

static/logo-180x180.png

9.43 KB
Loading

static/logo-512x512.png

41.4 KB
Loading

0 commit comments

Comments
 (0)