forked from futo-org/Harbor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
154 lines (143 loc) · 3.99 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
154 lines (143 loc) · 3.99 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import tailwindPostcss from '@tailwindcss/postcss';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: 'Harbor',
tagline: 'Share to the world, not platforms.',
favicon: 'img/favicon.ico',
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: {
removeLegacyPostBuildHeadAttribute: true,
// The cascade-layers polyfill boosts Infima's specificity above
// custom.css, so :root overrides there never apply.
useCssCascadeLayers: false,
},
},
url: 'https://join.harbor.social',
baseUrl: '/',
organizationName: 'FUTO',
projectName: 'polycentric',
onBrokenLinks: 'throw',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [
// Tailwind (v4) for the landing pages; docs pages stay on Infima.
async function tailwindPlugin() {
return {
name: 'tailwind-plugin',
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(tailwindPostcss);
return postcssOptions;
},
};
},
],
presets: [
[
'classic',
{
docs: {
// Markdown content lives in ./content (not the Docusaurus default ./docs).
path: 'content',
// The landing page lives at the site root (src/pages/index.tsx);
// docs are served under /docs.
routeBasePath: 'docs',
sidebarPath: './src/sidebars.ts',
},
// No blog.
blog: false,
theme: {
customCss: ['./src/tailwind.css', './src/custom.css'],
},
} satisfies Preset.Options,
],
],
themeConfig: {
colorMode: {
// Default to dark, but still honor the user's stored/OS preference and
// keep the toggle.
defaultMode: 'dark',
respectPrefersColorScheme: true,
disableSwitch: false,
},
navbar: {
title: 'Harbor',
logo: {
alt: 'Harbor',
src: 'img/logo.png',
srcDark: 'img/logo-dark.png',
},
items: [
{
to: '/apps',
label: 'Apps',
position: 'right',
},
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
label: 'Docs',
position: 'right',
},
{
href: 'https://gitlab.futo.org/harbor/harbor',
label: 'Code',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Download',
items: [
{ label: 'Web app', href: 'https://harbor.social' },
{
label: 'Android APK',
href: 'https://static.harbor.social/apk/production/harbor-latest.apk',
},
{
label: 'iOS (TestFlight)',
href: 'https://testflight.apple.com/join/bZ8py7Ny',
},
],
},
{
title: 'Docs',
items: [
{ label: 'Introduction', to: '/docs' },
{ label: 'Running a Server', to: '/docs/running-a-server' },
{ label: 'Protocol', to: '/docs/protocol/overview' },
],
},
{
title: 'Community',
items: [{ label: 'Chat', href: 'https://chat.futo.org' }],
},
{
title: 'More',
items: [
{ label: 'App', href: 'https://harbor.social' },
{
label: 'GitLab',
href: 'https://gitlab.futo.org/polycentric/polycentric',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} FUTO Holdings, Inc.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['protobuf', 'bash'],
},
} satisfies Preset.ThemeConfig,
};
export default config;