-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathsubstitute.js
More file actions
47 lines (46 loc) · 850 Bytes
/
substitute.js
File metadata and controls
47 lines (46 loc) · 850 Bytes
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
export const substitute = {
from: 'stackable/posts',
transform: oldAttributes => {
return [
'core/query',
{
queryId: 0,
query: {
perPage: 10,
pages: 0,
offset: 0,
postType: 'post',
order: 'desc',
orderBy: 'date',
author: '',
search: '',
exclude: [],
sticky: '',
inherit: false,
taxQuery: null,
parents: [],
format: [],
},
layout: { type: 'default' },
},
[
[
'core/post-template',
{
layout: {
type: 'grid',
columnCount: oldAttributes.columns,
},
},
[
[ 'core/post-featured-image', { aspectRatio: '1' } ],
[ 'core/post-title', {} ],
[ 'core/post-date', {} ],
[ 'core/post-excerpt', { moreText: 'Continue Reading' } ],
],
],
],
]
},
}
export default substitute