import Document , { DocumentContext , Head , Html , Main , NextScript , } from "next/document" ; import * as dotenv from "dotenv" ; dotenv . config ( ) ; class MyDocument extends Document { static async getInitialProps ( ctx ) { const initialProps = await Document . getInitialProps ( ctx ) ; return initialProps ; } render ( ) { return ( < Html lang = "id" > < Head > < script async src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9674606173604380" crossOrigin = "anonymous" > < /script> < /Head> < body > < Main /> < NextScript / > < /body> < /Html>); } } export default MyDocument ;