-
Notifications
You must be signed in to change notification settings - Fork 3
/
docusaurus.config.ts
107 lines (103 loc) · 2.53 KB
/
docusaurus.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
106
107
import type {Config} from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
const themeConfig: Preset.ThemeConfig = {
image: 'img/android-chrome-512x512.png', // meta image for social media
colorMode: {
respectPrefersColorScheme: true
},
navbar: {
title: 'conveyal',
logo: {
alt: 'Conveyal Logo',
src: 'img/logo.svg'
},
items: [
{
to: '/',
label: 'Docs',
position: 'left'
},
{
to: 'changelog',
label: 'Changelog',
position: 'left'
},
{
href: 'https://conveyal.com/contact',
label: 'Contact',
position: 'right'
},
{
href: 'https://analysis.conveyal.com',
label: 'Log in',
position: 'right'
},
{
href: 'https://github.com/conveyal',
className: 'header-github-link',
'aria-label': 'GitHub Org',
position: 'right'
}
]
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} Conveyal, LLC`
}
} satisfies Preset.ThemeConfig
if (process.env.ALGOLIA_API_KEY) {
themeConfig.algolia = {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
indexName: process.env.ALGOLIA_INDEX_NAME
}
}
const config: Config = {
title: 'Conveyal User Manual',
tagline: 'User manual for Conveyal',
url: 'https://docs.conveyal.com',
baseUrl: '/',
onBrokenLinks: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'conveyal',
projectName: 'docs',
themeConfig,
trailingSlash: false,
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
breadcrumbs: false,
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/conveyal/docs/edit/master'
},
blog: {
path: './changelog',
routeBasePath: '/changelog',
blogTitle: 'Changelog',
blogDescription: 'Updates to Conveyal Analysis',
blogSidebarTitle: 'Latest changes',
blogSidebarCount: 1,
postsPerPage: 3,
showReadingTime: false
},
theme: {
customCss: require.resolve('./custom.css'),
},
sitemap: { // for crawlers
changefreq: 'weekly',
priority: 0.5
}
}
]
],
scripts: [{
src: '/js/external/script.js',
async: true,
defer: true,
'data-api': '/api/external/event',
'data-domain': 'docs.conveyal.com'
}]
}
export default config