-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
77 lines (76 loc) · 1.84 KB
/
config.php
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
76
77
<?php
return [
'production' => false,
'google_analytic_code' => 'UA-23560239-19',
'disqus_code' => 'staticpress-demo',
'sitename' => 'StaticPress',
'title' => 'StaticPress',
'mainUrl' => 'https://demo.staticpress.io',
'baseUrl' => 'https://demo.staticpress.io',
'siteAuthor' => 'Hence Media',
'site' => [
'title' => 'StaticPress',
],
'collections' => [
'posts' => [
'path' => 'posts/{filename}',
'sort' => '-date',
'extends' => '_layouts.post',
'section' => 'postContent',
'isPost' => true,
'comments' => false,
'isFeatured' => true,
'tags' => [],
'categories' => [],
],
'tags' => [
'path' => 'tags/{filename}',
'extends' => '_layouts.tag',
'section' => '',
'name' => function ($page) {
return $page->getFilename();
},
],
'categories' => [
'path' => 'categories/{filename}',
'extends' => '_layouts.category',
'section' => '',
'name' => function ($page) {
return $page->getFilename();
},
],
'settings' => [
'path' => 'settings/{filename}',
'extends' => '_layouts.master',
'section' => '',
'name' => function ($page) {
return $page->getFilename();
},
],
'customPages' => [
'path' => '{filename}',
'extends' => '_layouts.page',
'section' => '',
'name' => function ($page) {
return $page->getFilename();
},
],
'sliders' => [
'path' => 'sliders/{filename}',
'extends' => '_layouts.master',
'section' => '',
'name' => function ($page) {
return $page->getFilename();
},
],
],
'newnav' => file_get_contents('./source/navigation.json'),
'excerpt' => function ($page, $limit = 250, $end = '...') {
return $page->isPost
? str_limit_soft(content_sanitize($page->getContent()), $limit, $end)
: null;
},
'url' => function ($page, $path) {
return starts_with($path, 'http') ? $path : '/' . trimPath($path);
},
];