-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
pagic.config.tsx
133 lines (132 loc) · 3.75 KB
/
pagic.config.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import { React } from 'https://deno.land/x/[email protected]/mod.ts';
export default {
srcDir: '.',
exclude: ['examples'],
theme: 'docs',
plugins: ['sidebar', 'prev_next', 'gitalk', 'ga'],
title: 'TypeScript 入门教程',
description: '从 JavaScript 程序员的角度总结思考,循序渐进的理解 TypeScript',
github: 'https://github.com/xcatliu/typescript-tutorial',
head: <link rel="icon" type="image/png" href="/favicon.png" />,
nav: [
{
text: '赞助作者',
link: 'https://github.com/xcatliu/buy-me-a-coffee',
target: '_blank',
popover: (
<>
<img src="/assets/wechat.jpg" width="256" style={{ marginRight: '1rem', verticalAlign: 'top' }} />
<img src="/assets/alipay.jpg" width="256" style={{ verticalAlign: 'top' }} />
</>
),
},
{
text: '加入微信群',
popover: (
<>
<p style={{ marginTop: 0, marginBottom: '1rem', width: 256 }}>一群已满,请扫码加二群</p>
<img src="/assets/join-wechat.jpg" width="256" />
</>
),
},
{
text: '加入 QQ 群',
link: 'https://jq.qq.com/?_wv=1027&k=5nkkFCl',
target: '_blank',
popover: (
<>
<p style={{ marginTop: 0, marginBottom: '1rem', width: 256 }}>
一群(767142358)已满,请扫码加二群(706191218)
</p>
<img src="/assets/join-qq.jpg" width="256" />
</>
),
},
{
text: '本网站使用 Pagic 构建',
link: 'https://github.com/xcatliu/pagic',
target: '_blank',
},
],
sidebar: {
'/': [
{
link: 'introduction/README.md',
children: [
'introduction/what-is-typescript.md',
'introduction/get-typescript.md',
'introduction/hello-typescript.md',
],
},
{
link: 'basics/README.md',
children: [
'basics/primitive-data-types.md',
'basics/any.md',
'basics/type-inference.md',
'basics/union-types.md',
'basics/type-of-object-interfaces.md',
'basics/type-of-array.md',
'basics/type-of-function.md',
'basics/type-assertion.md',
'basics/declaration-files.md',
'basics/built-in-objects.md',
],
},
{
link: 'advanced/README.md',
children: [
'advanced/type-aliases.md',
'advanced/string-literal-types.md',
'advanced/tuple.md',
'advanced/enum.md',
'advanced/class.md',
'advanced/class-and-interfaces.md',
'advanced/generics.md',
'advanced/declaration-merging.md',
'advanced/decorator.md',
'advanced/further-reading.md',
],
},
{
link: 'engineering/README.md',
children: ['engineering/lint.md', 'engineering/compiler-options.md'],
},
'thanks/README.md',
],
},
tools: {
editOnGitHub: true,
backToTop: true,
},
// tocAd: (
// <div
// dangerouslySetInnerHTML={{
// __html: `
// <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
// <!-- 192*128 -->
// <ins
// class="adsbygoogle"
// style="display:inline-block;width:192px;height:128px"
// data-ad-client="ca-pub-8483371329009107"
// data-ad-slot="6487368873"
// ></ins>
// <script>
// (adsbygoogle = window.adsbygoogle || []).push({});
// </script>`
// }}
// />
// ),
gitalk: {
clientID: '29aa4941759fc887ed4f',
clientSecret: '33e355efdf3a1959624506a5d88311145208471b',
repo: 'typescript-tutorial',
owner: 'xcatliu',
admin: ['xcatliu'],
pagerDirection: 'first',
},
ga: {
id: 'UA-45256157-14',
},
port: 8001,
};