Skip to content

Commit d349503

Browse files
committed
docs: test add a google ads block into right sidebar to keep the project work
1 parent 1bc3732 commit d349503

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

docs/docusaurus.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ const config = {
2929
locales: ['en'],
3030
},
3131

32+
scripts: [
33+
{
34+
src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7420210265158247',
35+
async: true,
36+
},
37+
],
38+
3239
presets: [
3340
[
3441
'classic',

docs/src/theme/TOC/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react'
2+
import TOC from '@theme-original/TOC'
3+
4+
export default function TOCWrapper(props) {
5+
return (
6+
<>
7+
<TOC {...props} />
8+
<script
9+
async
10+
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7420210265158247"
11+
crossOrigin="anonymous"
12+
/>
13+
<ins
14+
className="adsbygoogle"
15+
style={{ display: 'block' }}
16+
data-ad-client="ca-pub-7420210265158247"
17+
data-ad-slot="8711379942"
18+
data-ad-format="auto"
19+
data-full-width-responsive="true"
20+
/>
21+
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
22+
</>
23+
)
24+
}

0 commit comments

Comments
 (0)