/
config.ts
105 lines (103 loc) · 1.99 KB
/
config.ts
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
import { defineConfig } from 'vitepress';
import KnexDialectsPlugins from './knexDialects';
export default defineConfig({
title: 'Knex.js',
description: 'Beta knex.js documentation.',
base: '/',
srcDir: 'src',
head: [['link', { rel: 'icon', type: 'image/png', href: '/knex-logo.png' }]],
themeConfig: {
logo: '/knex-logo.png',
repo: 'knex/knex',
docsRepo: 'knex/knex',
docsDir: 'docs/src',
docsBranch: 'main',
editLinks: true,
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
nav: [
{ text: 'Guide', link: '/guide/', activeMatch: '^/guide/' },
{
text: 'F.A.Q.',
link: '/faq/',
},
{
text: 'Changelog',
link: '/changelog.html',
},
],
sidebar: {
'/guide/': getGuideSidebar(),
'/faq/': getFaqSidebar(),
},
algolia: {
appId: 'V7E3EHUPD6',
apiKey: '44b5077836c1c8fba0f364383dde7fb4',
indexName: 'knex',
initialQuery: '',
},
},
vite: {
plugins: [KnexDialectsPlugins()],
},
});
function getGuideSidebar() {
return [
{
text: 'Installation',
link: '/guide/',
},
{
text: 'Query Builder',
link: '/guide/query-builder',
},
{
text: 'Transactions',
link: '/guide/transactions',
},
{
text: 'Schema Builder',
link: '/guide/schema-builder',
},
{
text: 'Raw',
link: '/guide/raw',
},
{
text: 'Ref',
link: '/guide/ref',
},
{
text: 'Utility',
link: '/guide/utility',
},
{
text: 'Interfaces',
link: '/guide/interfaces',
},
{
text: 'Migrations',
link: '/guide/migrations',
},
{
text: 'Extending',
link: '/guide/extending',
},
];
}
function getFaqSidebar() {
return [
{
text: 'F.A.Q.',
link: '/faq/',
},
{
text: 'Recipes',
link: '/faq/recipes',
},
{
text: 'Support',
link: '/faq/support',
},
];
}