Skip to content

Commit 83a092c

Browse files
committed
added Ads code
1 parent ab7cb0c commit 83a092c

3 files changed

Lines changed: 40 additions & 3 deletions

File tree

docusaurus.config.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ const config: Config = {
6868
],
6969
],
7070

71+
stylesheets: [
72+
{
73+
href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",
74+
type: "text/css",
75+
integrity:
76+
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
77+
crossorigin: "anonymous",
78+
},
79+
],
80+
7181
themeConfig: {
7282
// Replace with your project's social card
7383
image: "img/docusaurus-social-card.jpg",
@@ -141,9 +151,21 @@ const config: Config = {
141151
copyright: `Copyright © ${new Date().getFullYear()} JavaScript Mastery. All rights reserved.`,
142152
},
143153
prism: {
144-
theme: prismThemes.github,
145-
darkTheme: prismThemes.dracula,
146-
},
154+
theme: prismThemes.github,
155+
darkTheme: prismThemes.dracula,
156+
additionalLanguages: [
157+
"java",
158+
"latex",
159+
"haskell",
160+
"matlab",
161+
"PHp",
162+
"powershell",
163+
"bash",
164+
"diff",
165+
"json",
166+
"scss",
167+
],
168+
},
147169
} satisfies Preset.ThemeConfig,
148170

149171
plugins: ["./src/plugins/tailwind-config.js"],

src/pages/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type {ReactNode} from 'react';
22
// import clsx from 'clsx';
33
// import Link from '@docusaurus/Link';
4+
import Head from "@docusaurus/Head";
45
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
56
import Layout from '@theme/Layout';
67
import {Community } from '@site/src/components/Community';
@@ -40,6 +41,19 @@ export default function Home(): ReactNode {
4041
<Layout
4142
title={`Hello from ${siteConfig.title}`}
4243
description="Description will go into a meta tag in <head />">
44+
<Head>
45+
<script
46+
async
47+
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5832817025080991"
48+
crossOrigin="anonymous"
49+
/>
50+
<script
51+
async
52+
custom-element="amp-auto-ads"
53+
src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"
54+
/>
55+
<meta name="google-adsense-account" content="ca-pub-5832817025080991" />
56+
</Head>
4357
{/* <HomepageHeader /> */}
4458
<main>
4559
<Hero />

static/ads.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google.com, pub-5832817025080991, DIRECT, f08c47fec0942fa0

0 commit comments

Comments
 (0)