-
Notifications
You must be signed in to change notification settings - Fork 1
/
gatsby-ssr.js
62 lines (61 loc) · 1.63 KB
/
gatsby-ssr.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
import React from 'react';
import { withPrefix } from 'gatsby';
export const onRenderBody = ({ setHeadComponents, setHtmlAttributes }) => {
setHtmlAttributes({ lang: 'en' });
// Support for apple-touch-icons may be soon part of gatsby-plugin-manifest
// https://github.com/gatsbyjs/gatsby/pull/7256
setHeadComponents([
<link
key={'apple-touch-icon'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-48x48.png')}
/>,
<link
key={'apple-touch-icon-72'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-72x72.png')}
sizes="72x72"
/>,
<link
key={'apple-touch-icon-96'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-96x96.png')}
sizes="96x96"
/>,
<link
key={'apple-touch-icon-144'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-144x144.png')}
sizes="144x144"
/>,
<link
key={'apple-touch-icon-192'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-192x192.png')}
sizes="192x192"
/>,
<link
key={'apple-touch-icon-256'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-256x256.png')}
sizes="256x256"
/>,
<link
key={'apple-touch-icon-384'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-384x384.png')}
sizes="384x384"
/>,
<link
key={'apple-touch-icon-512'}
rel="apple-touch-icon"
href={withPrefix('/icons/icon-512x512.png')}
sizes="512x512"
/>,
]);
};