79e717a76b
* Add AMP First example The sample demonstrates how to build an AMP First Site with AMP. If follows all the best-practices recommended by Lighthouse and will result in a fully-qualified PWA. Live demo of the page: https://my-next-app.sebastianbenz.now.sh/#development=1 * small improvements to AmpScript and AmpState * remove gitignore * Update example * Move styles down in Layout * Apply lint fix and tweak prop-types * Add warning for host header usage
25 lines
573 B
JavaScript
25 lines
573 B
JavaScript
// _document is only rendered on the server side and not on the client side
|
|
// Event handlers like onClick can't be added to this file
|
|
|
|
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
|
|
|
class MyDocument extends Document {
|
|
static async getInitialProps(ctx) {
|
|
const initialProps = await Document.getInitialProps(ctx)
|
|
return { ...initialProps }
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<Html lang="en">
|
|
<Head />
|
|
<body>
|
|
<Main />
|
|
<NextScript />
|
|
</body>
|
|
</Html>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default MyDocument
|