dair-ai_Prompt-Engineering-Guide
/
theme.config.tsx
74 строки · 2.3 Кб
1import React from 'react'
2import { DocsThemeConfig } from 'nextra-theme-docs'
3import { useConfig } from 'nextra-theme-docs'
4import { Pre } from './components/pre'
5
6const config: DocsThemeConfig = {
7logo: (
8<>
9<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 206 246" fill="none">
10<circle cx="40" cy="40" r="40" fill="currentColor"/>
11<circle cx="40" cy="206" r="40" fill="currentColor"/>
12<circle cx="166" cy="120" r="40" fill="currentColor"/>
13</svg>
14<span style={{ marginLeft: '.4em', fontWeight: 800 }}>
15Prompt Engineering Guide
16</span>
17</>
18),
19i18n: [
20{ locale: 'en', text: 'English' },
21{ locale: 'zh', text: '中文' },
22{ locale: 'jp', text: '日本語'},
23{ locale: 'pt', text: 'Português' },
24{ locale: 'it', text: 'Italian' },
25{ locale: 'tr', text: 'Türkçe' },
26{ locale: 'es', text: 'Español' },
27{ locale: 'fr', text: 'Français' },
28{ locale: 'kr', text: '한국어' },
29{ locale: `ca`, text: `Català` },
30{ locale: 'fi', text: 'Finnish' },
31{ locale: 'ru', text: 'Русский' },
32{ locale: 'de', text: 'Deutsch' },
33],
34head: function UseHead() {
35const { title } = useConfig()
36return (
37<>
38<title>{title ? title + ' | Prompt Engineering Guide': 'Prompt Engineering Guide'} </title>
39<meta name="viewport" content="width=device-width, initial-scale=1.0" />
40<meta property="og:title" content="Prompt Engineering Guide" />
41<meta property="og:description" content="A Comprehensive Overview of Prompt Engineering" />
42<meta
43name="og:title"
44content={title ? title + ' | Prompt Engineering Guide' : 'Prompt Engineering Guide'}
45/>
46<link rel="icon" href="/144-favicon.svg" type="image/svg+xml" />
47
48<link
49rel="icon"
50href="/144-favicon-dark.svg"
51type="image/svg+xml"
52media="(prefers-color-scheme: dark)"
53/>
54</>
55)},
56project: {
57link: 'https://github.com/dair-ai/Prompt-Engineering-Guide',
58},
59chat: {
60link: 'https://discord.gg/FUyz9vPAwf',
61},
62docsRepositoryBase: 'https://github.com/dair-ai/Prompt-Engineering-Guide/tree/main/',
63footer: {
64text: 'Copyright © 2024 DAIR.AI',
65},
66search: {
67placeholder: 'Search...',
68},
69components: {
70pre: Pre,
71},
72}
73
74export default config
75