Skip to content

Commit 72eddc0

Browse files
test
1 parent 74e21a0 commit 72eddc0

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/lib/site-data.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export const SITE_URL = 'https://openmodeldb.info';
22

33
export const IS_DEPLOYED = typeof location !== 'undefined' && location.host === 'openmodeldb.info';
4+
5+
export const ADSENSE_PUBLISHER_ID = 'ca-pub-5286493112439303';

src/pages/_document.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Head, Html, Main, NextScript } from 'next/document';
22
import Script from 'next/script';
3+
import { ADSENSE_PUBLISHER_ID } from '../lib/site-data';
34

45
// This little script will read the last theme from localStorage and assign it to the HTML element.
56
// This ensure that the website is always displayed with the correct them.
@@ -22,6 +23,13 @@ export default function Document() {
2223
>
2324
{themeInit}
2425
</Script>
26+
<Script
27+
async
28+
crossOrigin="anonymous"
29+
id="google-adsense"
30+
src={`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${ADSENSE_PUBLISHER_ID}`}
31+
strategy="afterInteractive"
32+
/>
2533
</body>
2634
</Html>
2735
);

0 commit comments

Comments
 (0)