-
Notifications
You must be signed in to change notification settings - Fork 4
/
docusaurus.config.js
167 lines (150 loc) · 4.96 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// USAGE: Config object can be accessed via React context as `{siteConfig}`
// See: https://docusaurus.io/docs/configuration#custom-configurations
/** @type {import('@docusaurus/types').Config} */
import { themes as prismThemes } from "prism-react-renderer";
import { manageCookieLabel } from "./constants.js";
const config = {
// CONFIG: Add Custom Fields - globally reference them from siteConfig
// See: https://docusaurus.io/docs/deployment#using-environment-variables
customFields: {
env: process.env.REACT_APP_GITHUB_TOKEN,
description:
"Your one-stop for everything Azure Cosmos DB. Code samples, docs, videos, decks, etc. Everything in one location. Community contributions are welcome.",
},
// CONFIG: Landing Pages uses this (also globally via siteConfig)
title: "Azure Cosmos DB Gallery",
tagline: "Discover - Create - Contribute",
// CONIFIG: Used for GitHub Pages
url: "https://azurecosmosdb.github.io",
baseUrl: "/gallery/",
favicon: "img/favicon.ico",
organizationName: "azurecosmosdb",
projectName: "gallery",
deploymentBranch: "gh-pages",
// CONFIG: Early detection for site health
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
// CONFIG: Localization if supporting multiple languages
i18n: {
defaultLocale: "en",
locales: ["en"],
},
// CONFIG: scripts
scripts: [
"https://js.monitor.azure.com/scripts/c/ms.analytics-web-4.min.js",
"https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js",
],
// CONFIG: theme = set properties for UI like navbar, footer, docs, copyright etc.
// See: https://docusaurus.io/docs/api/docusaurus-config#themeConfig
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// CONFIG: sidebar
// See:
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: false,
},
},
// CONFIG: default theme color mode
// See:
colorMode: {
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: true,
},
// CONFIG: navbar logo, items, style, stickiness
// See: https://docusaurus.io/docs/next/api/themes/configuration#navbar
navbar: {
title: "Azure Cosmos DB Gallery",
logo: {
alt: "Azure Cosmos DB logo",
src: "img/logo.png",
href: "/",
target: "_self",
width: 32,
height: 32,
},
items: [
// CONFIG:
// Make sure you have class defined in src/css/custom.css
{
type: "custom-NavbarButton",
position: "right",
},
{
type: "custom-NavbarButtonGithub",
href: "https://github.com/NucleoidJS/Nucleoid",
position: "right",
},
],
},
// CONFIG:
// See:
footer: {
style: "light",
links: [
{
label: "Privacy Statement",
to: "https://privacy.microsoft.com/privacystatement",
},
{
label: manageCookieLabel,
to: " ",
},
{
label: "Built With Docusaurus",
to: "https://docusaurus.io",
},
{
label: `Copyright © ${new Date().getFullYear()} Microsoft`,
to: "https://microsoft.com",
},
],
},
// CONFIG: the prism-react-renderer to highlight code blocks, add magic comments (influence code highlighting)
// Change: 'theme' and `darkTheme` constants at top of this config file
// See: https://docusaurus.io/docs/next/api/themes/configuration#codeblock-theme
// See: https://docusaurus.io/docs/next/markdown-features/code-blocks#custom-magic-comments
// For additional languages e.g., 'csharp','java','js','typescript','python', 'rust', 'html','css', 'go', 'dart'
// See: https://docusaurus.io/docs/next/markdown-features/code-blocks#supported-languages
// See: https://prismjs.com/#supported-languagescshar
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
// CONFIG: plugins
// See
plugins: [
[
"@docusaurus/plugin-ideal-image",
{
quality: 70,
max: 1030, // max resized image's size.
min: 640, // min resized image's size. if original is lower, use that size.
steps: 2, // the max number of images generated between min and max (inclusive)
disableInDev: false,
},
],
],
// CONFIG: Set presets for chosen theme
presets: [
[
'@docusaurus/preset-classic',
{
gtag: {
trackingID: 'G-CNSKHL41CT',
anonymizeIP: true,
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
}
}
],
],
};
module.exports = config;