-
Notifications
You must be signed in to change notification settings - Fork 0
/
keystone.js
75 lines (64 loc) · 2.53 KB
/
keystone.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
71
72
73
74
75
// Simulate config options from your production environment by
// customising the .env file in your project's root folder.
require('dotenv').config();
// Require keystone
var keystone = require('keystone');
// Initialise Keystone with your project's configuration.
// See http://keystonejs.com/guide/config for available options
// and documentation.
keystone.init({
'name': 'ProfilePension',
'brand': 'ProfilePension',
'sass': 'public',
'static': 'public',
'favicon': 'public/favicon.ico',
'views': 'templates/views',
'view engine': 'pug',
'auto update': true,
'session': true,
'auth': true,
'user model': 'User',
'wysiwyg override toolbar': false,
'wysiwyg menubar': true,
'wysiwyg skin': 'lightgray',
'wysiwyg additional buttons': 'searchreplace visualchars,'
+ ' charmap ltr rtl pagebreak paste, forecolor backcolor,'
+ ' emoticons media, preview print ', 'wysiwyg additional plugins': ' table, advlist, anchor,'
+ ' autolink, autosave, bbcode, charmap, contextmenu, '
+ ' directionality, emoticons, fullpage, hr, media, pagebreak,'
+ ' paste, preview, print, searchreplace, textcolor,'
+ ' visualblocks, visualchars, wordcount',
});
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('lodash'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable,
});
// Load your project's Routes
keystone.set('routes', require('./routes'));
// Configure the navigation bar in Keystone's Admin UI
keystone.set('nav', {
posts: ['posts', 'post-categories'],
infographics: ['infographics', 'infographic-categories'],
beginnerguides: ['beginner-guides', 'beginner-guide-categories'],
videos: ['videos', 'video-categories'],
news: ['stories', 'story-categories'],
teamMembers: ['team-members', 'team-member-categories'],
pensions: ['pensions', 'pension-categories'],
contact: ['contacts', 'contact-categories'],
part: ['carousels', 'steps', 'call-to-actions'],
users: 'users',
});
keystone.set('cloudinary config', 'cloudinary://558621339852181:481pLA54aHUo-6sdvxa_Y9pZt3I@dc36pae5l');
keystone.set('google api key', 'browser-key');
keystone.set('google server api key', 'server-key');
keystone.set('default region', 'uk');
keystone.set('embedly api key', 'your-key');
// Start Keystone to connect to your database and initialise the web server
keystone.start();