How to add language to html #17568
Answered
by
jamesmosier
adithyapaib
asked this question in
Help
-
Any way to add ? |
Beta Was this translation helpful? Give feedback.
Answered by
jamesmosier
Oct 2, 2020
Replies: 1 comment 1 reply
-
You could add a custom 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 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jamesmosier
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could add a custom
pages/_document.js
per the docs