Skip to content

Commit 1c92dba

Browse files
committed
toc_ad
1 parent 353a636 commit 1c92dba

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
export DENO_INSTALL="/home/runner/.deno"
1818
export PATH="$DENO_INSTALL/bin:$PATH"
1919
deno --version
20-
deno install --unstable --allow-read --allow-write --allow-net -n pagic https://deno.land/x/pagic@0.7.14-debug.1/mod.ts
20+
deno install --unstable --allow-read --allow-write --allow-net -n pagic https://deno.land/x/pagic@0.7.15/mod.ts
2121
pagic build
2222
2323
- name: Deploy

pagic.config.tsx

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ export default {
77
theme: 'docs',
88
plugins: ['sidebar', 'script', 'gitalk', 'ga'],
99
title: 'TypeScript 入门教程',
10-
head: (
11-
<>
12-
<link rel="icon" type="image/png" href="/favicon.png" />
13-
<script
14-
data-ad-client="ca-pub-8483371329009107"
15-
async
16-
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
17-
/>
18-
</>
19-
),
10+
head: <link rel="icon" type="image/png" href="/favicon.png" />,
11+
nav: [
12+
{
13+
text: '赞助作者',
14+
link: 'https://github.com/xcatliu/buy-me-a-coffee'
15+
},
16+
{
17+
text: 'GitHub',
18+
link: 'https://github.com/xcatliu/typescript-tutorial',
19+
align: 'right'
20+
}
21+
],
2022
sidebar: [
2123
{
2224
link: 'introduction/README.md',
@@ -61,17 +63,22 @@ export default {
6163
},
6264
'thanks/README.md'
6365
],
64-
nav: [
65-
{
66-
text: '赞助作者',
67-
link: 'https://github.com/xcatliu/buy-me-a-coffee'
68-
},
69-
{
70-
text: 'GitHub',
71-
link: 'https://github.com/xcatliu/typescript-tutorial',
72-
align: 'right'
73-
}
74-
],
66+
tocAd: (
67+
<div
68+
dangerouslySetInnerHTML={{
69+
__html: `
70+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
71+
<!-- 192*128 -->
72+
<ins class="adsbygoogle"
73+
style="display:inline-block;width:192px;height:128px"
74+
data-ad-client="ca-pub-8483371329009107"
75+
data-ad-slot="6487368873"></ins>
76+
<script>
77+
(adsbygoogle = window.adsbygoogle || []).push({});
78+
</script>`
79+
}}
80+
/>
81+
),
7582
gitalk: {
7683
clientID: '29aa4941759fc887ed4f',
7784
clientSecret: '33e355efdf3a1959624506a5d88311145208471b',

0 commit comments

Comments
 (0)