-
Notifications
You must be signed in to change notification settings - Fork 3
/
fractal.config.js
70 lines (60 loc) · 1.55 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
62
63
64
65
66
67
68
69
70
'use strict';
/*
* Require the path module
*/
const path = require( 'path' );
/*
* Require the slugify module
*/
const slugify = require( 'slugify' );
/*
* Require the Fractal module
*/
const fractal = module.exports = require( '@frctl/fractal' ).create();
/*
* Give your project a title.
*/
fractal.set( 'project.title', 'Pinecone' );
fractal.set( 'project.version', 'v1.0.0-dev' );
fractal.set( 'project.author', 'OCAD University' );
/*
* Tell Fractal where to look for components.
*/
const nunj = require( '@frctl/nunjucks' )( {
env: {
trimBlocks: true,
lstripBlocks: true,
},
paths: ['/src/assets'],
filters: {
/** Slugify a string. */
slugify: function slugifyString( str ) {
return slugify( str, { lower: true } );
}
}
} );
fractal.components.engine( nunj );
fractal.components.set( 'ext', '.njk' );
fractal.components.set( 'path', path.join( __dirname, 'src/components' ) );
/*
* Tell Fractal where to look for documentation pages.
*/
fractal.docs.set( 'path', path.join( __dirname, 'src/docs' ) );
const mandelbrot = require( '@frctl/mandelbrot' );
// create a new instance with custom config options
const pineconeTheme = mandelbrot( {
styles: [
'default',
'/styles/mandelbrot.css'
],
favicon: '/images/favicon.png'
} );
fractal.web.theme( pineconeTheme );
/*
* Tell the Fractal web preview plugin where to look for static assets.
*/
fractal.web.set( 'static.path', path.join( __dirname, 'public' ) );
/*
* Tell the Fractal where static HTML exports should be generated.
*/
fractal.web.set( 'builder.dest', `${__dirname }/build` );