forked from apostrophecms-legacy/apostrophe-seo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
38 lines (37 loc) · 1021 Bytes
/
index.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
module.exports = {
name: 'apostrophe-seo',
extend: 'apostrophe-module',
moogBundle: {
directory: 'lib/modules',
modules: [
'apostrophe-seo-doc-type-manager',
'apostrophe-seo-custom-pages',
'apostrophe-seo-files',
'apostrophe-seo-images',
'apostrophe-seo-global',
'apostrophe-seo-groups',
'apostrophe-seo-users',
'apostrophe-seo-pages',
'apostrophe-seo-pieces-pages'
]
},
construct: (self, options) => {
require('./lib/api.js')(self, options);
require('./lib/routes.js')(self, options);
require('./lib/assets.js')(self);
self.prependSnippets = () => {
self.apos.templates.prepend('body', (req) => {
return self.partial('body-snippet', {});
});
self.apos.templates.append('head', (req) => {
return self.partial('head-snippet', {});
});
};
},
afterConstruct: (self) => {
self.pushAssets();
self.prependSnippets();
self.addRoutes();
self.pushCreateSingleton();
}
};