forked from emotion-icons/emotion-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoczrc.js
More file actions
129 lines (122 loc) · 2.92 KB
/
Copy pathdoczrc.js
File metadata and controls
129 lines (122 loc) · 2.92 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
import * as path from 'path'
import pkg from './package.json'
const styles = {
body: {
fontFamily: "'Source Sans Pro', Helvetica, sans-serif",
fontSize: 16,
lineHeight: 1.6,
},
container: {
width: ['100%', '100%', 920],
padding: ['20px', '0 40px 40px'],
// background:
// 'linear-gradient(to bottom, rgba(70, 201, 229, 0.8) 0%, rgba(210, 106, 194, 0.8) 100%)',
// backgroundSize: 'cover',
// backgroundRepeat: 'no-repeat',
// backgroundAttachment: 'fixed',
},
h1: {
margin: ['30px 0 20px', '60px 0 20px', '40px 0'],
fontSize: [36, 42, 48],
fontWeight: 100,
letterSpacing: '-0.02em',
},
h2: {
margin: ['20px 0 20px', '35px 0 20px'],
lineHeight: ['1.2em', '1.5em'],
fontSize: 28,
fontWeight: 600,
letterSpacing: '-0.02em',
},
h3: {
margin: '25px 0 10px',
fontSize: [22, 24],
fontWeight: 400,
},
h4: {
fontSize: 20,
fontWeight: 400,
},
h5: {
fontSize: 18,
fontWeight: 400,
},
h6: {
fontSize: 16,
fontWeight: 400,
},
list: {
padding: 0,
margin: '10px 0 10px 20px',
},
playground: {
padding: ['1.5em', '2em'],
},
code: {
margin: '0 3px',
padding: '4px 6px',
borderRadius: '3px',
fontFamily: '"Source Code Pro", monospace',
fontSize: '0.85em',
},
pre: {
fontFamily: '"Source Code Pro", monospace',
fontSize: 14,
lineHeight: 1.8,
},
table: {
overflowY: ['hidden', 'hidden', 'hidden', 'initial'],
display: ['block', 'block', 'block', 'table'],
width: '100%',
marginBottom: [20, 40],
fontFamily: '"Source Code Pro", monospace',
fontSize: 14,
},
blockquote: {
margin: '25px 0',
padding: '20px',
fontStyle: 'italic',
fontSize: 18,
},
}
const libName = pkg.name
const DIR = path.resolve(__dirname)
const SRC = path.join(DIR, 'src')
const DOCS = path.join(DIR, 'docz')
const PUBLIC = path.join(DOCS, 'public')
export default {
dest: './docs',
// files: './docz/**/*.mdx',
ordering: 'ascending',
propsParser: false,
src: './docz',
title: libName,
description: pkg.description,
base: `/${libName}/`,
themeConfig: {
mode: 'dark',
},
theme: '@roseys/docz-theme',
indexHtml: path.join(PUBLIC, 'index.html'),
// // theme: 'src/theme/index',
// // ordering: 'ascending',
// // propsParser: false,
// // mdPlugins: [externalLinks.default],
htmlContext: {
favicon: path.join(PUBLIC, 'favicon.ico'),
},
modifyBundlerConfig: config => {
config.resolve.alias = Object.assign({}, config.resolve.alias, {
'@docz': path.resolve(__dirname, 'docz'),
'emotion-icons': SRC,
'@public': PUBLIC,
// '@fonts': `${PUBLIC}/fonts`,
// '@images': `${PUBLIC}/images`,
// '@fonts': `${PUBLIC}/fonts`,
// '@images': `${PUBLIC}/images`,
// '@components': `${SRC}/theme/components`,
// '@styles': `${SRC}/theme/styles`,
})
return config
},
}