mirror of
https://github.com/dzeiocom/markblog.git
synced 2025-07-28 15:39:50 +00:00
26
pages/_document.tsx
Normal file
26
pages/_document.tsx
Normal file
@ -0,0 +1,26 @@
|
||||
// _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
|
||||
|
||||
// ./pages/_document.js
|
||||
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>
|
||||
<Head />
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument
|
Reference in New Issue
Block a user