-
Notifications
You must be signed in to change notification settings - Fork 14
/
doczrc.js
40 lines (38 loc) · 958 Bytes
/
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
import fs from 'fs';
// eslint-disable-next-line import/no-extraneous-dependencies
import { createPlugin } from 'docz-core';
/**
* import { createPlugin } from 'docz-core';
* 'docz-core' is a peer-dependecy of docz
*
* Reference for doczPluginNetlify
* https://github.com/nicholasess/docz-plugin-netlify
*
* Inspired on
* Rewrite rule: /index.html 200
* Reference: https://www.netlify.com/docs/redirects/#rewrites-and-proxying
*/
const doczPluginNetlify = () => {
return createPlugin({
onPostBuild: config => {
const { dest } = config;
fs.writeFileSync(`./${dest}/_redirects`, '/* /index.html 200', {
encoding: 'utf8',
});
},
});
};
export default {
title: 'Melting Pot',
description: 'A utility library for daily use.',
src: './docs',
debug: true,
themeConfig: {
mode: 'dark',
colors: {
primary: '#CC1F2D',
},
},
codeSandbox: false,
plugins: [doczPluginNetlify()],
};