-
Notifications
You must be signed in to change notification settings - Fork 50
/
docusaurus.config.js
153 lines (148 loc) · 4.43 KB
/
docusaurus.config.js
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
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const CURRENT_STABLE_VERSION = "v2.2.1";
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: "Espanso",
tagline: "A Privacy-first, Cross-platform Text Expander",
url: "https://espanso.org",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "espanso", // Usually your GitHub org/user name.
projectName: "espanso", // Usually your repo name.
trailingSlash: true,
themeConfig: {
navbar: {
title: "Espanso",
logo: {
alt: "Espanso Logo",
src: "img/logo.png",
},
items: [
{
href: "/",
label: "Home",
position: "left",
},
{
href: "/install",
label: "Installation",
position: "left",
},
{
type: "doc",
docId: "get-started",
position: "left",
label: "Documentation",
},
{
href: "https://hub.espanso.org",
label: "Packages",
position: "left",
},
{
href: "https://www.reddit.com/r/espanso/",
label: "Community",
position: "left",
},
{
href: "https://github.com/espanso/espanso",
label: "GitHub",
position: "left",
},
{
href: "https://discord.gg/4QARseMS6k",
label: "Discord",
position: "left",
},
{
href: "/donate",
label: "Donate ❤",
position: "right",
},
{
type: "docsVersionDropdown",
position: "right",
dropdownItemsAfter: [{ to: "/versions", label: "All versions" }],
dropdownActiveClassDisabled: true,
},
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
colorMode: {
respectPrefersColorScheme: true,
},
algolia: {
// The application ID provided by Algolia
appId: "51GAZM4GBC",
// Public API key: it is safe to commit it
apiKey: "dc17ed7f938bd80016738928e74844c6",
indexName: "espanso",
disableUserPersonalization: true,
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/espanso/website/edit/main/",
lastVersion: "current",
versions: {
current: {
label: CURRENT_STABLE_VERSION,
},
"0.7.3": {
label: "v0.7.3 (Legacy)",
path: "legacy",
},
},
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
customFields: {
CURRENT_STABLE_VERSION,
LINUX_X11_APP_IMAGE_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/Espanso-X11.AppImage",
LINUX_X11_DEB_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/espanso-debian-x11-amd64.deb",
LINUX_WAYLAND_DEB_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/espanso-debian-wayland-amd64.deb",
MAC_INTEL_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/Espanso-Mac-Intel.zip",
MAC_M1_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/Espanso-Mac-M1.zip",
WIN_INSTALLER_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/Espanso-Win-Installer-x86_64.exe",
WIN_PORTABLE_DOWNLOAD_URL:
"https://github.com/espanso/espanso/releases/download/{{{VERSION}}}/Espanso-Win-Portable-x86_64.zip",
},
plugins: [
function pluginGoogleAnalytics(context) {
return {
name: "cloudflare-analytics",
injectHtmlTags() {
return {
postBodyTags: [
{
tagName: "div",
innerHTML:
"<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{\"token\": \"4103df9978fb402f87bbdeaf2e0529e6\"}'></script><!-- End Cloudflare Web Analytics -->",
},
],
};
},
};
},
],
};