Browse Source

WebApp manifest added to allow users "Add to Homescreen" documentations (#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
main
Saurabh Daware 5 years ago
committed by Brian Vaughn
parent
commit
0726327dbb
  1. 13
      gatsby-config.js
  2. 5
      src/html.js
  3. BIN
      static/logo-180x180.png
  4. BIN
      static/logo-512x512.png

13
gatsby-config.js

@ -159,5 +159,18 @@ module.exports = {
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-catch-links',
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'React Docs',
short_name: 'React',
start_url: '/',
background_color: '#20232a',
theme_color: '#20232a',
display: 'standalone',
icon: 'static/logo-512x512.png',
legacy: true,
},
},
],
};

5
src/html.js

@ -19,6 +19,11 @@ export default class HTML extends React.Component {
content="width=device-width, initial-scale=1.0"
/>
<link rel="icon" href="/favicon.ico" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="/logo-180x180.png" />
<meta name="apple-mobile-web-app-title" content="React" />
{this.props.headComponents}
</head>
<body {...this.props.bodyAttributes}>

BIN
static/logo-180x180.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
static/logo-512x512.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Loading…
Cancel
Save