-
Notifications
You must be signed in to change notification settings - Fork 20
/
theme.config.tsx
77 lines (73 loc) · 3.52 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
import React from 'react'
import { useRouter } from 'next/router'
import { useConfig } from 'nextra-theme-docs'
import { DocsThemeConfig } from 'nextra-theme-docs'
import { title } from 'process'
import Banner from './components/Banner'
const config: DocsThemeConfig = {
logo: <span>LangChain 🦜️🔗 中文网,跟着LangChain一起学LLM/GPT开发</span>,
project: {
link: 'https://github.com/liteli1987gmail/langchainzh'
},
docsRepositoryBase: 'https://github.com/liteli1987gmail/langchainzh',
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter } = useConfig()
console.log(frontMatter)
const url =
'https://www.langchain.com.cn' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`)
return <>
<link data-rh="true" rel="icon" href="https://js.langchain.com/img/favicon.ico"></link>
<meta name="keywords" content="langchain,LLM,chatGPT,应用开发" />
<meta name="description" content="LangChain中文站,助力大语言模型LLM应用开发、chatGPT应用开发。" />
<meta property="og:url" content={url} />
<meta property="og:description" content="LangChain中文站,助力大语言模型LLM应用开发、chatGPT应用开发。" />
</>
},
navbar:{
extraContent: (
<Banner/>
)
},
useNextSeoProps:() =>{
const { asPath } = useRouter()
var titleTemplate = ''
if (asPath !== '/') {
titleTemplate = `%s | LangChain中文网:500页中文文档教程,助力大模型LLM应用开发从入门到精通`
}else{
titleTemplate = `LangChain中文网:500页中文文档教程,助力大模型LLM应用开发从入门到精通`
}
return {
'titleTemplate':titleTemplate
}
},
banner: {
key: '2.0-release',
text: <a href="https://www.aiqbh.com/dalibao.html" target="_blank">🎉 学 LangChain 免费领 openAI GPT key 限额1000名 →</a>,
},
toc: {
float: true,
extraContent:(
<div>
<img src="https://www.aiqbh.com/qun.png" alt="扫我,入群" />
<img src="https://pic2.zhimg.com/100/v2-23e6630a548c962582265f27e8967cd1_qhd.jpg" alt="扫我,找书" />
</div>
)
},
footer: {
text: <div><span>MIT {new Date().getFullYear()} © <a href="https://www.langchain.com.cn/" target="_blank">Langchain中文网</a>. 跟着langchain学AI应用开发 </span>
<span><a href="https://github.com/hwchase17/langchain" target="_blank"> GitHub |</a></span>
<span><a href="https://www.r-p-a.com/llm-gpt-kaifa/" target="_blank"> LLM/GPT应用外包开发 |</a></span>
<span><a href="https://www.openaidoc.com.cn" target="_blank"> OpenAI 文档 |</a></span>
<span><a href="https://www.milvus-io.com" target="_blank"> Milvus 文档 |</a></span>
<span><a href="https://www.pinecone-io.com/ " target="_blank"> Pinecone 文档 </a></span>
<p>
<span><a href="https://www.Langchain.com" target="_blank"> Langchain英文站 | </a></span>
<span><a href="https://js.langchain.com.cn/docs/" target="_blank"> Langchain JS/TS 文档 |</a></span>
<span><a href="https://DMXAPI.com" target="_blank"> 大模型API聚合 |</a></span>
<a href="https://beian.miit.gov.cn/"><span> <img style={{ display: "inline-block",height: "19px" }} src="https://mbdp01.bdstatic.com/static/landing-pc/img/icon_police.7296bdfd.png" alt="" /> 沪ICP备2023014280号-3</span></a></p>
</div>
}
}
export default config