1 | import fs from 'fs';
|
2 |
|
3 | import { createPlugin } from 'docz-core';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | const doczPluginNetlify = () => {
|
17 | return createPlugin({
|
18 | onPostBuild: config => {
|
19 | const { dest } = config;
|
20 | fs.writeFileSync(`./${dest}/_redirects`, '/* /index.html 200', {
|
21 | encoding: 'utf8',
|
22 | });
|
23 | },
|
24 | });
|
25 | };
|
26 |
|
27 | export default {
|
28 | title: 'Melting Pot',
|
29 | description: 'A utility library for daily use.',
|
30 | source: './docs',
|
31 | debug: false,
|
32 | theme: 'docz-theme-default',
|
33 | themeConfig: {
|
34 | mode: 'dark',
|
35 | colors: {
|
36 | primary: 'tomato',
|
37 | },
|
38 | },
|
39 | plugins: [doczPluginNetlify()],
|
40 | };
|