forked from cncf/techdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.ts
96 lines (85 loc) · 2.18 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
// cSpell:ignore cncf
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const title = 'CNCF TechDocs';
const repo = 'https://github.com/cncf/techdocs';
const config: Config = {
title,
// tagline: '',
favicon:
'https://www.cncf.io/wp-content/themes/cncf-twenty-two/images/favicon.ico', // TODO: localize?
// Production URL:
url: 'https://cncf-techdocs.netlify.app/', // FIXME if/once we get a domain
baseUrl: '/',
// GitHub pages deployment config. TODO: this still useful?
organizationName: 'cncf',
projectName: 'techdocs',
onBrokenLinks: 'warn', // TODO: 'error' or 'throw' once we've fixed all links
onBrokenMarkdownLinks: 'warn',
trailingSlash: true,
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl: `${repo}/tree/main`,
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
// TODO: Replace with your project's social card
// image: 'img/docusaurus-social-card.jpg',
navbar: {
title,
logo: {
alt: 'Logo',
src: 'img/cncf-icon-color.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docSidebar',
position: 'left',
label: 'Docs',
},
],
},
footer: {
style: 'dark',
links: [
{
label: 'Licenses',
href: '/#licenses',
},
{
label: 'Privacy',
href: 'https://www.linuxfoundation.org/legal/privacy-policy',
},
{
label: 'Trademarks',
href: 'https://www.linuxfoundation.org/legal/trademark-usage',
},
{
label: 'GitHub',
href: repo,
},
],
copyright: `Copyright © ${title} Authors ${new Date().getFullYear()} `,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};
export default config;