forked from ckissi/designresources
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.php
28 lines (27 loc) · 1.06 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
<?php
use Illuminate\Support\Str;
return [
'production' => false,
'baseUrl' => 'https://resources4webdev.netlify.app',
'title' => 'Design resources for Developers',
'description' => 'Design resources for Developers',
'collections' => [
'posts' => [
'extends' => '_layouts.post',
'items' => function ($config) {
$posts = json_decode(file_get_contents('https://b-traversy.vercel.app/apicomp'));
return collect($posts)->map(function ($post) {
if($post->title != 'Design resources for Developers')
return [
'title' => $post->title,
'description' => $post->descr,
'path' => '/',
'filename' => Str::slug($post->title),
'links' => $post->links
];
else return [];
});
},
],
]
];