-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.js
40 lines (34 loc) · 1.15 KB
/
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
const argv = require("minimist")(process.argv.slice(2));
const {getSubPages, listOfPages, sortByWeight} = require("./helpers");
const notification = require("./notification.json");
const templateData =
{
site: {
title: "CBA",
subtitle: "Chromium Browser Automation (extension for chrome browser automation)",
menuItems: ["", "documentation", "tutorial", "ready-projects", "releases"],
github: "https://github.com/browser-automation/cba-website",
notification
}
};
const port = {
http: 3000
};
const lessOptions = {};
const jsModuleOptions = {};
if (!argv.dev)
{
lessOptions.sourceMap = false;
lessOptions.minify = true;
jsModuleOptions.minify = {sourceMap: false}
}
templateData.site.listOfPages = listOfPages.bind(templateData.site);
templateData.site.getSubPages = getSubPages.bind(templateData.site);
templateData.site.sortByWeight = sortByWeight.bind(templateData.site);
// Set image width and height in markdown ex. - `![test](image.png =100x200)`
const imgSize = require('markdown-it-imsize');
const markdownOptions = {
plugins: [imgSize]
}
module.exports = { templateData, port, lessOptions, jsModuleOptions,
markdownOptions };