-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed-json.html
576 lines (524 loc) · 25.5 KB
/
feed-json.html
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
---
vim: filetype=liquid
description: JSON feed from collection and FrontMatter data
version: 0.0.1
license: AGPL-3.0
author: S0AndS0
source: 'https://github.com/liquid-utilities/feed-json'
layout: null
---
{% capture workspace__json_feed %}
{% assign json_feed__collection__name = page.collection_name | default: include.collection_name | default: nil %}
{% assign json_feed__collection__data = site[json_feed__collection__name] %}
{% assign json_feed__data__list = '' | split: ',' %}
{% comment %}
Builds `author` dictionary for collection
Spec. Version 1 if `author` or `author['name']` is assigned
```json
"author": {
"name": "S0AndS0",
"url": "https://github.com/S0AndS0",
"avatar": "https://avatars2.githubusercontent.com/u/4116150?s=460&u=c45ac68bdfbeec882ff760450de243df45700a73&v=4"
}
```
Spec. Version 1.1 if `authors` and `authors[0]` and `authors[0]['name']` are assigned
```json
"authors": [
{
"name": "S0AndS0",
"url": "https://github.com/S0AndS0",
"avatar": "https://avatars2.githubusercontent.com/u/4116150?s=460&u=c45ac68bdfbeec882ff760450de243df45700a73&v=4"
}
]
```
{% endcomment %}
{% if page.authors and page.authors[0] and page.authors[0]['name'] %}
{% assign json_feed__collection__authors__value = page.authors | jsonify %}
{% assign json_feed__collection__authors__data = '"authors":' | append: json_feed__collection__authors__value %}
{% assign json_feed__collection__authors__value = nil %}
{% elsif page.author['name'] %}
{% assign json_feed__collection__author__value = page.author | jsonify %}
{% assign json_feed__collection__author__data = '"author":{' %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: json_feed__collection__author__value %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: '}' %}
{% assign json_feed__collection__author__value = nil %}
{% elsif page.author %}
{% assign json_feed__collection__author__data = '"author":{"name":"' %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: page.author %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: '"}' %}
{% elsif site.authors and site.authors[0] and site.authors[0]['name'] %}
{% assign json_feed__collection__authors__value = page.authors | jsonify %}
{% assign json_feed__collection__authors__data = '"authors":' | append: json_feed__collection__authors__value %}
{% assign json_feed__collection__authors__value = nil %}
{% elsif site.author['name'] %}
{% assign json_feed__collection__author__value = site.author | jsonify %}
{% assign json_feed__collection__author__data = '"author":{' %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: json_feed__collection__author__value %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: '}' %}
{% assign json_feed__collection__author__value = nil %}
{% elsif site.author %}
{% assign json_feed__collection__author__data = '"author":{"name":"' %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: site.author %}
{% assign json_feed__collection__author__data = json_feed__collection__author__data | append: '"}' %}
{% endif %}
{% if json_feed__collection__authors__data %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__authors__data %}
{% assign json_feed__collection__version__value = '1.1' %}
{% elsif json_feed__collection__author__data %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__author__data %}
{% assign json_feed__collection__version__value = '1' %}
{% endif %}
{% comment %}
"language": "en-US"
{% endcomment %}
{% if page.language %}
{% capture json_feed__collection__language__key_value %}
"language":{{ page.language | jsonify }}
{% endcapture %}
{% assign json_feed__collection__language__key_value = json_feed__collection__language__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__language__key_value %}
{% assign json_feed__collection__version__value = '1.1' %}
{% endif %}
{% assign json_feed__has_output = false %}
{% assign json_feed__items__list = '' | split: ',' %}
{% for post in json_feed__collection__data %}
{% if page.relative_path == post.relative_path or post.slug == 'feed' %}
{% continue %}
{% elsif post.slug == json_feed__collection__name or post.slug == 'index' %}
{% continue %}
{% elsif post.ext == '.xml' or post.ext == '.rss' or post.ext == '.atom' %}
{% continue %}
{% endif %}
{% assign json_feed__has_output = true %}
{% assign json_feed__entry = '{' %}
{% assign json_feed__entry__list = '' | split: ',' %}
{% comment %}
Build and append entry for `id`
```json
"id": "https://<account>.github.io/<project>/posts/<name>.<ext>"
```
{% endcomment %}
{% if post.id %}
{% assign json_feed__post__id = post.id %}
{% else %}
{% capture json_feed__post__id %}
{{ post.url | absolute_url }}
{% endcapture %}
{% assign json_feed__post__id = json_feed__post__id | strip | strip_newlines %}
{% endif %}
{% capture json_feed__post__id__key_value %}
"id":{{ json_feed__post__id | jsonify }}
{% endcapture %}
{% assign json_feed__post__id__key_value = json_feed__post__id__key_value | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__id__key_value %}
{% assign json_feed__post__id = nil %}
{% assign json_feed__post__id__key_value = nil %}
{% comment %}
Build and append entry for `external_url`
```json
"exernal_url": "https://example.com/some-applicable-reference"
```
{% endcomment %}
{% if post.external_url %}
{% assign json_feed__post__external_url = post.external_url %}
{% capture json_feed__post__external_url__data %}
"external_url":{{ json_feed__post__external_url | jsonify }}
{% endcapture %}
{% assign json_feed__post__external_url__data = json_feed__post__external_url__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__external_url__data %}
{% assign json_feed__post__external_url = nil %}
{% assign json_feed__post__external_url__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `title`
{% endcomment %}
{% if post.title %}
{% assign json_feed__post__title = post.title %}
{% capture json_feed__post__title__data %}
"title":{{ json_feed__post__title | jsonify }}
{% endcapture %}
{% assign json_feed__post__title__data = json_feed__post__title__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__title__data %}
{% assign json_feed__post__title = nil %}
{% assign json_feed__post__title__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `content_html`
{% endcomment %}
{% assign json_feed__post__content_html = post.output %}
{% capture json_feed__post__content_html__data %}
"content_html":{{ json_feed__post__content_html | jsonify }}
{% endcapture %}
{% assign json_feed__post__content_html__data = json_feed__post__content_html__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__content_html__data %}
{% assign json_feed__post__content_html = nil %}
{% assign json_feed__post__content_html__data = nil %}
{% comment %}
Build and append entry for `summery`
```json
"summery": "A description of page content"
```
{% endcomment %}
{% if post.description or post.excerpt or post.summery %}
{% assign json_feed__post__summery = post.description | default: post.excerpt | default: post.summery %}
{% capture json_feed__post__summery__data %}
"summery":{{ json_feed__post__summery | strip_html | jsonify }}
{% endcapture %}
{% assign json_feed__post__summery__data = json_feed__post__summery__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__summery__data %}
{% assign json_feed__post__summery = nil %}
{% assign json_feed__post__summery__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `image`
```json
"image": "https://<account>.github.io/<project>/assets/images/cats/funny.png"
```
{% endcomment %}
{% if post.image %}
{% assign json_feed__post__image = post.image %}
{% capture json_feed__post__image__data %}
"image":{{ json_feed__post__image | jsonify }}
{% endcapture %}
{% assign json_feed__post__image__data = json_feed__post__image__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__image__data %}
{% assign json_feed__post__image = nil %}
{% assign json_feed__post__image__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `banner_image`
{% endcomment %}
{% if post.banner_image %}
{% assign json_feed__post__banner_image = post.banner_image %}
{% capture json_feed__post__banner_image__data %}
"banner_image":{{ json_feed__post__banner_image | jsonify }}
{% endcapture %}
{% assign json_feed__post__banner_image__data = json_feed__post__banner_image__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__banner_image__data %}
{% assign json_feed__post__banner_image = nil %}
{% assign json_feed__post__banner_image__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `date_published`
```json
"date_published": "2010-02-07T14:04:00-05:00"
```
{% endcomment %}
{% if post.date or post.date_published %}
{% assign json_feed__post__date_published__value = post.date | default: post.date_published %}
{% capture json_feed__post__date_published__data %}
"date_published":{{ json_feed__post__date_published__value | date_to_xmlschema | jsonify }}
{% endcapture %}
{% assign json_feed__post__date_published__data = json_feed__post__date_published__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__date_published__data %}
{% assign json_feed__post__date_published__value = nil %}
{% assign json_feed__post__date_published__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `date_modified`
{% endcomment %}
{% if post.date_updated or post.date_modified %}
{% assign json_feed__post__date_modified__value = post.date_updated | default: post.date_modified %}
{% capture json_feed__post__date_modified__data %}
"date_modified":{{ json_feed__post__date_modified__value | date_to_xmlschema | jsonify }}
{% endcapture %}
{% assign json_feed__post__date_modified__data = json_feed__post__date_modified__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__date_modified__data %}
{% assign json_feed__post__date_modified__value = nil %}
{% assign json_feed__post__date_modified__data = nil %}
{% endif %}
{% comment %}
Build and append entry for `author` or `authors`
Spec. Version 1 if `author` or `author['name']` is assigned
```json
"author": {
"name": "S0AndS0",
"url": "https://github.com/S0AndS0",
"avatar": "https://avatars2.githubusercontent.com/u/4116150?s=460&u=c45ac68bdfbeec882ff760450de243df45700a73&v=4"
}
```
Spec. Version 1.1 if `authors` and `authors[0]` and `authors[0]['name']` are assigned
```json
"authors": [
{
"name": "S0AndS0",
"url": "https://github.com/S0AndS0",
"avatar": "https://avatars2.githubusercontent.com/u/4116150?s=460&u=c45ac68bdfbeec882ff760450de243df45700a73&v=4"
}
]
```
{% endcomment %}
{% if post.authors and post.authors[0] and post.authors[0]['name'] %}
{% assign json_feed__post__authors__value = page.authors | jsonify %}
{% assign json_feed__post__authors__data = '"authors":' | append: json_feed__post__authors__value %}
{% assign json_feed__post__authors__value = nil %}
{% elsif post.author['name'] %}
{% assign json_feed__post__author = post.author | jsonify %}
{% assign json_feed__post__author__data = '"author":{' %}
{% assign json_feed__post__author__data = json_feed__post__author__data | append: json_feed__post__author %}
{% assign json_feed__post__author__data = json_feed__post__author__data | append: '}' %}
{% elsif post.author %}
{% assign json_feed__post__author__data = '"author":{"name":"' %}
{% assign json_feed__post__author__data = json_feed__post__author__data | append: post.author %}
{% assign json_feed__post__author__data = json_feed__post__author__data | append: '"}' %}
{% endif %}
{% if json_feed__post__authors__data %}
{% unless json_feed__post__authors__data == json_feed__collection__authors__data %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__authors__data %}
{% endunless %}
{% assign json_feed__collection__version__value = '1.1' %}
{% assign json_feed__post__authors = nil %}
{% assign json_feed__post__authors__data = nil %}
{% elsif json_feed__post__author__data %}
{% unless json_feed__post__author__data == json_feed__collection__author__data %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__author__data %}
{% endunless %}
{% assign json_feed__post__author = nil %}
{% assign json_feed__post__author__data = nil %}
{% endif %}
{% comment %}
```json
"tags": [
"spam",
"flavored",
"ham"
]
```
{% endcomment %}
{% if post.tags %}
{% assign json_feed__post__tags = post.tags %}
{% capture json_feed__post__tags__data %}
"tags":{{ json_feed__post__tags | jsonify }}
{% endcapture %}
{% assign json_feed__post__tags__data = json_feed__post__tags__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__tags__data %}
{% assign json_feed__post__tags = nil %}
{% assign json_feed__post__tags__data = nil %}
{% endif %}
{% comment %}
```json
"attachments": [
{
"url": "",
"mime_type": "",
"title": "",
"size_in_bytes": 99,
"duration_in_seconds": 42
}
]
```
{% endcomment %}
{% if post.attachments %}
{% assign json_feed__post__attachments = post.attachments %}
{% capture json_feed__post__attachments__data %}
"attachments":{{ json_feed__post__attachments | jsonify }}
{% endcapture %}
{% assign json_feed__post__attachments__data = json_feed__post__attachments__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__attachments__data %}
{% assign json_feed__post__attachments = nil %}
{% assign json_feed__post__attachments__data = nil %}
{% endif %}
{% comment %}
TODO: add features for custom entries prefixed by an under-score, eg `_custom_entry`
{% endcomment %}
{% comment %}
Build and append entry for `content_text`
```json
"content_text": "Content that expands on the topic of something about some thing"
```
{% endcomment %}
{% assign json_feed__post__content_text = post.content %}
{% capture json_feed__post__content_text__data %}
"content_text":{{ json_feed__post__content_text | strip_html | jsonify }}
{% endcapture %}
{% assign json_feed__post__content_text__data = json_feed__post__content_text__data | strip_newlines | strip %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__content_text__data %}
{% assign json_feed__post__content_text = nil %}
{% assign json_feed__post__content_text__data = nil %}
{% comment %}
Build and append entry for `language`
```json
"language": "en-US"
```
{% endcomment %}
{% if post.language %}
{% assign json_feed__post__language = post.language %}
{% capture json_feed__post__language__data %}
"language":{{ json_feed__post__language | jsonify }}
{% endcapture %}
{% assign json_feed__post__language__data = json_feed__post__language__data | strip_newlines | strip %}
{% if json_feed__post__language__data != json_feed__collection__language__key_value %}
{% assign json_feed__entry__list = json_feed__entry__list | push: json_feed__post__language__data %}
{% endif %}
{% assign json_feed__collection__version__value = '1.1' %}
{% assign json_feed__post__language = nil %}
{% assign json_feed__post__language__data = nil %}
{% endif %}
{% assign json_feed__entry__data = '{' %}
{% capture json_feed__entry__data %}{{ json_feed__entry__data }}{{ json_feed__entry__list | join: ',' }}{% endcapture %}
{% assign json_feed__entry__data = json_feed__entry__data | append: '}'%}
{% assign json_feed__items__list = json_feed__items__list | push: json_feed__entry__data %}
{% endfor %}
{% assign json_feed__entry__data = nil %}
{% assign json_feed__entry__list = nil %}
{% comment %}
Builds key value pares for whole collection, eg...
```json
{
"version": "https://jsonfeed.org/version/1",
"title": "Collection of Posts",
"home_page_url": "https://<account>.github.io/<project>/",
"feed_url": "https://<acount>.github.io/<project>/posts/index.html",
"description": "",
"user_comment": "",
"next_url": "",
"icon": "https://<account>.github.io/<project>/posts/icon.png",
"favicon": "https://<account>.github.io/<project>/posts/fave.ico",
"expired": false
}
```
{% endcomment %}
{% capture json_feed__collection__version__key_value %}
"version":{{ "https://jsonfeed.org/version/" | append: json_feed__collection__version__value | jsonify }}
{% endcapture %}
{% assign json_feed__collection__version__key_value = json_feed__collection__version__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__version__key_value %}
{% assign json_feed__collection__version__key_value = nil %}
{% comment %}
"title": "Collection Title"
{% endcomment %}
{% if page.title %}
{% capture json_feed__collection__title__key_value %}
"title":{{ page.title | jsonify }}
{% endcapture %}
{% assign json_feed__collection__title__key_value = json_feed__collection__title__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__title__key_value %}
{% assign json_feed__collection__title__key_value = nil %}
{% endif %}
{% comment %}
"home_page_url": "https://<account>.github.io/<project>"
{% endcomment %}
{% capture json_feed__collection__home_page_url__key_value %}
"home_page_url":{{ site.url | absolute_url | jsonify }}
{% endcapture %}
{% assign json_feed__collection__home_page_url__key_value = json_feed__collection__home_page_url__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__home_page_url__key_value %}
{% assign json_feed__collection__home_page_url__key_value = nil %}
{% comment %}
"description": "Collection of example posts"
{% endcomment %}
{% assign json_feed__collection__description = page.description | default: post.summery | default: post.excerpt | default: nil %}
{% if json_feed__collection__description %}
{% capture json_feed__collection__description__value %}
"description":{{ json_feed__collection__description | strip_html | jsonify }}
{% endcapture %}
{% assign json_feed__collection__description__value = json_feed__collection__description__value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__description__value %}
{% assign json_feed__collection__description__value = nil %}
{% assign json_feed__collection__description = nil %}
{% endif %}
{% comment %}
"user_comment": ""
{% endcomment %}
{% if page.user_comment %}
{% capture json_feed__collection__user_comment__key_value %}
"user_comment":{{ page.user_comment | jsonify }}
{% endcapture %}
{% assign json_feed__collection__user_comment__key_value = json_feed__collection__user_comment__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__user_comment__key_value %}
{% assign json_feed__collection__user_comment__key_value = nil %}
{% endif %}
{% comment %}
"next_url": "https://<account>.github.io/<project>/example-collection/"
{% endcomment %}
{% if page.next_url %}
{% capture json_feed__collection__next_url__key_value %}
"next_url":{{ page.next_url | jsonify }}
{% endcapture %}
{% assign json_feed__collection__next_url__key_value = json_feed__collection__next_url__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__next_url__key_value %}
{% assign json_feed__collection__next_url__key_value = nil %}
{% endif %}
{% comment %}
"icon": "https://<account>.github.io/<project>/posts/icon.png"
{% endcomment %}
{% if page.icon %}
{% capture json_feed__collection__icon__key_value %}
"icon":{{ page.icon | jsonify }}
{% endcapture %}
{% assign json_feed__collection__icon__key_value = json_feed__collection__icon__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__icon__key_value %}
{% assign json_feed__collection__icon__key_value = nil %}
{% endif %}
{% comment %}
```json
"favicon": "https://<account>.github.io/<project>/posts/favicon.ico"
```
{% endcomment %}
{% assign json_feed__site__favicon = site.favicon | default: nil %}
{% unless json_feed__site__favicon %}
{% assign json_feed__site__favicon = site.url | append: '/favicon.ico' %}
{% endunless %}
{% capture json_feed__site__favicon__key_value %}
"favicon":{{ json_feed__site__favicon | jsonify }}
{% endcapture %}
{% assign json_feed__site__favicon__key_value = json_feed__site__favicon__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__site__favicon__key_value %}
{% assign json_feed__site__favicon__key_value = nil %}
{% assign json_feed__site__favicon = nil %}
{% comment %}
```json
"expired": false
```
{% endcomment %}
{% if page.expired == true or page.expired == false %}
{% capture json_feed__collection__expired__key_value %}
"expired":{{ page.expired | jsonify }}
{% endcapture %}
{% else %}
{% assign json_feed__collection__expired__key_value = '"expired":false' %}
{% endif %}
{% assign json_feed__collection__expired__key_value = json_feed__collection__expired__key_value | strip | strip_newlines %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__expired__key_value %}
{% assign json_feed__collection__expired__key_value = nil %}
{% comment %}
Builds `hubs` dictionary for collection
```json
"hubs": [
{
"type": "",
"url": ""
}
]
```
{% endcomment %}
{% if page.hubs %}
{% assign json_feed__collection__hubs = page.hubs | jsonify %}
{% assign json_feed__collection__hubs__data = '"hubs":{' %}
{% assign json_feed__collection__hubs__data = json_feed__collection__hubs__data | append: json_feed__collection__hubs %}
{% assign json_feed__collection__hubs__data = json_feed__collection__hubs__data | append: '}' %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__collection__hubs__data %}
{% assign json_feed__collection__hubs = nil %}
{% assign json_feed__collection__hubs__data = nil %}
{% endif %}
{% comment %}
Merges collection key/value pares with collection `items` list
{% endcomment %}
{% assign json_feed__data = '{' %}
{% if json_feed__has_output %}
{% capture json_feed__items__list__data %}"items":[{{ json_feed__items__list | join: ',' }}]{% endcapture %}
{% assign json_feed__data__list = json_feed__data__list | push: json_feed__items__list__data %}
{% assign json_feed__items__list = nil %}
{% assign json_feed__items__list__data = nil %}
{% endif %}
{% capture json_feed__data %}{{ json_feed__data }}{{ json_feed__data__list | join: ',' }}{% endcapture %}
{% assign json_feed__data = json_feed__data | strip | strip_newlines | append: '}' %}
{% assign json_feed__collection__name = nil %}
{% assign json_feed__collection__data = nil %}
{% assign json_feed__collection__authors__data = nil %}
{% assign json_feed__collection__version__value = nil %}
{% assign json_feed__collection__author__data = nil %}
{% assign json_feed__collection__language__key_value = nil %}
{% assign json_feed__data__list = nil %}
{% assign json_feed__has_output = nil %}
{% endcapture %}{{ json_feed__data }}{% assign json_feed__data = nil %}{% assign workspace__json_feed = nil %}