-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfractal.config.js
61 lines (50 loc) · 1.82 KB
/
fractal.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
const path = require('path')
const packageJson = require('./package.json')
const faker = require('./faker.schema') // eslint-disable-line no-unused-vars
const paths = {
build: path.join(__dirname, 'build'),
src: path.join(__dirname, 'src'),
static: path.join(__dirname, 'public'),
components: path.join(__dirname, 'src', 'components'),
docs: path.join(__dirname, 'src', 'docs')
}
/* Create a new Fractal instance and export it for use elsewhere if required. */
const fractal = (module.exports = require('@frctl/fractal').create())
// Theme configuration.
const theme = require('@frctl/mandelbrot')({
skin: 'black',
styles: ['default'],
lang: 'en-gb',
nav: ['search', 'docs', 'components', 'information'],
panels: ['notes', 'html', 'view', 'info'],
favicon: '/favicon.ico'
})
// Setup handlebar helpers.
const hbs = require('@frctl/handlebars')(require('./fractal.helpers'))
/* Set the title of the project. */
fractal.set('project.title', packageJson.title)
/* Component Setup */
fractal.components.engine(hbs)
fractal.components.set('path', paths.components)
fractal.components.set('default.preview', '@preview')
fractal.components.set('default.status', 'wip')
fractal.components.set('ext', '.hbs')
fractal.components.set('default.context', {
'site-name': packageJson.title,
navigation: require('./src/data/navigation.js'),
drawings: require('./src/data/drawings.js')
})
fractal.components.set('default.display', {
'min-width': '320px'
})
/* Documentation */
fractal.docs.set('path', paths.docs)
fractal.docs.set('default.status', 'draft')
fractal.docs.set('ext', '.md')
/* Specify a directory of static assets. */
fractal.web.set('static.path', paths.static)
/* Set the static HTML build destination. */
fractal.web.set('builder.dest', paths.build)
/* Set the theme. */
fractal.web.theme(theme)
module.exports = fractal