forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_document.js
More file actions
30 lines (27 loc) · 949 Bytes
/
Copy path_document.js
File metadata and controls
30 lines (27 loc) · 949 Bytes
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
import React from 'react'
import PropTypes from 'prop-types'
import Document, { Head, Main, NextScript } from 'next/document'
export default class MyDocument extends Document {
static getInitialProps ({ renderPage }) {
const {html, head, errorHtml, chunks} = renderPage()
return { html, head, errorHtml, chunks }
}
static contextTypes = { theme: PropTypes.object };
render () {
return (
<html lang='en'>
<Head>
<title>My page</title>
<meta charSet='utf-8' />
<meta name='viewport' content='user-scalable=0, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height' />
<meta name='theme-color' content='yellowgreen' />
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:300,400,500' />
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
)
}
}