Repository navigation
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
183 lines (174 loc) · 5.69 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
183 lines (174 loc) · 5.69 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// Note: type annotations allow type checking and IDEs autocompletion
// @ts-check
// https://github.com/FormidableLabs/prism-react-renderer
const { themes: prismThemes } = require("prism-react-renderer");
const lightCodeTheme = prismThemes.nightOwlLight;
const darkCodeTheme = prismThemes.nightOwl;
// Adding reusable information
const githubOrgUrl = "https://github.com/AktechLabs";
const domain = "https://docs.cirun.io";
// -----------------------------------------------------------------------------
// custom Fields for the project
const customFields = {
copyright: `Copyright © 2021-${new Date().getFullYear()} Cirun.io`,
// indexBaseUrl: true,
meta: {
title: "Cirun.io",
tagline: "Cirun Documentation",
description: "Cirun Documentation: GitHub Actions on Your Cloud",
keywords: [
"Cirun",
"Github Actions",
"Cirun cloud",
"Cloud Authentication",
],
url: "https://cirun.io/cirun-summary-image-v4.png",
},
domain,
githubOrgUrl,
githubUrl: `${githubOrgUrl}/cirun-docs`,
};
// -----------------------------------------------------------------------------
// Main site config
/** @type {import('@docusaurus/types').Config} */
const config = {
title: customFields.meta.title,
tagline: customFields.meta.tagline,
url: customFields.domain,
baseUrl: "/",
onBrokenLinks: "throw",
favicon: "img/favicon.ico",
markdown: {
hooks: {
onBrokenMarkdownLinks: "warn",
},
},
staticDirectories: ["static"],
i18n: {
defaultLocale: "en",
locales: ["en"],
},
// Plugings need installing first then add here
plugins: [
"docusaurus-plugin-sass",
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
indexDocs: true,
indexBlog: false,
docsRouteBasePath: "/",
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
},
],
[
"posthog-docusaurus",
{
apiKey: "phc_x2uy37fA6ConsPdNndl4JF0CoqyIpu1999jQsOfRaT9",
appUrl: "https://eu.i.posthog.com",
enableInDevelopment: false,
},
],
],
customFields: { ...customFields },
// ---------------------------------------------------------------------------
// Edit presets
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/",
path: "docs",
admonitions: {
keywords: ["note", "tip", "info", "caution", "danger"],
},
sidebarPath: require.resolve("./sidebars.js"),
sidebarCollapsible: true,
},
blog: false,
theme: {
customCss: require.resolve("./src/scss/application.scss"),
},
}),
],
],
// ---------------------------------------------------------------------------
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "https://cirun.io/cirun-summary-image-v4.png",
metadata: [
{ property: "og:type", content: "website" },
{ property: "og:site_name", content: "Cirun.io" },
],
docs: {
sidebar: {
autoCollapseCategories: false,
hideable: false,
},
},
colorMode: {
defaultMode: "dark",
disableSwitch: true,
respectPrefersColorScheme: false,
},
navbar: {
// title: customFields.meta.title,
logo: {
alt: "Cirun Documentation",
src: "img/cirun-logo-light.svg",
srcDark: "img/cirun-logo-dark.svg",
},
hideOnScroll: false,
items: [
{ to: "/", label: "Introduction", position: "left", activeBaseRegex: "^/$" },
{ to: "/quickstart", label: "Quickstart", position: "left" },
{ to: "/reference/", label: "Reference", position: "left" },
{ to: "/cloud/", label: "Cloud", position: "left" },
{ to: "/caching/", label: "Caching", position: "left" },
{
href: customFields.githubUrl,
position: "right",
className: "header-github-link",
"aria-label": "Cirun GitHub repository",
},
{
href: "https://cirun.io/login",
label: "Get Started",
position: "right",
className: "navbar-cta",
},
],
},
footer: {
links: [
{
items: [
{ label: "Home", href: "https://cirun.io" },
{ label: "Pricing", href: "https://cirun.io/pricing" },
{ label: "Quickstart", to: "/quickstart" },
{ label: "Reference", to: "/reference/" },
{ label: "About", href: "https://aktechlabs.com/about/" },
{ label: "Blog", href: "https://aktechlabs.com/blog/" },
{ label: "Status", href: "https://cirun.instatus.com/" },
{ label: "Terms", href: "https://docs.cirun.io/terms-of-service" },
{ label: "Privacy", href: "https://docs.cirun.io/privacy-policy" },
{ label: "GitHub", href: "https://github.com/AktechLabs/cirun-docs", className: "footer-icon footer-icon-github" },
{ label: "Twitter", href: "https://twitter.com/CirunHQ", className: "footer-icon footer-icon-twitter" },
{ label: "Slack", href: "https://slack.cirun.io", className: "footer-icon footer-icon-slack" },
],
},
],
copyright: `© 2021-${new Date().getFullYear()} Cirun.io, Aktech Labs`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['yaml', 'bash', 'json', 'javascript', 'typescript'],
},
}),
};
module.exports = config;