-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
95 lines (74 loc) · 2.38 KB
/
theme.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
import React from 'react'
import { DocsThemeConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
import Image from 'next/image'
const config: DocsThemeConfig = {
faviconGlyph:'🐄',
head: () =>{
const router = useRouter()
//console.log('logo',router)
if(router.locale == 'zh'){
return(
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="小牛书-零基础编程学习教程" />
<meta property="og:description" content="小牛叔的零基础编程学习教程,包括Python基础,Python类,AI应用,pygame游戏设计,大模型应用" />
<meta name="google-site-verification" content="gn-S40gtsUfPS5aCDnKb4pk1zUS3chBqE76dQPJkq1A" />
<title>小牛叔 - 零基础学编程</title>
</>
)}
else{
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Uncle Cow - Programming Tutorial For Beginers" />
<meta property="og:description" content="Programming Tutorial For Beginers,inluding Foundation,Class,AI,pygame,Big Modal" />
<meta name="google-site-verification" content="gn-S40gtsUfPS5aCDnKb4pk1zUS3chBqE76dQPJkq1A" />
<title>Uncle Cow - Programming Tutorial For Beginers</title>
</>
)
}
},
logo: ()=> {
const router = useRouter()
//console.log('logo',router)
if(router.locale == 'zh'){
return (
<div className='logo'>
<Image src="/images/xiaoniu.png" alt="logo" width={30} height={30} />
<h1>小牛叔 </h1>
<span> - 零基础学编程</span>
</div>
)
}else{
return (
<div className='logo'>
<Image src="/images/xiaoniu.png" alt="logo" width={30} height={30} />
<h1> Uncle Cow </h1>
<span> - Programming Tutorial For Beginers</span>
</div>
)
}
},
project: {
link: 'https://github.com/cowbook/tutorial',
},
i18n: [
{ locale: 'en', text: 'English' },
{ locale: 'zh', text: '中文' }
],
docsRepositoryBase: 'https://github.com/cowbook/tutorial',
footer: {
text: 'Copyright@ Shanghai ShiShilian Co.',
},
themeSwitch: {
useOptions() {
return {
light: 'Light',
dark: 'Dark',
system: 'Light'
}
}
}
}
export default config