-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocz.config.js
70 lines (63 loc) · 2.06 KB
/
docz.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
//import { myCoolPlugin } from 'docz-plugin-mycoolplugin'
import path from 'path';
import CopyPlugin from 'copy-webpack-plugin';
import defaultTheme from 'docz-theme-default'
import images from 'remark-images';
const PUBLIC = path.resolve(__dirname, 'public');
const SRC = path.resolve(__dirname, 'src');
const emoji = require('remark-emoji');
console.log(process.cwd());
const themeConfig = {
colors: {
primary: 'tomato',
secondary: 'khaki',
gray: 'lightslategray'
}
};
const config = {
base: "/",
indexHtml: path.join(PUBLIC, 'index.html'),
menu: require('./menu'),
public: PUBLIC,
title: 'RDBMS Fundamentals',
description: 'Learn the fundamental principles of relational databases using Transact SQL in Microsoft SQL Express',
indexHtml: path.join(PUBLIC, 'index.html'),
htmlContext: {
favicon: path.join(PUBLIC, 'favicon.png'),
head: {
links: [{
rel: 'stylesheet',
href: 'https://codemirror.net/theme/dracula.css'
}]
}
},
themeConfig,
// theme: defaultTheme,
modifyBundlerConfig: config => {
/* do your magic here */
const ownerShipFnPath = path.resolve(process.cwd(), 'public/ownership');
const ownerShipFn = require('fs').readdirSync(ownerShipFnPath)[0];
[0];
const copyPlugin = new CopyPlugin([{
from: path.resolve(process.cwd(), ownerShipFnPath, ownerShipFn),
to: path.resolve(process.cwd(), 'dist', ownerShipFn)
},
{
from: path.resolve(process.cwd(), 'public/sitemap.xml'),
to: path.resolve(process.cwd(), 'dist/sitemap.xml')
}
])
config.plugins.push(copyPlugin);
// require('./src/copyfile');
return config;
},
// plugins: [
// myCoolPlugin()
// ],
files: './src/**/*.{markdown,mdx}',
dest: '/dist',
ignore: ['site-map.md', 'readme.md', 'src/theme/**'],
mdPlugins: [emoji, images]
}
export default config;
export { themeConfig }