forked from reearth/resium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoczrc.js
102 lines (101 loc) · 2.18 KB
/
doczrc.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
import webpack from "webpack";
import CopyPlugin from "copy-webpack-plugin";
export default {
typescript: true,
title: "Resium",
menu: [
"Home",
{
name: "Installation",
menu: ["Installation", "Set up webpack config 1", "Set up webpack config 2"],
},
"Getting Started",
"Guide",
{
name: "Components",
},
{
name: "Examples",
href: "https://github.com/darwin-education/resium/tree/master/src/stories",
},
"Advanced",
"Migration Guide",
"Contribution",
],
htmlContext: {
head: {
links: [
{
rel: "stylesheet",
href: "/cesium/Widgets/widgets.css",
},
],
raw: ["<style>img{max-width:100%;}</style>"],
},
body: {
scripts: [{ src: "/cesium/Cesium.js" }],
},
},
modifyBundlerConfig: config => ({
...config,
externals: {
...config.externals,
cesium: "Cesium",
},
plugins: [
...config.plugins,
new webpack.DefinePlugin({
CESIUM_BASE_URL: JSON.stringify("/cesium"),
}),
new CopyPlugin([
{
from: "node_modules/cesium/Build/CesiumUnminified",
to: "cesium",
},
]),
],
resolve: {
...config.resolve,
extensions: [...config.resolve.extensions, ".ts", ".tsx"],
},
}),
themeConfig: {
mode: "dark",
repository: "https://github.com/darwin-education/resium",
colors: {
primary: "#00A0E8",
link: "#00A0E8",
},
logo: {
src:
"https://raw.githubusercontent.com/darwin-education/resium/master/docs/resources/logo-sidebar.png",
width: 200,
},
styles: {
body: {
fontFamily: "'Source Sans Pro', Helvetica, sans-serif",
},
h1: {
fontFamily: "'Source Sans Pro', Helvetica, sans-serif",
fontSize: "50px",
},
h2: {
fontSize: "28px",
color: "#00A0E8",
},
h3: {
color: "#50c0f1",
},
p: {
margin: "10px 0",
},
code: {
background: "#28CCA7",
padding: "0 5px",
overflow: "auto",
whiteSpace: "pre-wrap",
wordWrap: "break-word",
},
},
},
};