Skip to content

Commit

Permalink
Add html lang tag to the website (#2544)
Browse files Browse the repository at this point in the history
Google Chrome often asks me whether I want to translate the machines
page to English. It turns out this is because of misidentification, and
the lack of `lang` attribute.

Related:
- shuding/nextra#1634

References:
-
https://dev.to/dawsoncodes/how-to-set-html-lang-attribute-in-nextjs-39bg
-
https://nextjs.org/docs/pages/building-your-application/routing/custom-document
  • Loading branch information
ben-z authored Mar 30, 2024
1 parent eb7c527 commit a19d602
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from 'next/document'

export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}

0 comments on commit a19d602

Please sign in to comment.