forked from casper-network/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
93 lines (91 loc) · 3.1 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
const {
algoliaConfig,
algoliaOfflineConfig,
analyticsConfig,
announcementConfig,
colorConfig,
dataConfig,
footerConfig,
i18nConfig,
metadatasConfig,
navbarConfig,
pwaConfig,
prismConfig,
siteConfig,
} = require("./config");
const { getEditUrl } = require("./src/utils/docs");
const docsOnlyMode = process.env.DOCS_MODE || true;
const routePrefix = !docsOnlyMode ? "/docs" : "/";
module.exports = {
...siteConfig,
i18n: i18nConfig,
baseUrl: '/',
/* Optional */
// customFields: dataConfig,
themeConfig: {
// algolia: algoliaConfig,
// announcementBar: announcementConfig,
colorMode: colorConfig,
footer: footerConfig,
hideableSidebar: true,
/* Optional */
// googleAnalytics: analyticsConfig.googleAnalytics,
// gtag: analyticsConfig.gtag,
// metadatas: metadatasConfig,
navbar: navbarConfig,
prism: prismConfig,
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
// remarkPlugins: [],
path: "source/docs/casper",
routeBasePath: routePrefix, // IMPORTANT: Turn on docs-only mode
sidebarPath: require.resolve("./config/sidebar.config.js"),
editUrl: getEditUrl,
exclude: ["./contract-dsl/archived", "./economics/archived", "./theory"],
/* Docs config options */
// showLastUpdateAuthor: false,
// showLastUpdateTime: true,
// remarkPlugins: [require("@react-native-website/remark-snackplayer")],
// editCurrentVersion: true,
// onlyIncludeVersions: process.env.PREVIEW_DEPLOY === "true" ? ["current", ...versions.slice(0, 2)] : undefined,
},
// IMPORTANT: disable blog feature
blog: false,
/* Blog config options */
// {
// showReadingTime: true,
// editUrl: "https://github.com/casper-network/documentation/blob/master/blog",
// path: "blog",
// blogSidebarCount: "ALL",
// blogSidebarTitle: "All Blog Posts",
// feedOptions: {
// type: "all",
// copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`,
// },
// },
theme: {
customCss: [require.resolve("./src/assets/scss/theme.scss")],
},
},
],
],
plugins: [
"docusaurus-plugin-sass",
/* Optional */
// ["@docusaurus/plugin-pwa", pwaConfig],
[
"docusaurus2-dotenv",
{
path: "./.env.production",
safe: false,
systemvars: false,
silent: false,
},
],
[require.resolve("@cmfcmf/docusaurus-search-local"), algoliaOfflineConfig],
],
};