This repository was archived by the owner on Feb 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
158 lines (147 loc) · 3.93 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
158 lines (147 loc) · 3.93 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
155
156
157
158
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import npm2yarn from '@docusaurus/remark-plugin-npm2yarn';
// Centralized URLs — self-hosters can override via environment variables
const LANDING_URL = process.env.KEYWAY_LANDING_URL || 'https://keyway.sh';
const DASHBOARD_URL = process.env.KEYWAY_DASHBOARD_URL || 'https://app.keyway.sh';
const DOCS_URL = process.env.KEYWAY_DOCS_URL || 'https://docs.keyway.sh';
const API_BASE_URL = process.env.KEYWAY_API_URL || 'https://api.keyway.sh';
const STATUS_URL = process.env.KEYWAY_STATUS_URL || 'https://status.keyway.sh';
const GITHUB_ORG_URL = process.env.KEYWAY_GITHUB_ORG_URL || 'https://github.com/keywaysh';
const CLI_INSTALL_URL = process.env.KEYWAY_CLI_INSTALL_URL || `${LANDING_URL}/install.sh`;
const config: Config = {
title: 'Keyway Documentation',
tagline: 'GitHub-native secrets management for teams',
favicon: 'img/favicon.svg',
future: {
v4: true,
},
url: DOCS_URL,
baseUrl: '/',
organizationName: 'keywaysh',
projectName: 'keyway-docs',
onBrokenLinks: 'throw',
customFields: {
apiBaseUrl: API_BASE_URL,
dashboardUrl: DASHBOARD_URL,
landingUrl: LANDING_URL,
docsUrl: DOCS_URL,
statusUrl: STATUS_URL,
githubOrgUrl: GITHUB_ORG_URL,
cliInstallUrl: CLI_INSTALL_URL,
},
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl: `${GITHUB_ORG_URL}/keyway-docs/tree/main/`,
routeBasePath: '/', // Docs at root
remarkPlugins: [[npm2yarn, {sync: true, converters: ['pnpm', 'yarn']}]],
},
blog: false, // Disable blog
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
image: 'img/docusaurus-social-card.jpg',
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: true,
},
navbar: {
title: 'Keyway',
logo: {
alt: 'Keyway Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Docs',
},
{
to: '/api',
label: 'API Reference',
position: 'left',
},
{
href: LANDING_URL,
label: 'Website',
position: 'right',
},
{
href: `${GITHUB_ORG_URL}/keyway-cli`,
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Documentation',
items: [
{
label: 'Getting Started',
to: '/',
},
{
label: 'API Reference',
to: '/api',
},
],
},
{
title: 'Resources',
items: [
{
label: 'CLI on npm',
href: 'https://www.npmjs.com/package/@keywaysh/cli',
},
{
label: 'GitHub',
href: GITHUB_ORG_URL,
},
{
label: 'Status',
href: STATUS_URL,
},
],
},
{
title: 'Company',
items: [
{
label: 'Website',
href: LANDING_URL,
},
{
label: 'Terms of Service',
href: `${LANDING_URL}/terms`,
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Keyway. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'json'],
},
} satisfies Preset.ThemeConfig,
};
export default config;